:root{--care-ink:#18333f;--care-teal:#007f79;--care-muted:#667c87;--care-line:#dce7ec;--care-bg:#f3f7f9}
.c-public{padding-top:42px;padding-bottom:80px;max-width:1320px}.c-heading{margin-bottom:28px}.c-heading h1{font-size:clamp(28px,3vw,42px);line-height:1.2;letter-spacing:-.04em;margin:9px 0 13px}.c-heading p{color:var(--care-muted)}.c-flex{display:flex;align-items:center;justify-content:space-between;gap:20px}.c-steps{list-style:none;display:flex;padding:0;margin:0 0 30px;gap:14px}.c-steps li{display:flex;align-items:center;gap:9px;flex:1;padding:16px;border-bottom:2px solid #dce7ec;color:var(--care-muted)}.c-steps b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#e7eef1}.c-steps li.active{color:var(--care-teal);border-color:var(--care-teal)}.c-steps li.active b{background:#d8f1ed}.c-workflow{display:grid;grid-template-columns:minmax(0,1fr) 330px;align-items:start;gap:24px}.c-workflow>div>.card{margin-bottom:24px}.c-workflow .card,.c-track-grid .card{padding:28px;border-radius:18px}.c-section-title{display:flex;align-items:center;gap:12px;margin-bottom:22px}.c-section-title>span{font-size:13px;font-weight:700;color:var(--care-teal);background:#e8f6f2;padding:6px;border-radius:6px}.c-section-title h2{font-size:22px;margin:0}.c-drop{border:2px dashed #aecbd0;border-radius:14px;padding:36px 16px;text-align:center;background:#f8fbfc;transition:background .2s}.c-drop.dragging{background:#d9f4eb;border-color:var(--care-teal)}.c-drop .button-row{justify-content:center;flex-wrap:wrap}.c-drop h3{margin:12px 0;font-size:21px}.c-upload-icon{display:inline-flex;color:var(--care-teal);padding:15px;background:#e2f2ee;border-radius:16px}.c-hint{font-size:13px!important;line-height:1.65;color:var(--care-muted);margin:18px 0}.c-file-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;background:#edf7f5;border-radius:10px;overflow-wrap:anywhere}.c-summary{position:sticky;top:100px}.c-summary h2{font-size:22px;margin:12px 0}.c-summary dl>div,.c-case-grid dl>div{display:flex;justify-content:space-between;gap:15px;padding:12px 0;border-bottom:1px solid var(--care-line)}.c-summary dd{font-weight:700;text-align:right}.c-total{font-size:21px;margin-top:12px}.c-alert{color:#a46516!important;background:#fff6df;padding:12px;border-radius:9px}.c-series{display:grid;gap:14px;margin:20px 0}.c-series>div{display:grid;grid-template-columns:1fr minmax(180px,.7fr);gap:20px;padding:15px;background:var(--care-bg);border-radius:10px}.c-series small{display:block;margin-top:6px;color:var(--care-muted)}.c-series select{width:100%;font-size:13px}.c-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.c-form-grid .field{margin:0}.c-advisory{background:#eaf5f4;border-left:3px solid var(--care-teal);padding:18px;margin:20px 0}.c-advisory p{margin:8px 0 0;line-height:1.7}.c-track-grid{display:grid;grid-template-columns:360px minmax(0,1fr);gap:24px;align-items:start}.c-status{display:inline-flex;border-radius:30px;padding:6px 11px;background:#fff3da;color:#8e611b;font-size:12px;font-weight:700}.c-status.ready{background:#dff3e9;color:#176c4b}.c-success{padding:20px;background:#e3f4ee;border:1px solid #bce0cf;border-radius:12px;font-size:20px;font-weight:700;color:#12634b}.c-pre{white-space:pre-wrap}.c-empty{padding:36px;text-align:center;color:var(--care-muted)}.c-case-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:20px}.c-case-grid h2{font-size:21px;margin-top:17px}.c-case-grid p{color:var(--care-muted);line-height:1.6}.c-case-grid dd{font-size:13px}.c-report{padding:0;overflow:hidden;margin-top:24px}.c-report>.c-flex{padding:22px}.c-report h2{margin:0}.c-report-actions{padding:18px;display:flex;justify-content:flex-end;gap:12px;background:#f4f8fa;border-top:1px solid var(--care-line);position:sticky;bottom:0}.c-editor-toolbar{display:flex;flex-wrap:wrap;padding:10px 16px;gap:6px;border-block:1px solid var(--care-line);background:#f7fafb}.c-editor-toolbar button{min-width:34px;height:34px;border:1px solid #d7e3e8;border-radius:6px;background:white;padding:0 10px}.c-editor-toolbar a{align-self:center;margin-left:auto;font-size:13px}#c-report-editor{min-height:450px;padding:26px;line-height:1.8}#c-report-editor .ProseMirror{min-height:420px;outline:0}#c-report-editor table{border-collapse:collapse;width:100%}#c-report-editor td,#c-report-editor th{border:1px solid #bccdd3;padding:7px}.c-clinical-note{background:#eef6f8;line-height:1.7}.c-clinical-note p{white-space:pre-wrap}.c-password{position:relative;display:block}.c-password input{padding-right:46px!important;width:100%}.c-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);display:grid;place-items:center;border:0;background:transparent;width:36px;height:36px;color:#67818d;border-radius:7px}.c-eye:hover{background:#e5eff1}.c-eye svg{width:19px;height:19px}
.n-shell{--n-sidebar:240px;min-height:100vh;background:#f3f6f9;color:#18333f;display:grid;grid-template-columns:var(--n-sidebar) minmax(0,1fr)}.n-sidebar{position:sticky;top:0;height:100vh;padding:27px 18px;background:#102b3a;color:#dbe8ee;display:flex;flex-direction:column;overflow:auto}.n-sidebar .logo{color:white}.n-sidebar .n-caption{text-transform:uppercase;letter-spacing:.16em;font-size:10px;color:#7d9ead;padding:30px 12px 10px}.n-sidebar nav{display:grid;gap:5px}.n-sidebar nav a{display:flex;gap:12px;align-items:center;color:#b7cdd7;padding:11px 13px;font-size:13px;border-radius:9px}.n-sidebar nav a.active{background:#1b4e5c;color:white;box-shadow:inset 3px 0 #61d4ba}.n-sidebar nav a:hover{background:#1b4051;color:white}.n-side-foot{margin-top:auto;padding:25px 12px 0;font-size:12px;color:#8ca8b7}.n-side-foot a{display:block;margin:12px 0;color:#c5dbe4}.n-main{min-width:0}.n-top{height:74px;padding:0 38px;border-bottom:1px solid #dce7ed;background:white;display:flex;align-items:center;justify-content:space-between;gap:15px}.n-top small{color:#6b8190}.n-content{padding:32px 38px;max-width:1700px;margin:auto}.n-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:27px}.n-heading h1{font-size:29px;letter-spacing:-.035em;margin:3px 0 6px}.n-heading p{font-size:13px;color:#708591;margin:0}.n-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.n-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;border:1px solid transparent;border-radius:7px;padding:7px 11px;background:#087f79;color:white;font-size:12px;font-weight:650;line-height:18px;white-space:nowrap;cursor:pointer}.n-btn.blue{background:#e6efff;color:#285ca0}.n-btn.gray{background:#edf2f5;color:#456273}.n-btn.red{background:#ffebeb;color:#a23c46}.n-btn.amber{background:#fff2d7;color:#92620f}.n-btn:disabled{opacity:.45;cursor:default}.n-btn:hover{filter:brightness(.96)}.n-card{background:white;border:1px solid #e0e8ed;border-radius:15px;padding:23px;margin-bottom:22px;box-shadow:0 4px 20px #244b6605}.n-card h2{font-size:19px;margin:0 0 18px}.n-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:24px}.n-metric{background:white;border:1px solid #e0e8ed;border-radius:14px;padding:20px}.n-metric strong{display:block;font-size:33px;line-height:1.3;margin:12px 0 5px;letter-spacing:-.05em}.n-metric span{font-size:12px;color:#6a8290}.n-metric small{color:#0b8c79;font-size:11px}.n-filter{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin-bottom:20px}.n-filter label{display:grid;gap:6px;font-size:11px;font-weight:650;color:#708591}.n-filter input,.n-filter select{height:38px;min-width:135px;border:1px solid #d6e2e8;border-radius:8px;background:white;padding:8px 10px;font-size:13px;color:#2c4959}.n-filter .n-search{flex:1;min-width:200px}.n-filter .n-search input{width:100%}.n-table-wrap{overflow-x:auto}.n-table{width:100%;border-collapse:collapse;font-size:13px}.n-table th{background:#f6f9fb;color:#6b8290;font-size:11px;font-weight:650;text-align:left;padding:13px 14px;white-space:nowrap;border-bottom:1px solid #dbe6ec}.n-table td{padding:15px 14px;border-bottom:1px solid #edf2f5;vertical-align:middle}.n-table tbody tr:last-child td{border-bottom:0}.n-table tbody tr:hover{background:#fafcfd}.n-table td>small{display:block;color:#7c919b;margin-top:5px;font-size:11px}.n-table .n-actions{flex-wrap:nowrap}.n-badge{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:30px;font-size:11px;font-weight:650;background:#edf2f5;color:#547180}.n-badge.active,.n-badge.paid,.n-badge.approved,.n-badge.sent{background:#e0f5e9;color:#287456}.n-badge.blocked,.n-badge.awaiting_payment{background:#fff1d7;color:#8c6419}.n-badge.revoked,.n-badge.expired,.n-badge.failed{background:#ffe8e9;color:#a14a52}.n-two{display:grid;grid-template-columns:1.2fr 1fr;gap:22px;align-items:start}.n-health{display:flex;align-items:center;gap:14px;padding:17px 0;border-bottom:1px solid #edf2f5}.n-health:last-child{border:0}.n-health .n-health-icon{width:39px;height:39px;border-radius:10px;background:#edf6f4;color:#167d6f;display:grid;place-items:center}.n-health strong{font-size:13px;display:block}.n-health p{margin:5px 0 0;font-size:12px;color:#788d97}.n-health>a{margin-left:auto}.n-device{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;margin-bottom:6px}.n-device small{display:block;color:#708591;font-size:10px}.n-tabs{display:flex;gap:8px;margin-bottom:22px}.n-tabs button{border:1px solid #dce7ed;background:white;border-radius:8px;padding:9px 15px;font-size:13px;color:#607d8d}.n-tabs button.active{background:#143f50;color:white;border-color:#143f50}.n-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.n-form-grid .field{margin:0}.n-form-grid .full{grid-column:1/-1}.n-copy{display:flex;gap:8px;margin:15px 0}.n-copy input{min-width:0;flex:1;font:12px monospace}.n-note{font-size:12px;line-height:1.7;color:#758994;background:#f4f8fa;border-radius:9px;padding:14px}.n-price-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.n-price-grid label{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;background:#f7fafb;border-radius:8px;font-size:12px}.n-price-grid input{max-width:110px}.n-timeline{display:grid;gap:0}.n-timeline article{border-left:2px solid #d9e9ee;margin-left:7px;padding:0 0 24px 23px;position:relative}.n-timeline article:before{content:'';position:absolute;width:10px;height:10px;border:3px solid white;background:#45aa95;border-radius:50%;left:-6px;top:3px;box-sizing:content-box}.n-timeline strong{font-size:13px}.n-timeline p,.n-timeline small{color:#7c929f;font-size:12px;word-break:break-all}.n-release-radio{accent-color:#008980;width:18px;height:18px}.n-avatar{display:flex;align-items:center;gap:11px}.n-avatar>span{width:36px;height:36px;display:grid;place-items:center;background:#e3f1f3;border-radius:10px;font-weight:700;color:#247987}.n-mobile-nav{display:none}.d-shell .dashboard-content{background:#f3f7f9}.d-shell .card{border-radius:15px;box-shadow:0 4px 16px #12374604}.d-shell .dashboard-sidebar{background:#102d3a;color:white}.d-shell .dashboard-sidebar a,.d-shell .dashboard-sidebar button{color:#bfd5df}.d-shell .dashboard-sidebar .active{background:#1a4f5b!important;color:white!important}.d-shell .dashboard-top{background:white}.d-shell .dashboard-content h1{letter-spacing:-.035em}.d-shell .d-identity{border-color:#294954}.d-shell .d-identity span{color:#94b1bf}.d-shell .dashboard-sidebar .logo{color:white}.modal:has(.n-form-grid){max-width:780px}.modal .n-actions{margin-top:20px}.modal .field select,.modal .field input{width:100%}
@media(max-width:1050px){.n-shell{--n-sidebar:210px}.n-content{padding:24px}.n-metrics{grid-template-columns:repeat(2,1fr)}.n-two{grid-template-columns:1fr}.n-heading{align-items:flex-start}.c-workflow{grid-template-columns:1fr 290px}.c-track-grid{grid-template-columns:300px 1fr}}
@media(max-width:760px){.c-public{padding-top:25px}.c-workflow,.c-track-grid{grid-template-columns:1fr}.c-summary{position:static;grid-row:1}.c-steps{gap:2px;font-size:11px}.c-steps li{padding:10px 3px;gap:5px}.c-steps b{flex-shrink:0;width:23px;height:23px}.c-series>div{grid-template-columns:1fr}.c-form-grid,.n-form-grid,.n-price-grid{grid-template-columns:1fr}.c-flex{align-items:flex-start;flex-direction:column}.c-workflow .card,.c-track-grid .card{padding:20px}.c-report-actions{flex-wrap:wrap}.n-shell{display:block}.n-sidebar{position:relative;height:auto;padding:18px}.n-sidebar .n-caption,.n-side-foot{display:none}.n-sidebar nav{display:flex;overflow:auto;margin-top:18px;gap:6px}.n-sidebar nav a{flex-shrink:0;padding:9px}.n-sidebar nav svg{display:none}.n-top{height:55px;padding:0 19px}.n-content{padding:22px 15px}.n-heading{flex-direction:column}.n-heading h1{font-size:26px}.n-metrics{gap:10px}.n-metric{padding:15px}.n-metric strong{font-size:27px}.n-card{padding:17px}.n-filter label{flex:1}.n-filter input,.n-filter select{min-width:100px;width:100%}.n-form-grid .full{grid-column:auto}.n-table td,.n-table th{padding:12px 9px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.r-motion-media{animation:none!important}}

.d-shell .dashboard-sidebar nav a,.d-shell .dashboard-sidebar nav button{color:#bdd9e2}.d-shell .dashboard-sidebar nav .active{color:#fff}.c-password + [data-action="togglePassword"]{display:none}

.c-doctor-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.c-doctor-stats .card{display:flex;justify-content:space-between;align-items:center;padding:24px;gap:15px}.c-doctor-stats strong{font-size:30px;color:#19776b}.c-list-controls{margin-bottom:20px}.c-list-controls .field{flex:1;max-width:450px;margin:0}.c-case-grid [hidden]{display:none}@media(max-width:800px){.c-doctor-stats{grid-template-columns:repeat(2,1fr)}.c-doctor-stats .card{padding:16px}}
/* Clinic archive workspace: settings are dialogs; only the status island updates. */
.p-clinic-workspace{max-width:1500px;margin:auto}.p-clinic-workspace>.n-heading{align-items:center;margin-bottom:24px}.p-clinic-code{font-size:12px;color:#728391;margin-left:8px}.p-clinic-picker{width:min(300px,100%);margin:0}.p-clinic-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px}.p-clinic-tools .n-btn{min-height:40px;padding:9px 14px;font-size:12px;border:1px solid #d6e3e8;background:#fff;color:#375664}.p-clinic-tools .n-btn:hover,.p-clinic-tools .n-btn[aria-current=page]{background:#e6f5f1;color:#126f65;border-color:#9ccfc5}.p-sync-card{padding:24px 26px;border:1px solid #d6e5e5;border-radius:14px;background:linear-gradient(120deg,#f2faf7,#f8fbfd);margin-bottom:26px}.p-sync-card .n-heading{margin-bottom:18px;align-items:center}.p-sync-card h2{font-size:19px;margin:5px 0 0}.p-sync-card .eyebrow,.p-clinic-workspace .n-card .eyebrow{font-size:10px;letter-spacing:.13em;color:#60847f}.p-live-label{font-size:11px;color:#46796f;border:1px solid #c7e2d9;background:#eff9f5;border-radius:20px;padding:7px 11px}.p-sync-bridge{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 25px;padding:15px 0;border-top:1px solid #dce9e7}.p-sync-name{display:flex;gap:12px;align-items:center}.p-sync-name strong{font-size:14px;display:block;color:#173f49}.p-sync-name span:not(.p-sync-dot){display:block;font-size:12px;color:#62817f;margin-top:3px}.p-sync-dot{width:9px;height:9px;flex:none;border-radius:50%;background:#8d9eab;box-shadow:0 0 0 5px #8d9eab14}.p-sync-dot.ready{background:#23a383;box-shadow:0 0 0 5px #23a38314}.p-sync-dot.uploading{background:#328bc9;box-shadow:0 0 0 5px #328bc914}.p-sync-dot.warning{background:#d18b30;box-shadow:0 0 0 5px #d18b3014}.p-sync-counts{display:flex;gap:24px;font-size:12px;color:#638079}.p-sync-counts b{display:block;font-size:20px;line-height:1.4;color:#264c55}.p-sync-progress{flex-basis:100%;max-width:100%;font-size:12px;color:#46716e}.p-sync-progress>div{display:flex;justify-content:space-between;gap:15px}.p-sync-progress progress{width:100%;height:7px;margin:9px 0;accent-color:#269d92;border:0;border-radius:10px;overflow:hidden}.p-sync-progress progress::-webkit-progress-bar{background:#dcebe7}.p-sync-progress progress::-webkit-progress-value{background:#249e90}.p-sync-progress small,.p-sync-seen{font-size:11px;color:#728980}.p-sync-seen{flex-basis:100%}.p-sync-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:11px;color:#688782;border-top:1px solid #dce9e7;padding-top:13px;margin-top:6px}.p-sync-error{color:#a45e1d!important;font-size:12px}.p-sync-new{padding:12px 14px;background:#e6f2fc;border:1px solid #c5ddf2;color:#285b82;border-radius:8px;margin-top:15px;font-size:13px}.p-sync-new .n-btn{margin-left:8px;font-size:11px;min-height:32px;padding:6px 10px}.p-sync-new[hidden]{display:none}.p-settings{padding-top:5px}.p-settings .n-card{box-shadow:none;padding:18px 0;border:0;margin:0}.p-settings .n-heading{align-items:center;gap:14px}.p-settings .n-actions{gap:6px}.p-settings .n-btn{min-height:36px;padding:8px 12px;font-size:12px}.p-settings .n-table td{vertical-align:middle}.p-modal-back{margin-bottom:18px}.p-modal-back .n-btn{font-size:12px}.p-clinic-workspace .n-filter{gap:12px}.p-clinic-workspace .n-filter .field:first-of-type{min-width:220px;flex:2}.p-clinic-workspace .n-card{border-radius:14px}.p-clinic-workspace .n-card>.n-heading h2{margin-top:5px}
@media(max-width:700px){.p-clinic-workspace>.n-heading{display:block}.p-clinic-picker{width:100%;margin-top:18px}.p-clinic-tools{gap:7px;margin-bottom:18px}.p-clinic-tools .n-btn{flex:1 1 140px;font-size:11px;padding:9px}.p-sync-card{padding:19px 17px}.p-sync-card .n-heading{gap:12px;align-items:start;flex-wrap:wrap}.p-live-label{font-size:10px}.p-sync-counts{gap:22px}.p-settings .n-heading{display:block}.p-settings .n-heading>.n-actions{margin-top:13px}.p-sync-new .n-btn{margin:9px 0 0;display:block}.p-clinic-workspace .n-filter .field:first-of-type{min-width:0}}
/* Consultation doctor selection */
.c-pick-doctors{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px}.c-pick-doctor{border:1px solid #dce5ec;border-radius:14px;padding:22px;text-align:center;background:#fff}.c-pick-doctor.selected{border-color:#198f84;box-shadow:0 0 0 2px #198f8420;background:#f0faf7}.c-pick-doctor .avatar{margin:0 auto 14px;width:84px;height:84px}.c-pick-doctor h3{font-size:18px;margin:0 0 8px}.c-pick-doctor p{font-size:13px;color:#627886;min-height:36px}.c-pick-doctor .btn{width:100%;margin-top:14px}
/* Clinic archive: fixed workspace, independently scrolling table. */

/* Full-width clinic workspace: normal type, status cards above the scrollable archive. */
body.p-archive-page{overflow:hidden}
.p-archive-page .d-shell{height:100dvh;min-height:0;overflow:hidden}
.p-archive-page .dashboard-main{min-height:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.p-archive-page .dashboard-top{height:64px;min-height:64px;flex:none}
.p-archive-page .d-content{flex:1;min-height:0;overflow:hidden;padding:20px 32px;width:100%;max-width:none;margin:0}
.p-clinic-workspace{height:100%;width:100%;max-width:none;margin:0;display:flex;flex-direction:column;min-height:0;font-size:14px}
.p-clinic-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:16px;flex:none}
.p-clinic-identity{min-width:0}.p-clinic-back{display:inline-block;font-size:14px;margin-bottom:8px;color:#527584}
.p-clinic-title{display:flex;flex-wrap:wrap;align-items:center;gap:12px}.p-clinic-title h1{margin:0;line-height:1.25}.p-clinic-title .n-badge{font-size:13px}.p-clinic-code{font-size:14px;margin:0;color:#667c87}
.p-clinic-picker{flex:none;width:240px;display:grid;gap:6px;margin:0;font-size:14px}.p-clinic-picker select{min-height:40px;padding:8px 12px;font-size:14px}
.p-clinic-tools{margin:0 0 16px;gap:8px;flex:none}.p-clinic-tools .n-btn{min-height:38px;padding:8px 13px;font-size:14px}
.p-sync-card{flex:none;padding:0;border:0;background:none;margin:0 0 16px}.p-sync-card>.n-heading{margin:0 0 10px}.p-sync-card>.n-heading .eyebrow{display:none}.p-sync-card h2{font-size:19px;margin:0}.p-live-label{font-size:13px;padding:5px 10px}
.p-sync-panels{display:flex;gap:12px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}.p-sync-bridge,.p-sync-storage{flex:1 0 280px;min-width:0;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:10px;background:#fff;border:1px solid #dce7ec;border-radius:12px;padding:14px 16px}
.p-sync-bridge{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;gap:10px 16px}.p-sync-bridge .p-sync-counts{align-self:center}.p-sync-name{gap:12px}.p-sync-name strong{font-size:15px;display:block}.p-sync-name span:not(.p-sync-dot){display:block;font-size:14px;margin:3px 0 0}.p-sync-counts{display:flex;gap:22px;font-size:14px}.p-sync-counts b{display:inline;font-size:20px;margin-right:4px}.p-sync-seen{font-size:13px;flex-basis:auto;margin-top:auto;grid-column:1/-1}.p-sync-footer{font-size:13px;padding:0;margin:8px 0 0;border:0}.p-sync-progress{font-size:14px;flex-basis:auto;grid-column:1/-1}.p-sync-progress small{font-size:13px}.p-sync-storage{display:grid;grid-template-columns:1fr auto;gap:8px 14px;align-content:start}.p-sync-storage>strong{font-size:15px;align-self:center}.p-sync-storage progress{grid-column:1/-1}.p-sync-storage>span{font-size:14px;color:#587583}.p-sync-storage progress{height:6px;width:100%;accent-color:#158b80;margin-top:auto}.p-sync-empty p{font-size:14px;color:#667c87;margin:0}.p-sync-new{margin-top:10px;font-size:14px}
.p-archive{display:flex;flex-direction:column;flex:1;min-height:0;padding:16px!important;margin:0!important}.p-archive>.n-heading{margin-bottom:12px;flex:none}.p-archive>.n-heading .eyebrow,.p-archive>.n-note{display:none}.p-archive>.n-heading h2{font-size:19px;margin:0!important}.p-archive .n-filter{flex:none;gap:10px;margin:0 0 12px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.p-archive .n-filter .field{font-size:13px;margin:0;min-width:120px;flex:1}.p-archive .n-filter .field:first-of-type{min-width:220px;flex:2}.p-archive .n-filter input,.p-archive .n-filter select{font-size:14px;padding:8px 10px;min-height:40px;min-width:0;width:100%}.p-archive .n-btn{min-height:36px;padding:8px 12px;font-size:14px}.p-archive>.n-table-wrap{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.p-archive .n-table{font-size:14px;min-width:720px}.p-archive thead th{position:sticky;top:0;background:#eef4f7;z-index:1;font-size:13px}.p-archive .n-table td{padding:12px 14px}.p-archive .n-table small{font-size:13px}.p-settings .n-btn.red{background:#fff1f1;color:#aa313b;border:1px solid #efc6ca}
#c-details{scroll-margin-top:100px;outline:none}#c-details:focus-visible{outline:2px solid #158b80;outline-offset:3px}.c-advisory button{margin-top:12px}
@media(max-width:800px){.p-archive-page .d-content{padding:14px 16px}.p-clinic-header{gap:16px;margin-bottom:12px}.p-clinic-title{gap:8px}.p-clinic-picker{width:180px}.p-clinic-tools{flex-wrap:nowrap;overflow-x:auto;margin-bottom:12px}.p-clinic-tools .n-btn{flex:none}.p-sync-card{margin-bottom:12px}.p-sync-card>.n-heading{flex-direction:row;align-items:center}.p-live-label{display:none}.p-sync-bridge,.p-sync-storage{flex-basis:270px}.p-sync-footer>span:last-child{display:none}.p-archive>.n-heading{flex-direction:row;align-items:center}.p-archive .n-filter .field{flex:none}.p-archive{padding:12px!important}}
@media(max-width:520px){.p-clinic-header{align-items:start}.p-clinic-picker{width:145px}.p-clinic-title .n-badge,.p-clinic-code{font-size:13px}.p-clinic-title h1{font-size:24px!important}.p-archive-page .dashboard-top{padding:12px 16px}}

@media(max-width:1100px){.p-sync-bridge,.p-sync-storage{grid-template-columns:1fr}.p-sync-storage progress{grid-column:auto}.p-sync-seen{grid-column:auto}}
/* Doctor workspace summaries share the site's type scale and stay above the table. */
.p-clinic-overview{display:grid;grid-template-columns:minmax(250px,1.1fr) minmax(240px,1fr) minmax(280px,1.2fr);gap:12px;margin-bottom:12px;flex:none}
.p-clinic-summary,.p-clinic-controls,.p-clinic-sync-heading{background:#fff;border:1px solid #d8e5ed;border-radius:12px;padding:14px 16px;min-width:0}
.p-clinic-overview .p-clinic-back{margin:0 0 6px;font-size:14px}
.p-clinic-overview .p-clinic-title{gap:10px;align-items:center;margin:0 0 3px}
.p-clinic-overview .p-clinic-title h1{font-size:22px!important;margin:0;line-height:1.25}
.p-clinic-overview .p-clinic-code{font-size:13px;color:#738a99}
.p-clinic-controls{display:flex;align-items:center;gap:12px}
.p-clinic-overview .p-clinic-picker{flex:1;width:auto;min-width:0;margin:0;font-size:14px}
.p-clinic-controls>.n-btn{flex:none;align-self:end;height:42px}
.p-clinic-sync-heading{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.p-clinic-sync-heading>div{flex:1;min-width:170px}
.p-clinic-sync-heading h2{font-size:17px;margin:0 0 5px;line-height:1.3}
.p-clinic-sync-heading .p-live-label{border:0;background:none;padding:0;font-size:13px;white-space:normal;display:block}
.p-sync-symbol{display:grid;place-items:center;color:#087f78;width:36px;height:36px;background:#e5f5f1;border-radius:10px;flex:none}
.p-clinic-sync-heading>.n-btn{margin-left:auto}
.p-settings-menu{display:grid;gap:10px}.p-settings-menu>.n-btn{text-align:left;justify-content:flex-start;min-height:44px}
.p-archive .p-archive-hint{font-size:13px;font-weight:400;color:#738a99;margin-left:12px;white-space:nowrap}
.p-sync-card .p-sync-panels[aria-busy=true]>article{min-height:100px}
.d-overview-cards,.d-earnings-page .a-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}
.d-overview-card,.d-earnings-page .a-stat{margin:0;min-width:0;padding:20px 22px;border:1px solid #d8e5ed;border-radius:14px;display:flex;flex-direction:column;gap:10px;background:#fff;box-shadow:0 3px 16px #173e5310}
.d-overview-card>span,.d-earnings-page .a-stat>span{font-size:14px;color:#647e8e}
.d-overview-card>strong,.d-earnings-page .a-stat>strong{font-size:28px;line-height:1.2;color:#153e4b;font-weight:700}
.d-overview-card:first-child,.d-earnings-page .a-stat:first-child{background:#087f78;border-color:#087f78}
.d-overview-card:first-child>span,.d-earnings-page .a-stat:first-child>span,.d-earnings-page .a-stat:first-child>small{color:#dbf4f0}
.d-overview-card:first-child>strong,.d-earnings-page .a-stat:first-child>strong{color:white}
.d-earnings-page .a-stat>small{font-size:13px;color:#738a99}
.d-cases-panel{padding:22px;margin:0}.d-case-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;margin-bottom:20px}
.d-case-filters .field{margin:0}.d-cases-table small{display:block;color:#738a99;margin-top:5px;font-size:13px}
.d-cases-table td{font-size:14px;vertical-align:middle}.d-cases-table td:last-child{width:1%;white-space:nowrap}
.d-cases-table [hidden]{display:none!important}.d-earnings-page .a-filter{padding:20px 22px;border-radius:14px}
.d-earnings-page .a-filter form{display:flex;gap:14px;align-items:end;flex-wrap:wrap}
.d-earnings-page .a-filter .field{flex:1;min-width:160px;margin:0}
.d-earnings-page .a-filter .button-row{margin-top:14px;gap:8px;display:flex;flex-wrap:wrap}
.d-earnings-page .a-explanation{font-size:13px;line-height:1.65;color:#6d8290;margin:16px 0}
.d-earnings-page>.card:last-child{padding:22px;border-radius:14px}.d-earnings-page>.card>h2{font-size:19px;margin-bottom:18px}
@media(max-width:1200px){.p-clinic-overview{grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(240px,1fr)}.p-clinic-controls{align-items:stretch;flex-direction:column;gap:8px}.p-clinic-controls>.n-btn{height:34px;align-self:stretch}.p-clinic-sync-heading>.n-btn{height:34px}.d-overview-cards,.d-earnings-page .a-stats{gap:12px}.d-overview-card,.d-earnings-page .a-stat{padding:18px}}
@media(max-width:800px){.p-clinic-overview{display:flex;overflow-x:auto;gap:10px}.p-clinic-overview>section{flex:1 0 240px;padding:12px}.p-clinic-overview .p-clinic-title h1{font-size:20px!important}.p-archive .p-archive-hint{display:none}.d-overview-cards,.d-earnings-page .a-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.d-case-filters{grid-template-columns:1fr 1fr}.d-case-filters>.field:first-child{grid-column:1/-1}}

.d-earnings-page .a-stat:last-child>strong{font-size:22px}.p-clinic-controls{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}.p-clinic-controls>.n-btn{justify-self:end;height:34px}.p-clinic-controls .p-clinic-picker{width:100%}

/* Compact clinical workspace: two combined cards, normal readable controls. */
.d-shell{font-size:13px}.d-shell .d-content h1{font-size:24px!important}.d-shell .field input,.d-shell .field select,.d-shell .field textarea{font-size:13px}.d-shell .btn,.d-shell .n-btn{font-size:13px}.d-shell .n-table,.d-shell .n-table th,.d-shell .n-table td,.d-cases-table td{font-size:13px}
.p-clinic-overview.p-clinic-compact{grid-template-columns:minmax(350px,.9fr) minmax(450px,1.2fr);gap:12px;margin-bottom:12px}
.p-clinic-compact>section{margin:0;padding:12px 14px;border-radius:12px;min-width:0;background:#fff;border:1px solid #d9e5eb;box-shadow:0 3px 14px #173e5306}
.p-clinic-identity{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px}.p-identity-title{min-width:0}.p-clinic-compact .p-clinic-title h1{font-size:21px!important;margin:5px 0}.p-clinic-compact .p-clinic-code{font-size:12px}.p-clinic-back{font-size:13px}
.p-clinic-choice{display:grid;gap:8px;flex:1;min-width:220px;max-width:340px}.p-clinic-choice select{width:100%;height:36px;border:1px solid #d3e2e9;border-radius:7px;padding:0 10px;background:white;font-size:13px}.p-clinic-choice .n-actions{gap:6px;justify-content:flex-end}
.p-sync-combined-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}.p-sync-combined-heading>strong{font-size:14px}.p-sync-combined-heading .p-live-label{font-size:11px;border:0;background:none;padding:0;color:#6d8392;white-space:normal;text-align:right}
.p-sync-combined .p-sync-panels{display:grid;grid-template-columns:1.1fr 1fr;gap:12px;margin:0}.p-sync-combined .p-sync-panels>article{border:0;box-shadow:none;border-radius:0;background:none;padding:0;min-height:0;margin:0;display:flex;flex-direction:column;align-items:stretch;gap:5px}
.p-sync-combined .p-sync-storage{border-left:1px solid #e0eaef!important;padding-left:12px!important}.p-sync-combined .p-sync-name strong,.p-sync-combined .p-sync-storage>strong{font-size:13px}.p-sync-combined .p-sync-name span,.p-sync-combined .p-sync-storage>span{font-size:12px}.p-sync-combined .p-sync-counts{gap:12px;justify-content:flex-start;flex-wrap:wrap}.p-sync-combined .p-sync-counts b{font-size:18px}.p-sync-combined .p-sync-counts span{font-size:12px}.p-sync-combined .p-sync-seen{font-size:11px;margin:0}.p-sync-combined progress{height:5px}.p-sync-combined .p-sync-panels[aria-busy=true]>article{min-height:82px}
.p-archive .n-heading{margin-bottom:12px;gap:8px}.p-archive .n-heading h2{font-size:18px;margin:0}.p-archive-refresh{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}.p-archive .p-archive-hint{margin:0;font-size:11px}.p-archive-refresh .p-sync-new{margin:0;padding:4px 7px;font-size:12px;background:#e3f5ed;border:0}.p-archive-refresh [hidden]{display:none!important}
.p-archive .n-filter.p-inline-filters{display:grid;grid-template-columns:minmax(150px,1.5fr) repeat(2,minmax(120px,1fr)) repeat(2,minmax(105px,1fr)) auto auto;gap:8px;margin-bottom:12px;overflow:visible}.p-archive .p-inline-filters input,.p-archive .p-inline-filters select{width:100%;min-width:0;height:36px;min-height:36px;font-size:13px;padding:6px 8px}.p-archive .p-inline-filters .n-btn{min-height:36px;padding:6px 8px;font-size:12px}
.p-clinic-list-tools{justify-content:flex-end;margin-bottom:14px}.p-clinic-card-badges{display:flex;justify-content:space-between;align-items:center;gap:10px}.p-new-patients{display:inline-flex;align-items:center;gap:8px;border-radius:7px;background:#dff5eb;color:#126549;padding:5px 9px;font-size:12px}.p-new-patients b{border-radius:5px;background:#087f78;color:white;min-width:23px;text-align:center;padding:1px 4px}
.d-list-tools{display:flex;justify-content:flex-end;margin:0 0 10px}.d-overview-cards{gap:12px;margin-bottom:14px}.d-overview-card{flex-direction:row;align-items:center;justify-content:space-between;padding:14px 16px}.d-overview-card>span{font-size:13px}.d-overview-card>strong{font-size:24px}.d-cases-panel{padding:16px}.d-case-filters{margin-bottom:12px;gap:12px}.c-row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.c-row-actions .btn{height:34px;padding:6px 9px;font-size:12px;white-space:nowrap;border:0}.c-view-action{background:#e7efff;color:#2b5d9b}.c-zip-action{background:#f1f4f6;color:#4d6270}.c-report-action{background:#e2f5ed;color:#13775b}
.c-report-workspace{width:100%;max-width:none}.d-content:has(.c-report-workspace){max-width:none}.c-report-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:10px}.c-report-top>strong{font-size:19px}.c-report-top>.btn{margin-left:auto}.c-report-patient{padding:10px 14px;background:#eaf3f5;border-radius:9px;font-size:13px}.c-report-patient summary{cursor:pointer}.c-report-patient p{white-space:pre-wrap;line-height:1.6}.c-report-workspace .c-report{margin-top:12px}.c-report>.c-flex{padding:12px 16px}.c-report>.c-flex h2{font-size:17px}.c-report-actions{padding:12px 16px;gap:8px;flex-wrap:wrap}.rte-template-row{display:flex;align-items:center;gap:14px;padding:10px 16px;border-top:1px solid #deeaef}.rte-template-row select{flex:1;min-width:0;height:36px;border:1px solid #d3e0e6;border-radius:7px;padding:0 10px;background:white;font-size:13px}.rte-template-row a{white-space:nowrap;font-size:13px}
.rte-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:5px;padding:10px 12px;background:#f3f7fa;border-block:1px solid #dce7ee}.rte-toolbar button,.rte-toolbar select,.rte-import{height:32px;min-width:30px;padding:4px 8px;background:white;border:1px solid #d3e0e8;border-radius:5px;color:#345465;font-size:12px;line-height:22px}.rte-toolbar button{cursor:pointer}.rte-toolbar button:hover,.rte-toolbar button.is-active{background:#dff2ed;border-color:#77b7aa;color:#086e62}.rte-toolbar input[type=color]{height:32px;width:32px;padding:3px;border:1px solid #d3e0e8;border-radius:5px;background:white}.rte-import{cursor:pointer;position:relative;overflow:hidden;color:#087f78;font-weight:600}.rte-import input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.rte-import-hint{display:block;font-size:11px;color:#768b99;padding:5px 16px;background:#f7fafb}
.rte-workbench #c-report-editor,.rte-workbench #p-report-editor{padding:24px 32px;min-height:52vh;line-height:1.6;font-size:14px;background:white}.rte-workbench .ProseMirror{min-height:48vh;outline:0;font:14px/1.6 Arial,sans-serif}.rte-workbench table{border-collapse:collapse;width:100%}.rte-workbench th,.rte-workbench td{border:1px solid #aebfc8;padding:7px;position:relative}.rte-workbench .selectedCell{background:#e0f2ed}.rte-print-frame{position:fixed;width:1px;height:1px;bottom:0;right:0;border:0}.c-report .report-paper{padding:24px 32px}
@media(max-width:1200px){.p-clinic-overview.p-clinic-compact{grid-template-columns:minmax(300px,1fr) minmax(390px,1.2fr)}.p-clinic-choice{max-width:none}.p-archive .n-filter.p-inline-filters{grid-template-columns:minmax(190px,1.6fr) repeat(2,minmax(125px,1fr)) repeat(2,minmax(120px,1fr))}.p-inline-filters .n-btn{grid-row:2}.p-inline-filters .n-btn:first-of-type{grid-column:4}.p-inline-filters .n-btn:last-of-type{grid-column:5}.c-row-actions{max-width:300px}}
@media(max-width:800px){.p-clinic-overview.p-clinic-compact{display:grid;grid-template-columns:1fr;overflow:visible}.p-clinic-compact>section{width:100%}.p-archive .n-filter.p-inline-filters{grid-template-columns:1fr 1fr}.p-inline-filters>.p-search-input{grid-column:1/-1}.p-inline-filters .n-btn{grid-row:auto!important;grid-column:auto!important}.p-sync-combined-heading .p-live-label{max-width:180px}.p-archive .p-archive-hint{display:none}.p-sync-combined .p-sync-counts b{font-size:16px}.rte-workbench #c-report-editor,.rte-workbench #p-report-editor{padding:18px}.c-report-top>strong{font-size:17px}.d-overview-card{padding:12px;flex-direction:column;align-items:flex-start}.rte-template-row{padding:10px}.c-report-actions .btn{flex:1}}

.p-new-patients[hidden]{display:none!important}

.p-clinic-compact .p-clinic-choice{display:flex;align-items:center;width:100%;max-width:none;min-width:0;gap:6px}.p-clinic-choice select{flex:1;min-width:85px}.p-clinic-choice .n-actions{flex:none;flex-wrap:nowrap}.p-clinic-choice .n-btn{padding:6px 8px;font-size:12px;min-height:34px}
.p-clinic-compact .p-clinic-identity{display:grid;grid-template-columns:minmax(0,1fr);align-content:space-between;gap:8px}.p-clinic-identity .p-clinic-choice{flex:none}
@media(max-width:800px){body.p-archive-page{height:auto;overflow:auto}.p-archive-page .d-shell,.p-archive-page .dashboard-main{height:auto;min-height:100vh;overflow:visible}.p-archive-page .d-content{height:auto;overflow:visible}.p-clinic-workspace{height:auto}.p-archive{min-height:420px;max-height:65vh}.p-clinic-compact .p-sync-combined{align-self:start}.p-sync-combined .p-sync-panels>article{flex-basis:auto}.p-clinic-identity .p-clinic-choice{flex-wrap:wrap}.p-clinic-choice select{min-width:100px}}
