:root{--ink:#18231f;--muted:#7a8781;--line:#e6e9e4;--paper:#fff;--canvas:#f4f6f2;--green:#185a48;--green-dark:#104535;--mint:#e9f4ed;--lime:#d5ee6e;--amber:#c68139;--navy:#16251e;--shadow:0 10px 32px rgba(31,52,42,.06);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--canvas);font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:360px;min-height:100vh;background:var(--canvas)}button,input,textarea,select{font:inherit}button{cursor:pointer}.topbar{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 24px;gap:22px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font:800 22px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-1.2px}.brand-mark{background:var(--green);color:#fff;width:30px;height:30px;border-radius:9px;display:grid;place-items:center;font-size:19px;letter-spacing:-1px}.brand-dot{color:#8cad4c}.workspace-label{border-left:1px solid var(--line);padding-left:21px;display:grid;gap:2px;color:#5e6a63;font-size:13px}.workspace-kicker,.eyebrow{font:700 10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:1.3px;color:#93a098;margin:0}.topbar-spacer{flex:1}.connection{font-size:12px;color:#5a6b60;display:flex;align-items:center;gap:7px;padding:8px 11px;background:#f2f7f2;border-radius:30px}.status-dot{width:7px;height:7px;border-radius:50%;background:#49a16c;box-shadow:0 0 0 3px #e0f1e5}.connection.error{color:#9d4545;background:#fff1ef}.connection.error .status-dot{background:#da716a;box-shadow:0 0 0 3px #ffe0dc}.connection.pending .status-dot{background:#d4aa54;box-shadow:0 0 0 3px #f9f0dd}.header-action{font-size:12px;color:#476356;text-decoration:none;padding:9px 12px;border:1px solid #dce5dd;border-radius:7px}.header-action:hover{background:#f4f8f4}.app-shell{height:calc(100vh - 70px);min-height:640px;display:grid;grid-template-columns:290px minmax(430px,1fr) 350px;gap:0;max-width:1920px;margin:0 auto}.studies-panel{background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;padding:23px 15px 16px}.panel-heading{display:flex;justify-content:space-between;align-items:flex-end;padding:0 7px 18px}.panel-heading h1{font:700 21px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.6px;margin:5px 0 0}.count-pill{font-size:11px;color:#537062;background:#edf4ee;border-radius:20px;padding:5px 9px;margin-bottom:2px}.search-box{height:38px;display:flex;align-items:center;gap:8px;border:1px solid #e5e9e4;border-radius:7px;padding:0 9px;color:#849087;background:#fbfcfa}.search-box:focus-within{border-color:#9eb9a8;box-shadow:0 0 0 3px #e8f1eb}.search-icon{font-size:21px;line-height:1;transform:rotate(-20deg)}.search-box input{border:0;outline:0;background:transparent;width:100%;min-width:0;color:var(--ink);font-size:12px}.search-box input::placeholder{color:#a0aaa3}.search-box kbd{white-space:nowrap;font:10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#9ca69f;background:#f1f3f0;border:1px solid #e8ebe6;border-radius:4px;padding:3px 5px}.list-caption{display:flex;align-items:center;justify-content:space-between;padding:20px 7px 9px;color:#96a098;font:600 10px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.8px;text-transform:uppercase}.icon-button{border:0;background:transparent;color:#718177;font-size:18px;width:25px;height:25px;border-radius:5px}.icon-button:hover{background:#edf3ed;color:var(--green)}.study-list{overflow:auto;min-height:0;flex:1;padding:0 1px}.study-row{padding:11px 10px 10px;border-radius:7px;cursor:pointer;border:1px solid transparent;margin-bottom:3px;transition:background .15s,border .15s}.study-row:hover{background:#f8faf7}.study-row.active{background:#eef5ef;border-color:#dce9de}.study-top{display:flex;align-items:center;justify-content:space-between;gap:6px}.study-patient{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:700;color:#2b3932}.study-modality{font-size:9px;font-weight:700;letter-spacing:.5px;color:#64806c;border:1px solid #dce7dd;border-radius:4px;padding:3px 5px;flex-shrink:0}.study-description{font-size:11px;color:#66736a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:5px 0}.study-sub{display:flex;gap:7px;font-size:10px;color:#9aa49d}.study-sub span+span:before{content:'·';margin-right:7px;color:#c2cac4}.list-empty{padding:30px 11px;color:#89958d;font-size:12px;line-height:1.6}.skeleton-row{height:58px;border-radius:7px;margin:5px 0;background:linear-gradient(90deg,#f3f5f1,#fafbf9,#f3f5f1);background-size:200% 100%;animation:shimmer 1.3s linear infinite}@keyframes shimmer{to{background-position:-200% 0}}.privacy-note{border-top:1px solid #edf0ec;padding:13px 6px 0;display:flex;align-items:center;gap:8px;color:#9aa49d;font-size:10px}.lock-icon{font-size:15px;color:#789280}.exam-workspace{min-width:0;min-height:0;overflow:auto;padding:22px 22px 28px}.empty-state{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:36px 12% 80px}.empty-icon{width:58px;height:58px;border-radius:19px;background:#e9f1e9;display:grid;place-items:center;color:#54816b;font-size:26px;margin-bottom:22px}.empty-state .eyebrow{margin-bottom:9px}.empty-state h2{font:700 23px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.7px;margin:0 0 9px}.empty-state>p:not(.eyebrow){max-width:340px;color:#819087;font-size:13px;line-height:1.65;margin:0}.empty-shortcuts{display:flex;gap:16px;flex-wrap:wrap;justify-content:center;margin-top:30px;color:#86918a;font-size:10px}.empty-shortcuts span{display:flex;align-items:center;gap:6px}.empty-shortcuts b{width:17px;height:17px;border-radius:50%;background:#fff;border:1px solid #e0e7e0;color:#62816d;display:grid;place-items:center;font-size:9px}.workspace.hidden,.hidden{display:none!important}.exam-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 18px}.exam-kicker{display:flex;align-items:center;gap:7px;color:#829087;font-size:11px;margin-bottom:7px}.exam-status-dot{width:6px;height:6px;background:#67a279;border-radius:50%}.bullet{color:#b8c0ba}.exam-heading-copy h2{font:700 20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.5px;margin:0 0 4px}.exam-patient{font-size:12px;color:#69776e;margin:0}.exam-actions{display:flex;gap:8px}.button{border:1px solid transparent;border-radius:6px;padding:9px 12px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:600;white-space:nowrap;transition:background .15s,border .15s}.button-secondary{background:#fff;border-color:#e0e6e1;color:#526258}.button-secondary:hover{background:#f7faf7;border-color:#cdd9d0}.button-primary{background:var(--green);color:#fff}.button-primary:hover{background:var(--green-dark)}.viewer-card{background:#fff;border:1px solid #e6eae5;border-radius:9px;box-shadow:var(--shadow);overflow:hidden}.viewer-toolbar{height:46px;display:flex;align-items:center;padding:0 13px;border-bottom:1px solid #edf0ec;gap:14px}.series-select-wrap{display:flex;align-items:center;gap:9px;min-width:0}.toolbar-label{font-size:9px;letter-spacing:1px;color:#9aa49d;font-weight:700}.series-select-wrap select{border:0;outline:0;background:transparent;color:#526359;font-size:11px;max-width:230px}.image-counter{font-size:10px;color:#98a29b;margin-left:auto}.viewer-tools{display:flex;gap:4px}.viewer-button{width:25px;height:25px;background:#f5f7f4;border:1px solid #e8ece7;border-radius:5px;color:#65756a;font-size:18px;line-height:1}.viewer-button:hover:not(:disabled){background:#eaf2eb;color:var(--green)}.viewer-button:disabled{opacity:.35;cursor:default}.image-stage{height:min(48vh,470px);min-height:250px;background:#101412;display:grid;place-items:center;position:relative;overflow:hidden}.preview{max-width:100%;max-height:100%;object-fit:contain;image-rendering:auto}.image-placeholder{color:#738078;text-align:center;font-size:11px;max-width:250px;padding:20px}.image-placeholder span{display:block;font-size:32px;color:#3b4a41;margin-bottom:11px}.viewer-footer{min-height:34px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px}.preview-warning{color:#a0774e;font-size:9px;display:flex;align-items:center;gap:5px}.series-meta{font-size:9px;color:#a0aaa3}.study-meta-row{display:flex;gap:20px;flex-wrap:wrap;margin:14px 2px;color:#a0aaa3;font-size:10px}.study-meta-row b{color:#68776e;font-weight:500;margin-left:4px}.report-panel{background:#fff;border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0;padding:22px 18px 15px}.report-heading{display:flex;align-items:flex-end;justify-content:space-between;padding-bottom:15px;border-bottom:1px solid #edf0ec}.report-heading h2{font:700 17px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.4px;margin:5px 0 0}.draft-indicator{display:flex;align-items:center;gap:6px;color:#9a8a70;font-size:9px;white-space:nowrap}.draft-indicator span{width:6px;height:6px;border-radius:50%;background:#d2ad69}.report-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px 18px;color:#939e96}.report-empty-icon{width:37px;height:37px;border-radius:12px;background:#f0f5ef;display:grid;place-items:center;color:#7c9a82;font-size:18px;margin-bottom:12px}.report-empty p{font-size:11px;line-height:1.6;margin:0;max-width:230px}.report-form{overflow:auto;min-height:0;flex:1}.patient-summary{margin:14px 0 13px;padding:10px;background:#f6f8f5;border:1px solid #edf0eb;border-radius:7px;display:flex;align-items:center;gap:9px;min-width:0}.patient-avatar{width:29px;height:29px;flex-shrink:0;border-radius:9px;background:#e4eee4;color:#5c8067;display:grid;place-items:center;font-size:12px;font-weight:700}.patient-summary>div{display:grid;gap:3px;min-width:0;flex:1}.patient-summary b{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.patient-summary>div span{font-size:9px;color:#929d95}.copy-button{border:0;background:transparent;color:#87968b;font-size:16px}.report-fields{display:grid;gap:11px}.field{display:grid;gap:5px}.field>span{font-size:10px;font-weight:700;color:#66756b}.field textarea,.field input{width:100%;border:1px solid #e6ebe6;border-radius:5px;background:#fcfdfb;outline:0;resize:vertical;padding:8px 9px;color:#34443a;font-size:11px;line-height:1.5;min-height:34px}.field textarea::placeholder,.field input::placeholder{color:#b0b8b2}.field textarea:focus,.field input:focus{border-color:#a7c0ad;box-shadow:0 0 0 2px #edf4ee}.draft-note{font-size:9px;line-height:1.5;color:#9aa49d;margin:12px 0}.report-actions{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:11px}.medical-note{border-top:1px solid #edf0ec;padding:12px 1px 0;display:flex;align-items:flex-start;gap:7px;color:#949f97;font-size:9px;line-height:1.5}.note-icon{color:#96a984;font-size:12px}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,12px);background:#1c2c23;color:#fff;border-radius:7px;padding:10px 14px;font-size:11px;box-shadow:0 9px 30px rgba(0,0,0,.18);opacity:0;pointer-events:none;transition:all .2s;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}

@media(max-width:1180px){.app-shell{grid-template-columns:250px minmax(360px,1fr) 320px}.exam-workspace{padding:19px 16px}.report-panel{padding:20px 14px}.studies-panel{padding-left:12px;padding-right:12px}.study-patient{font-size:11px}}
@media(max-width:950px){.app-shell{height:auto;min-height:calc(100vh - 70px);grid-template-columns:250px minmax(0,1fr)}.report-panel{grid-column:2;border-left:0;border-top:1px solid var(--line);min-height:500px}.exam-workspace{min-height:560px}.studies-panel{grid-row:1 / span 2}.image-stage{height:45vh}.report-empty{min-height:160px}}
@media(max-width:640px){.topbar{height:60px;padding:0 13px;gap:11px}.workspace-label{display:none}.header-action{font-size:0;padding:8px 10px}.header-action span{font-size:14px}.connection{font-size:10px;padding:7px 9px}.app-shell{height:auto;min-height:calc(100vh - 60px);display:flex;flex-direction:column}.studies-panel{height:300px;border-right:0;border-bottom:1px solid var(--line);padding:16px 13px 10px}.panel-heading{padding-bottom:11px}.panel-heading h1{font-size:19px}.list-caption{padding-top:11px}.study-list{max-height:155px}.privacy-note{display:none}.exam-workspace{min-height:450px;padding:18px 13px}.exam-header{align-items:flex-start}.exam-heading-copy h2{font-size:17px}.exam-actions .button{font-size:0;padding:9px 10px}.exam-actions .button span{font-size:15px}.image-stage{height:52vw;min-height:220px}.report-panel{min-height:540px;padding:17px 13px}.empty-state{min-height:380px;padding-bottom:20px}.empty-shortcuts{gap:10px}.study-meta-row{gap:10px}}
@media print{body{background:#fff}.topbar,.studies-panel,.exam-actions,.viewer-card,.study-meta-row,.report-empty,.medical-note,.draft-note,.report-actions,.report-heading .draft-indicator{display:none!important}.app-shell{display:block;height:auto;min-height:0}.exam-workspace{padding:0;overflow:visible}.exam-header{margin:0 0 18px}.report-panel{display:block;border:0;padding:15px 0;overflow:visible}.report-heading{border:0}.report-heading h2{font-size:21px}.report-form{display:block!important;overflow:visible}.patient-summary{background:#fff}.report-fields{gap:10px}.field textarea,.field input{border:0;border-bottom:1px solid #bbb;background:#fff;resize:none;padding-left:0;min-height:24px;color:#000}.field textarea::placeholder,.field input::placeholder{color:transparent}.field textarea{height:auto;overflow:visible}.empty-state{display:none!important}}

/* Account access and institution identity */
.auth-screen{min-height:100vh;background:radial-gradient(ellipse at 70% 16%,#e5efe4 0,transparent 36%),linear-gradient(145deg,#f6f8f4,#edf2ec);display:flex;align-items:center;justify-content:center;flex-direction:column;padding:30px 18px;position:relative}.auth-brand{position:absolute;top:30px;left:36px;display:flex;align-items:center;gap:11px}.auth-institution-name{font:700 16px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#33463a;letter-spacing:-.2px}.institution-logo-mark{width:40px;height:40px;border-radius:12px;background:var(--green);color:#fff;display:grid;place-items:center;font:700 20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow:hidden}.institution-logo-image{width:150px;height:56px;object-fit:contain;object-position:left center;border-radius:4px}.auth-brand .institution-logo-image{width:46px;height:46px;object-position:center;background:#fff;padding:3px}.auth-card{width:min(420px,100%);background:#fff;border:1px solid #e5eae4;border-radius:14px;padding:32px 35px 24px;box-shadow:0 20px 60px rgba(40,66,47,.1)}.auth-card-icon{width:38px;height:38px;background:#edf4ed;color:#47745a;border-radius:12px;display:grid;place-items:center;font-size:20px;margin-bottom:22px}.auth-card h1{font:700 24px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.8px;margin:6px 0 7px;color:#22342a}.auth-intro{color:#839087;font-size:12px;line-height:1.6;margin:0 0 23px}.auth-form{display:grid;gap:14px}.auth-form .field>span{font-size:11px}.auth-form .field input{font-size:13px;min-height:40px}.auth-form small,.form-grid small,.institution-form small{font-size:9px;font-weight:400;color:#9ca69f;margin-left:4px}.auth-submit{width:100%;min-height:42px;margin-top:3px;font-size:12px}.auth-submit span{margin-left:auto;font-size:16px}.auth-security{border-top:1px solid #edf0ec;margin:21px 0 0;padding-top:14px;display:flex;align-items:center;gap:7px;color:#98a39b;font-size:10px}.auth-security span{font-size:15px;color:#728b78}.auth-footer{position:absolute;bottom:20px;color:#a3ada5;font-size:10px;text-align:center}.form-error{font-size:11px;color:#a8443c;background:#fff1ef;border:1px solid #f6ddd8;border-radius:5px;padding:8px 9px;margin:0;line-height:1.45}.text-button{border:0;background:transparent;color:#64806e;text-decoration:underline;text-underline-offset:3px;font-size:10px;padding:5px;cursor:pointer}.auth-card>.text-button{display:block;margin:12px auto 0}.brand{max-width:260px;min-width:0}.brand>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.brand-logo-image{width:45px;height:36px;object-fit:contain;flex-shrink:0}.user-chip{display:grid;gap:2px;text-align:right;max-width:140px}.user-chip>span:first-child{font-size:11px;color:#4a5b50;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-role{font-size:9px;color:#8b998f}.logout-button{font-size:17px;border:1px solid #e8ece8}.patient-mode .app-shell{grid-template-columns:290px minmax(430px,1fr)}.patient-mode .report-panel{display:none}
.modal{position:fixed;inset:0;background:rgba(19,31,24,.48);z-index:30;display:grid;place-items:center;padding:22px}.modal-card{width:min(760px,100%);max-height:min(92vh,850px);overflow:auto;background:#fff;border-radius:12px;box-shadow:0 24px 90px rgba(10,26,16,.24);padding:22px 25px}.modal-heading{display:flex;justify-content:space-between;align-items:center}.modal-heading h2{font:700 20px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:-.5px;margin:4px 0 0}.modal-close{font-size:22px}.admin-tabs{display:flex;gap:18px;border-bottom:1px solid #e9ede8;margin-top:19px}.admin-tab{border:0;border-bottom:2px solid transparent;padding:10px 2px;color:#849087;background:transparent;font-size:11px}.admin-tab.active{border-color:var(--green);color:var(--green);font-weight:700}.admin-pane{padding-top:15px}.pane-description{font-size:11px;color:#818e85;margin:0 0 15px}.user-create-form{background:#f8faf7;border:1px solid #e9eee8;border-radius:8px;padding:13px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px 13px}.form-grid .field input,.institution-form .field input,.field select{width:100%;border:1px solid #e6ebe6;border-radius:5px;background:#fff;outline:0;padding:8px 9px;color:#34443a;font-size:11px;min-height:35px}.field select:focus,.form-grid .field input:focus,.institution-form .field input:focus{border-color:#a7c0ad;box-shadow:0 0 0 2px #edf4ee}.small-help{color:#89958d;font-size:9px;line-height:1.5;margin:9px 0}.user-create-form .button,.institution-form .button{min-height:34px}.users-table-wrap{overflow:auto;margin-top:16px}.users-table{width:100%;border-collapse:collapse;text-align:left;font-size:10px}.users-table th{font-size:9px;text-transform:uppercase;letter-spacing:.6px;color:#9aa49d;font-weight:700;padding:8px;border-bottom:1px solid #e8ece7}.users-table td{padding:9px 8px;border-bottom:1px solid #f0f2ef;color:#536157}.users-table td b{display:block;color:#35443a;font-size:10px;margin-bottom:3px}.users-table td small{color:#98a39b;font-size:9px}.status-active{color:#4f875c}.status-inactive{color:#b2675d}.table-action{border:0;background:transparent;color:#8f534a;font-size:9px;text-decoration:underline}.table-action.activate{color:#4f805c}.institution-form{display:grid;gap:14px;max-width:430px}.institution-form .field input[type=file]{padding:6px}.logo-preview-row{display:flex;align-items:center;gap:12px;border:1px dashed #dce5dc;border-radius:7px;padding:11px;color:#859188;font-size:10px}.logo-preview-row .institution-logo-mark,.logo-preview-row .institution-logo-image{width:90px;height:48px;border-radius:5px;object-position:center}.logo-preview-row .institution-logo-mark{font-size:17px}.logo-preview-row .text-button{margin-left:auto}.patient-mode .app-shell{grid-template-columns:290px minmax(430px,1fr)}
@media(max-width:950px){.patient-mode .app-shell{grid-template-columns:250px minmax(0,1fr)}}
@media(max-width:640px){.auth-brand{top:18px;left:18px}.auth-card{padding:27px 22px 21px}.auth-footer{position:static;margin:22px 0 0}.topbar{gap:7px}.topbar .connection{display:none}.user-chip{max-width:90px}.header-action{font-size:0}.topbar .header-action span{font-size:14px}.modal{padding:8px}.modal-card{max-height:96vh;padding:16px}.form-grid{grid-template-columns:1fr}.patient-mode .app-shell{display:flex}}

/* Search-first worklist */
.dashboard{max-width:1720px;margin:0 auto;padding:28px clamp(16px,3vw,46px) 24px;min-height:calc(100vh - 70px)}
.dashboard-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:20px}
.dashboard-heading h1{font-size:13px;font-weight:700;color:#36463b;letter-spacing:normal;margin:0 0 4px}.dashboard-heading p:not(.eyebrow){font-size:12px;color:#839087;margin:0}
.dashboard-actions{display:flex;align-items:center;gap:12px}.dashboard-actions .count-pill{font-size:11px;padding:8px 12px}
.filter-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:19px 20px 15px;box-shadow:var(--shadow)}
.filter-card-heading{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px;margin-bottom:15px;border-bottom:1px solid #edf0ec}.filter-card-heading>div{display:grid;gap:4px}.filter-card-heading b,.results-toolbar b{font-size:13px;color:#36463b}.filter-card-heading small{font-size:10px;color:#919c94}.filter-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:13px 16px}.filter-grid .field input,.filter-grid .field select{width:100%;min-width:0;border:1px solid #e2e8e2;border-radius:5px;background:#fcfdfb;outline:0;padding:9px 10px;color:#34443a;font-size:11px;min-height:36px}.filter-grid .field input:focus,.filter-grid .field select:focus{border-color:#a7c0ad;box-shadow:0 0 0 2px #edf4ee}.filter-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;border-top:1px solid #edf0ec;margin-top:15px;padding-top:13px}.filter-footer>span{font-size:9px;color:#929d95;line-height:1.5}.filter-footer .button{min-height:34px}
.results-toolbar{display:flex;justify-content:space-between;align-items:center;margin:24px 1px 10px}.results-toolbar>div{display:flex;align-items:baseline;gap:11px}.results-toolbar>div span{font-size:10px;color:#8b978f}.results-toolbar label{display:flex;align-items:center;gap:7px;color:#8b978f;font-size:10px}.results-toolbar select{border:1px solid #e1e7e1;background:#fff;color:#56665b;border-radius:5px;padding:5px 7px;font-size:10px}
.results-wrap{overflow:auto;border:1px solid #e3e8e2;border-radius:8px;background:#fff;box-shadow:var(--shadow)}.results-table{width:100%;min-width:1150px;border-collapse:collapse;text-align:left}.results-table th{position:sticky;top:0;background:#f6f8f5;color:#77847a;font-size:9px;text-transform:uppercase;letter-spacing:.45px;font-weight:700;padding:11px 10px;border-bottom:1px solid #e5eae4;white-space:nowrap}.results-table td{font-size:10px;color:#56645a;padding:10px;border-bottom:1px solid #eef1ed;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.results-table tbody tr:hover{background:#f7faf6}.results-table td[data-column="patientName"]{font-weight:650;color:#35443a}.results-table td[data-column="modality"]{font-weight:700;color:#66816c}.results-table td .button{font-size:9px;padding:6px 9px}.results-table td .result-report-link{color:#35674b;border-color:#dce8dd;text-decoration:none}.results-table td .result-report-link:hover{background:#edf5ee;border-color:#c7dbca}.results-table td.result-report-empty{color:#a0aaa3;font-size:9px}.results-empty{text-align:center!important;color:#95a097!important;padding:36px!important;font-weight:400!important}.pagination{display:flex;justify-content:space-between;align-items:center;padding:13px 2px;color:#89958d;font-size:10px}.pagination>div{display:flex;gap:7px}.pagination .button{font-size:10px;padding:7px 10px}.pagination .button:disabled{opacity:.45;cursor:default}.dashboard-footnote{font-size:9px;color:#9aa49d;margin:4px 0 0}
@media(max-width:900px){.filter-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}.dashboard{padding-top:19px}}
@media(max-width:520px){.dashboard-heading{align-items:flex-start;flex-direction:column}.dashboard-actions{width:100%;justify-content:space-between}.filter-grid{grid-template-columns:1fr 1fr;gap:11px}.filter-card{padding:14px}.filter-footer{align-items:flex-start;flex-direction:column}.filter-footer .button{width:100%}.filter-card-heading small{max-width:230px;line-height:1.4}.pagination{align-items:flex-start;gap:9px;flex-direction:column}}
@media print{.dashboard,.topbar,.back-to-dashboard{display:none!important}}
.results-tools{display:flex;align-items:center;gap:10px}.results-tools .button{font-size:10px;padding:7px 10px}
@media(max-width:520px){.results-tools{flex-wrap:wrap;justify-content:flex-end}}

/* Compact exam date picker */
.date-filter{position:relative;z-index:2;min-width:0;display:grid;grid-template-rows:auto 36px;align-content:start;gap:5px}
.date-filter.date-filter-open{z-index:8}
.date-filter-details{position:relative;min-width:0;height:36px}
.date-filter-details:not([open]) .date-filter-menu{display:none}
.date-filter>span{display:block;line-height:11px;margin:0}
.date-filter-trigger{list-style:none;cursor:pointer}
.date-filter-trigger::-webkit-details-marker{display:none}
.date-filter-trigger{width:100%;height:36px;min-height:36px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0;border:1px solid #e2e8e2;border-radius:5px;background:#fcfdfb;padding:8px 10px;color:#526359;text-align:left;font-size:11px;line-height:normal}
.date-filter-trigger:hover,.date-filter-trigger[aria-expanded="true"]{border-color:#a7c0ad;background:#fff}
.date-filter-icon{font-size:16px;color:#718778}
.date-filter-menu{position:absolute;top:calc(100% + 8px);left:0;width:min(540px,calc(100vw - 40px));display:grid;grid-template-columns:172px minmax(0,1fr);background:#fff;border:1px solid #e6ebe5;border-radius:10px;box-shadow:0 18px 48px rgba(27,46,35,.18);overflow:hidden;z-index:10}
.date-presets{display:flex;flex-direction:column;gap:4px;padding:15px 12px;background:#f7f9f6;border-right:1px solid #edf0ec}
.date-presets small{font-size:9px;letter-spacing:.65px;color:#9aa59d;font-weight:700;margin:1px 5px 7px}
.date-presets button{border:0;border-radius:5px;background:transparent;padding:8px 9px;text-align:left;color:#536258;font-size:11px}
.date-presets button:hover,.date-presets button:focus-visible{background:#eaf2eb;color:#285c43;outline:0}
.date-custom{min-width:0;padding:17px 16px 13px}
.date-custom>div:first-child{display:grid;gap:4px;margin-bottom:14px}
.date-custom>div:first-child b{font-size:12px;color:#3a4a3f}
.date-custom>div:first-child small{font-size:10px;color:#929d95}
.date-range-inputs{display:grid;grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr);align-items:end;gap:8px}
.date-range-inputs label{display:grid;gap:5px;color:#7d8980;font-size:10px}
.date-range-inputs input{width:100%;min-width:0;min-height:36px;border:1px solid #e2e8e2;border-radius:5px;background:#fff;padding:7px;color:#34443a;font-size:11px}
.date-range-inputs input:focus{outline:0;border-color:#a7c0ad;box-shadow:0 0 0 2px #edf4ee}
.date-range-inputs>span{text-align:center;color:#9ba69e;padding-bottom:10px;font-size:13px}
.date-menu-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:17px;padding-top:12px;border-top:1px solid #edf0ec}
.date-menu-actions .text-button{padding:7px 0;font-size:10px}
.date-menu-actions .button{min-height:32px;padding:7px 10px;font-size:10px}
.date-filter-error{margin:8px 0 0;color:#ac4c43;font-size:10px}
@media(max-width:520px){.date-filter-menu{grid-template-columns:130px minmax(0,1fr);width:min(500px,calc(100vw - 28px));left:0;transform:none}.date-presets{padding:13px 8px}.date-presets button{padding:8px 7px;font-size:10px}.date-custom{padding:14px 10px 11px}.date-range-inputs{gap:4px;grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr)}.date-range-inputs input{font-size:10px;padding:6px 4px}.date-menu-actions .button{padding:7px 8px}}

/* Compact search controls keep the results close to the top of the page. */
.filter-card{padding:13px 16px 11px}
.filter-card-heading{padding-bottom:9px;margin-bottom:11px}
.filter-main-grid{grid-template-columns:minmax(260px,1.8fr) minmax(125px,.72fr) minmax(180px,1fr) auto;align-items:end;gap:10px 12px}
.filter-main-grid .filter-submit{align-self:end;min-height:36px;padding:8px 13px;white-space:nowrap;font-size:11px}
.advanced-filters{margin-top:10px;padding-top:8px;border-top:1px solid #edf0ec}
.advanced-filters>summary{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;color:#496453;font-size:10px;font-weight:700;line-height:18px}
.advanced-filters>summary::-webkit-details-marker{display:none}
.advanced-filters>summary::after{content:'+';margin-left:auto;width:17px;height:17px;border:1px solid #e2e9e2;border-radius:50%;display:grid;place-items:center;color:#718778;font-size:13px;font-weight:400}
.advanced-filters[open]>summary::after{content:'−'}
.advanced-filters>summary span{color:#9aa49d;font-size:9px;font-weight:400}
.advanced-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:10px 14px;padding:11px 0 2px}
@media(max-width:900px){.filter-main-grid{grid-template-columns:minmax(0,1fr) minmax(130px,.7fr)}.advanced-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.filter-card{padding:12px}.filter-main-grid{grid-template-columns:1fr;gap:9px}.filter-main-grid .filter-submit{width:100%}.advanced-filters>summary span{display:none}.advanced-filter-grid{grid-template-columns:1fr;gap:9px}}

/* Report editor workspace */
.app-shell.study-mode{grid-template-columns:minmax(320px,.82fr) minmax(520px,1.18fr)}
.app-shell.study-mode .studies-panel{display:none}
.app-shell.study-mode .exam-workspace{grid-column:1}
.app-shell.study-mode .report-panel{grid-column:2;border-left:1px solid var(--line);padding:20px 22px 16px}
.study-mode .report-heading{align-items:center}
.study-mode .report-heading h2{font-size:20px}
.study-mode .report-form{overflow:auto;padding:0 2px 14px}
.study-mode .patient-summary{margin:11px 0;padding:9px 11px}
.exam-context-strip{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(120px,1fr) minmax(90px,.75fr);gap:8px;margin:0 0 13px;padding:10px 12px;background:#f6f8f5;border:1px solid #e9eee8;border-radius:7px}
.exam-context-strip>span{min-width:0;display:grid;gap:5px}.exam-context-strip small{font-size:8px;font-weight:700;letter-spacing:.65px;color:#9aa49d}.exam-context-strip b{font-size:10px;color:#4c5d51;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.editor-topline{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.editor-topline>div:first-child{display:grid;gap:4px}.editor-topline b{font-size:12px;color:#3c4c41}.editor-topline>div:first-child span{font-size:9px;color:#9aa49d}.template-tools{display:flex;align-items:center;gap:6px}.template-tools label{font-size:9px;color:#87938a}.template-tools select{max-width:170px;min-height:30px;padding:5px 7px;border:1px solid #e2e8e2;border-radius:5px;background:#fff;color:#526359;font-size:9px}.template-tools .button{font-size:9px;padding:7px 9px}
.editor-toolbar{display:flex;align-items:center;gap:4px;padding:6px 7px;background:#f4f6f3;border:1px solid #e1e6e0;border-bottom:0;border-radius:6px 6px 0 0}.editor-toolbar button{min-width:27px;height:25px;padding:2px 7px;border:1px solid transparent;border-radius:4px;background:transparent;color:#58675c;font-size:10px}.editor-toolbar button:hover{background:#fff;border-color:#dce4dc}.editor-toolbar>span{height:17px;border-left:1px solid #d8dfd8;margin:0 3px}
.report-editor{min-height:clamp(250px,36vh,520px);max-height:55vh;overflow:auto;border:1px solid #dfe6df;border-radius:0 0 6px 6px;background:#fff;padding:17px 19px;outline:0;color:#34443a;font-size:12px;line-height:1.7}.report-editor:focus{border-color:#a7c0ad;box-shadow:0 0 0 2px #edf4ee}.report-editor:empty:before{content:attr(data-placeholder);color:#a5afa7;pointer-events:none}.report-editor h3{font-size:11px;letter-spacing:.65px;color:#45614e;margin:15px 0 5px}.report-editor h3:first-child{margin-top:0}.report-editor p{margin:0 0 11px;min-height:1.4em}.report-editor ul,.report-editor ol{padding-left:22px}
.report-signature{display:grid;grid-template-columns:minmax(180px,.8fr) 1fr;align-items:end;gap:12px;margin-top:13px}.report-signature .field input{min-height:34px}.report-signature .draft-note{margin:0 0 9px}.study-mode .report-actions{padding-top:11px;margin-bottom:8px;border-top:1px solid #edf0ec}.study-mode .report-actions .button{min-height:34px}
@media(max-width:1050px){.app-shell.study-mode{grid-template-columns:minmax(280px,.8fr) minmax(440px,1.2fr)}.app-shell.study-mode .report-panel{padding:18px 14px}.report-editor{min-height:230px}}
@media(max-width:950px){.app-shell.study-mode{grid-template-columns:minmax(0,1fr)}.app-shell.study-mode .exam-workspace,.app-shell.study-mode .report-panel{grid-column:1}.app-shell.study-mode .report-panel{min-height:650px;border-left:0;border-top:1px solid var(--line)}}
@media(max-width:640px){.study-mode .report-panel{padding:15px 10px}.exam-context-strip{grid-template-columns:1fr 1fr}.exam-context-strip>span:first-child{grid-column:1/-1}.editor-topline{align-items:flex-start;flex-direction:column}.template-tools{width:100%}.template-tools select{flex:1;max-width:none}.report-signature{grid-template-columns:1fr}.report-editor{min-height:280px;max-height:none}.editor-toolbar{flex-wrap:wrap}}
@media print{.study-mode .editor-toolbar,.study-mode .template-tools,.study-mode .report-actions,.study-mode .report-signature .draft-note{display:none!important}.study-mode .report-panel{break-before:page}.study-mode .report-editor{max-height:none;overflow:visible;border:0;padding:0}.study-mode .report-form{overflow:visible}.exam-context-strip{background:#fff}}
.draft-indicator>span:first-child{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:#d2ad69}.draft-indicator #draft-status{width:auto;height:auto;border-radius:0;background:transparent;white-space:nowrap}
.patient-mode .app-shell.study-mode{grid-template-columns:minmax(0,1fr)}
@media(max-width:950px){.patient-mode .app-shell.study-mode{grid-template-columns:minmax(0,1fr)}}

/* Editor-only exam workspace */
.app-shell.study-mode{display:block;width:100%;max-width:1500px;height:auto;min-height:calc(100vh - 70px);margin:0 auto}
.study-mode .report-panel{display:flex;min-height:calc(100vh - 70px);border:0;padding:22px clamp(16px,3.5vw,52px) 18px}
.study-mode .report-heading{width:100%;max-width:1320px;margin:0 auto;padding-bottom:15px}
.study-mode .report-form{width:100%;max-width:1320px;margin:0 auto;overflow:visible}
.study-mode .medical-note{width:100%;max-width:1320px;margin:0 auto}
.study-mode .report-empty{min-height:300px}
@media(max-width:640px){.study-mode .report-panel{padding:14px 12px}.study-mode .report-heading{gap:9px;flex-wrap:wrap}.study-mode .report-heading>div{order:2;width:100%}.study-mode .report-heading .draft-indicator{margin-left:auto}}
@media print{.study-mode .report-panel{min-height:0;padding:12px}.study-mode .report-heading .button{display:none!important}}

/* Advanced authoring tools and reusable report structures */
.editor-toolbar{flex-wrap:wrap;row-gap:5px;padding:8px}.editor-toolbar select{height:27px;max-width:145px;border:1px solid #dfe6df;border-radius:4px;background:#fff;color:#526359;padding:3px 6px;font-size:9px}.editor-toolbar button{height:27px;min-width:29px;font-size:10px}.editor-toolbar button[data-command="justifyLeft"],.editor-toolbar button[data-command="justifyCenter"],.editor-toolbar button[data-command="justifyRight"],.editor-toolbar button[data-command="justifyFull"]{font-size:13px}.editor-color{width:29px;height:27px;position:relative;display:grid;place-items:center;border:1px solid transparent;border-radius:4px;color:#526359;font-size:11px;font-weight:700;cursor:pointer}.editor-color:hover{background:#fff;border-color:#dce4dc}.editor-color input{position:absolute;inset:1px;width:25px;height:24px;opacity:0;cursor:pointer}.editor-highlight{font-size:15px}
.editor-insert-row{display:flex;align-items:center;gap:9px;padding:8px 10px;background:#fafbf9;border:1px solid #e1e6e0;border-top:0;color:#859188}.editor-insert-row label{font-size:9px;font-weight:700}.editor-insert-row select{min-height:28px;min-width:145px;border:1px solid #e2e8e2;border-radius:4px;background:#fff;color:#526359;padding:4px 7px;font-size:9px}.editor-insert-row .text-button{font-size:9px}.report-editor{border-radius:0 0 6px 6px}
.template-tools{flex-wrap:wrap;justify-content:flex-end}.template-tools #open-template-manager{border-color:#cddbd0;color:#42634d}.template-modal-card{width:min(940px,100%)}.template-library-layout{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(260px,1.1fr);gap:22px;margin-top:17px}.template-builder{display:grid;align-content:start;gap:12px;background:#f8faf7;border:1px solid #e8ede7;border-radius:8px;padding:14px}.template-builder>.field input{min-height:36px;width:100%;border:1px solid #e2e8e2;border-radius:5px;padding:8px 9px;background:#fff;color:#34443a;font-size:11px}.template-section-heading{display:grid;gap:3px}.template-section-heading b,.saved-templates h3{font-size:11px;color:#46564b;margin:0}.template-section-heading small{font-size:9px;color:#929d95}.template-section-list{display:grid;gap:6px;max-height:300px;overflow:auto}.template-section-row{display:flex;align-items:center;gap:4px}.template-section-row input{flex:1;min-width:0;min-height:31px;border:1px solid #e2e8e2;border-radius:4px;padding:6px 8px;background:#fff;color:#34443a;font-size:10px}.template-row-control{width:25px;height:27px;border:1px solid #e4e9e3;border-radius:4px;background:#fff;color:#78867b;font-size:12px}.template-row-control:hover{background:#edf4ed;color:var(--green)}.template-row-control.remove{color:#a46a61}.template-builder>.button{min-height:32px;font-size:10px}.saved-templates{min-width:0}.saved-templates h3{margin:3px 0 10px}.saved-template-list{display:grid;gap:8px;max-height:430px;overflow:auto}.saved-template-card{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid #e6ebe5;border-radius:7px;background:#fff}.saved-template-card>div:first-child{display:grid;gap:4px;min-width:0}.saved-template-card b{font-size:10px;color:#3f5044}.saved-template-card small{max-width:340px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#96a098;font-size:9px}.saved-template-card>div:last-child{display:flex;align-items:center;gap:7px;flex-shrink:0}.saved-template-card .text-button{font-size:9px}.template-empty{padding:15px;border:1px dashed #dfe6df;border-radius:6px;color:#99a39c;font-size:10px;text-align:center}
@media(max-width:680px){.template-library-layout{grid-template-columns:1fr}.template-tools{justify-content:flex-start}.template-modal-card{padding:16px}.saved-template-list{max-height:250px}.editor-toolbar select{max-width:120px}.editor-insert-row{flex-wrap:wrap}}
.font-size-control{display:flex;align-items:center;gap:3px;height:27px;padding:0 4px;border:1px solid #dfe6df;border-radius:4px;background:#fff;color:#87938a;font-size:9px}.editor-toolbar .font-size-control select{width:43px;min-width:43px;height:24px;padding:2px;border:0;background:transparent;color:#526359;font-size:10px}
.font-family-control{display:flex;align-items:center;gap:5px;height:27px;padding:0 5px;border:1px solid #dfe6df;border-radius:4px;background:#fff;color:#87938a;font-size:9px}.editor-toolbar .font-family-control select{min-width:115px;max-width:145px;border:0;padding:3px;background:transparent}.signing-note{margin:9px 0;padding:8px 10px;border:1px solid #e6ece5;border-radius:5px;background:#f8faf7;color:#718077;font-size:10px;line-height:1.5}.signed-signature-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0;padding:12px 14px;border:1px solid #d7e6d8;border-radius:7px;background:#f5faf4}.signed-signature-panel>div{display:flex;align-items:center;gap:12px;min-width:0}.signed-signature-panel img{width:150px;height:64px;object-fit:contain;background:#fff;border:1px solid #e6ebe5;border-radius:4px}.signed-signature-panel span{display:grid;gap:4px;min-width:0}.signed-signature-panel b{font-size:11px;color:#405647}.signed-signature-panel small{overflow-wrap:anywhere;color:#78867d;font-size:9px}.signed-signature-panel>strong{flex-shrink:0;color:#39734c;font-size:10px;letter-spacing:.5px}.signed-locked{opacity:.55;pointer-events:none}
.user-create-form .registration-section{min-width:0;margin:0 0 12px;padding:12px;border:1px solid #e3e9e2;border-radius:6px}.registration-section legend{padding:0 6px;color:#52675a;font-size:11px;font-weight:700}.user-create-form .check-field{display:flex;align-items:center;justify-content:space-between;border:1px solid #e6ebe6;border-radius:5px;background:#fff;padding:0 9px;min-height:35px}.user-create-form .check-field>span{font-size:10px;font-weight:700;color:#66756b}.user-create-form .check-field input{width:16px;height:16px;min-height:0;margin:0;accent-color:var(--green)}.permission-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px 12px;margin:4px 0 10px}.permission-groups label,.account-options label{display:flex;align-items:flex-start;gap:6px;color:#536258;font-size:10px;line-height:1.4}.permission-groups input,.account-options input{flex:0 0 14px;width:14px;height:14px;margin:0;accent-color:var(--green)}.registration-section>small{color:#89958d;font-size:9px;line-height:1.5}.account-options{display:grid;gap:8px;padding:4px 2px 11px}.account-options small{color:#89958d;font-size:9px}.security-form{display:grid;gap:13px;max-width:420px;padding:16px;border:1px solid #e7ece6;border-radius:8px;background:#f8faf7}.security-form .button{justify-self:start}@media(max-width:720px){.permission-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
.user-form-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px;color:#3f5044;font-size:12px}.user-search-field{margin:18px 0 10px}.auth-forgot{margin:12px auto 0}.edit-admin-password-field{max-width:420px;margin:0 0 12px;padding:10px;border:1px solid #ead9b2;border-radius:6px;background:#fffaf0}.edit-admin-password-field span{font-size:10px}
.report-layout-form{display:grid;gap:15px}.report-layout-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.report-layout-fields .field textarea{width:100%;min-height:112px;border:1px solid #e6ebe6;border-radius:5px;padding:10px;color:#34443a;font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;resize:vertical}.report-layout-fields .field textarea:focus{outline:0;border-color:#a7c0ad;box-shadow:0 0 0 2px #edf4ee}.report-layout-variables,.report-layout-preview{border:1px solid #e7ece6;border-radius:7px;background:#f8faf7;padding:12px}.report-layout-variables b,.report-layout-preview b{font-size:11px;color:#425247}.report-layout-variables p{font:11px/1.8 ui-monospace,SFMono-Regular,Menlo,monospace;color:#24634f;margin:7px 0}.report-layout-variables small,.report-layout-preview small{display:block;color:#839087;font-size:10px;line-height:1.5}.report-layout-preview>div{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.report-layout-preview pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0;padding:13px;border:1px solid #e5e9e4;border-radius:5px;background:#fff;color:#34443a;font:11px/1.7 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;min-height:100px}
@media(max-width:640px){.report-layout-fields{grid-template-columns:1fr}.admin-tabs{gap:10px;overflow:auto}.admin-tab{white-space:nowrap}}
.report-logo-controls{display:grid;grid-template-columns:1fr 1fr;gap:14px}.report-logo-controls>div{display:grid;gap:8px}.report-logo-controls input[type=file]{width:100%;border:1px solid #e6ebe6;border-radius:5px;background:#fff;padding:7px;font-size:10px;color:#536258}.report-logo-preview{min-height:66px;display:flex;align-items:center;gap:10px;border:1px dashed #dce5dc;border-radius:6px;padding:8px 10px;color:#89958d;font-size:10px}.report-logo-preview img{max-width:150px;max-height:48px;object-fit:contain}.report-logo-preview .text-button{margin-left:auto}
@media(max-width:640px){.report-logo-controls{grid-template-columns:1fr}}

/* Clear, step-by-step administration for the report paper layout */
.report-layout-form{gap:13px}.report-layout-section{display:grid;gap:13px;padding:16px;border:1px solid #e6ebe5;border-radius:9px;background:#fff;box-shadow:0 2px 8px rgba(31,52,42,.025)}
.report-section-heading{display:flex;align-items:center;gap:10px;padding-bottom:11px;border-bottom:1px solid #eff2ee}.report-section-heading>div{display:grid;gap:3px}.report-section-heading b{font-size:12px;color:#34443a}.report-section-heading small{font-size:10px;line-height:1.45;color:#849087}.report-step{width:25px;height:25px;flex:0 0 25px;display:grid;place-items:center;border-radius:50%;background:#edf4ee;color:#35654a;font-size:11px;font-weight:700}
.report-layout-section .report-layout-fields{gap:15px}.report-layout-section .report-layout-variables{background:#f8faf7}.report-logo-card{min-width:0;display:grid;align-content:start;gap:10px;padding:13px;border:1px solid #e8ede7;border-radius:8px;background:#fbfcfa}.report-logo-card-heading{display:grid;gap:4px}.report-logo-card-heading b{font-size:11px;color:#405247}.report-logo-card-heading small{font-size:9px;color:#89958d}
.report-logo-dropzone{position:relative;min-height:142px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:16px;border:1.5px dashed #cbd9cd;border-radius:7px;background:#fff;color:#76857a;text-align:center;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}.report-logo-dropzone:hover,.report-logo-dropzone:focus-visible,.report-logo-dropzone.drag-active{outline:0;border-color:#4e8962;background:#f3f8f3;box-shadow:0 0 0 3px #e6f1e7}.report-logo-dropzone>b{font-size:11px;color:#41564a}.report-logo-dropzone>span:not(.report-drop-icon){font-size:10px}.report-logo-dropzone u{color:#286346;text-underline-offset:2px}.report-logo-dropzone>small{margin-top:3px;font-size:9px;color:#96a198}.report-drop-icon{width:29px;height:29px;display:grid;place-items:center;margin-bottom:2px;border-radius:50%;background:#edf4ee;color:#39734f;font-size:19px;font-weight:500}.report-logo-file-input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;clip-path:inset(50%)}
.report-logo-preview{position:relative;min-height:64px;background:#fff}.report-logo-preview img{max-width:180px;max-height:52px}.report-logo-preview .text-button{position:absolute;right:8px;top:50%;margin:0;transform:translateY(-50%)}.report-logo-guidance{font-size:9px;line-height:1.5;color:#8c978f}.report-layout-savebar{position:sticky;bottom:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 12px;border:1px solid #dfe8df;border-radius:7px;background:rgba(248,250,247,.97);box-shadow:0 -5px 16px rgba(31,52,42,.04)}.report-layout-savebar>span{font-size:10px;color:#758278}.report-layout-savebar .button{min-height:36px}.report-layout-savebar .button:disabled{opacity:.65;cursor:wait}
.report-logo-settings{display:grid;grid-template-columns:minmax(110px,.8fr) minmax(150px,1.2fr);gap:12px;align-items:end;padding-top:2px}.report-logo-settings .field{display:grid;gap:6px}.report-logo-settings .field>span{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#65746a}.report-logo-settings output{font-size:9px;font-weight:700;color:#286346}.report-logo-settings select{width:100%;min-height:32px;border:1px solid #e2e8e2;border-radius:5px;background:#fff;padding:6px 8px;color:#405247;font-size:10px}.report-logo-settings input[type=range]{width:100%;height:32px;margin:0;accent-color:#39734f;cursor:pointer}
@media(max-width:640px){.report-layout-section{padding:12px}.report-logo-controls{grid-template-columns:1fr}.report-layout-savebar{align-items:stretch;flex-direction:column}.report-layout-savebar .button{width:100%}}
.results-table td .result-viewer-link{color:#345d78;border-color:#dce7ed;text-decoration:none}.results-table td .result-viewer-link:hover{background:#edf5f8;border-color:#c5d9e2}.results-table td .result-report-empty .result-report-link{color:#35674b}

/* Logo institucional no cabeçalho da aplicação. */
.topbar .brand-logo-image{width:auto;max-width:240px;height:48px;object-position:left center}

.results-table td.result-actions{max-width:none;overflow:visible;white-space:nowrap}
.results-table .result-actions .button+.button{margin-left:6px}

/* Dimensões ajustáveis da grade de exames. */
.results-table{table-layout:fixed;min-width:0}
.results-table th{position:sticky;padding-right:18px;overflow:hidden;text-overflow:ellipsis}
.results-table td{height:40px;max-width:none}
.results-table td.result-actions{overflow:hidden}
.column-resizer{position:absolute;right:0;top:0;width:9px;height:100%;cursor:col-resize;touch-action:none;border-right:2px solid transparent}
.column-resizer:hover,.column-resizer:focus-visible{border-right-color:var(--green);background:#185a4812;outline:none}
.resizing-columns{user-select:none;cursor:col-resize}
.results-toolbar,.results-toolbar .results-tools{flex-wrap:wrap;gap:10px}

/* Mantém as ações do cadastro acessíveis durante a edição. */
.user-form-heading{position:sticky;top:0;z-index:2;background:#f8faf7;padding:10px 0;border-bottom:1px solid #e3e9e2}
.user-form-heading>b{min-width:0;overflow-wrap:anywhere}
.user-form-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
@media(max-width:520px){.user-form-heading{flex-wrap:wrap}.user-form-actions{margin-left:auto}}

/* Importação administrativa de exames DICOM. */
.dicom-import-card{width:min(800px,100%)}
.dicom-import-description{margin-top:18px;line-height:1.6}
.dicom-import-notice{font-size:11px;line-height:1.6;background:#edf4ee;border:1px solid #dce8de;border-radius:7px;padding:12px;color:#52685b}
.dicom-import-selectors{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:18px 0 12px}
#dicom-file-count{font-size:11px;color:#7a8781}
.dicom-import-list{list-style:none;margin:0;padding:0;max-height:300px;overflow:auto;border-top:1px solid var(--line)}
.dicom-import-list li{display:grid;grid-template-columns:minmax(100px,1fr) 65px minmax(100px,1fr);align-items:center;gap:12px;padding:10px 2px;border-bottom:1px solid var(--line);font-size:11px}
.dicom-import-filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dicom-import-list small{color:#8b978e;font-size:10px}
.dicom-import-result{color:#7a8781;overflow-wrap:anywhere}
.dicom-import-list [data-status=success] .dicom-import-result,.dicom-import-list [data-status=existing] .dicom-import-result{color:#286346}
.dicom-import-list [data-status=error] .dicom-import-result,.dicom-import-list [data-status=invalid] .dicom-import-result{color:#a8443c}
.dicom-import-progress-area{display:grid;gap:8px;margin-top:16px;font-size:11px;color:#617769}
.dicom-import-progress-area progress{width:100%;height:10px;accent-color:var(--green)}
.dicom-import-summary{font-size:11px;color:#53695a;line-height:1.6}
.dicom-import-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:14px;margin-top:12px}
.dicom-import-footer>span{font-size:10px;color:#8b978e}
.dicom-import-card button:disabled{opacity:.55;cursor:default}
@media(max-width:520px){.dicom-import-list li{grid-template-columns:minmax(0,1fr) 65px}.dicom-import-result{grid-column:1/-1}.dicom-import-footer{align-items:stretch;flex-direction:column}}

/* Ações compactas do dashboard, com nomes acessíveis e dicas nativas. */
.action-svg{width:18px;height:18px;display:block;flex-shrink:0;pointer-events:none}
.topbar .dashboard-icon-action,.dashboard .dashboard-icon-action{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;min-width:34px;padding:0;border:1px solid #dce6df;border-radius:10px;background:#fff;color:#557163;text-decoration:none;transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}
.topbar .dashboard-icon-action:hover,.dashboard .dashboard-icon-action:hover{background:#eaf3ed;border-color:#b9d2c2;color:#185a48;box-shadow:0 3px 9px #185a4810;transform:translateY(-1px)}
.topbar #dicom-import-open{background:#eaf3ed;color:#185a48;border-color:#d0e4d6}
.results-table td .result-icon-action{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;min-width:30px;padding:0;border-radius:8px;vertical-align:middle;transition:background .15s,border-color .15s,transform .15s}
.results-table .result-actions .result-icon-action+.result-icon-action{margin-left:4px}
.results-table td .result-icon-action:hover{transform:translateY(-1px)}
.results-table td .result-report-link.result-icon-action{background:#f0f7f2;color:#286346;border-color:#dce9df}
.results-table td .result-report-link.result-icon-action[aria-label="Laudar"]{background:#fff8ed;color:#9a6a28;border-color:#efdfc4}
.results-table td .result-viewer-link.result-icon-action{background:#eff5fa;color:#386a90;border-color:#dce8f1}
.results-table td .result-icon-action .action-svg{width:16px;height:16px}
.dashboard-icon-action:focus-visible,.result-icon-action:focus-visible{outline:2px solid #185a48;outline-offset:2px}
.dashboard .dashboard-icon-action:disabled{opacity:.4;cursor:default;transform:none;box-shadow:none}
.dashboard .filter-submit{gap:7px;border-radius:9px}
.dashboard .results-tools{gap:8px}
@media(prefers-reduced-motion:reduce){.dashboard-icon-action,.result-icon-action{transition:none!important;transform:none!important}}

.results-table th{padding-right:12px}


/* DARK WORKSPACE THEME — screen palette; print remains independent. */
@media screen {
:root{
 color-scheme:dark;
 --canvas:#121920;--surface:#1a242e;--surface-raised:#202d38;--surface-soft:#263540;
 --ink:#d2dce5;--text-secondary:#b9c7d2;--muted:#a2b2c0;--line:#3b4d5d;
 --paper:#1a242e;--green:#80bda8;--green-dark:#98ccb9;--mint:#203a34;
 --lime:#a9c880;--amber:#dbb781;--navy:#121920;
 --danger:#e6a29e;--warning:#dfbd89;--info:#a3c5e1;--on-accent:#112a23;
 --input-bg:#14202a;--input-border:#596f80;--shadow:0 10px 32px rgba(0,0,0,.23);
 background:var(--canvas);color:var(--ink);
}
.topbar{background:var(--surface)}
.brand-mark{color:var(--muted)}
.brand-dot{color:var(--green)}
.workspace-label{color:var(--text-secondary)}
.workspace-kicker,.eyebrow{color:var(--muted)}
.connection{color:var(--text-secondary);background:var(--surface-raised)}
.status-dot{background:var(--canvas);box-shadow:0 0 0 3px #00000040}
.connection.error{color:var(--danger);background:var(--surface-raised)}
.connection.error .status-dot{background:var(--surface-soft);box-shadow:0 0 0 3px #00000040}
.connection.pending .status-dot{background:var(--surface-soft);box-shadow:0 0 0 3px #00000040}
.header-action{color:var(--text-secondary);border:1px solid var(--line)}
.header-action:hover{background:var(--surface-raised)}
.studies-panel{background:var(--surface)}
.count-pill{color:var(--text-secondary);background:var(--surface-raised)}
.search-box{border:1px solid var(--line);color:var(--muted);background:var(--surface-raised)}
.search-box:focus-within{border-color:var(--green);box-shadow:0 0 0 3px #7ebaa726}
.search-box input::placeholder{color:var(--muted)}
.search-box kbd{color:var(--muted);background:var(--surface-raised);border:1px solid var(--line)}
.list-caption{color:var(--muted)}
.icon-button{color:var(--text-secondary)}
.icon-button:hover{background:var(--surface-raised)}
.study-row:hover{background:var(--surface-raised)}
.study-row.active{background:var(--surface-raised);border-color:var(--line)}
.study-patient{color:var(--ink)}
.study-modality{color:var(--text-secondary);border:1px solid var(--line)}
.study-description{color:var(--text-secondary)}
.study-sub{color:var(--muted)}
.study-sub span+span:before{color:var(--muted)}
.list-empty{color:var(--muted)}
.skeleton-row{background:linear-gradient(90deg,var(--surface-raised),var(--surface-raised),var(--surface-raised))}
.privacy-note{border-top:1px solid var(--line);color:var(--muted)}
.lock-icon{color:var(--muted)}
.empty-icon{background:var(--surface-raised);color:var(--text-secondary)}
.empty-state>p:not(.eyebrow){color:var(--muted)}
.empty-shortcuts{color:var(--muted)}
.empty-shortcuts b{background:var(--surface);border:1px solid var(--line);color:var(--text-secondary)}
.exam-kicker{color:var(--muted)}
.exam-status-dot{background:var(--canvas)}
.bullet{color:var(--muted)}
.exam-patient{color:var(--text-secondary)}
.button-secondary{background:var(--surface);border-color:var(--line);color:var(--text-secondary)}
.button-secondary:hover{background:var(--surface-raised);border-color:var(--line)}
.button-primary{color:var(--muted)}
.viewer-card{background:var(--surface);border:1px solid var(--line)}
.viewer-toolbar{border-bottom:1px solid var(--line)}
.toolbar-label{color:var(--muted)}
.series-select-wrap select{color:var(--text-secondary)}
.image-counter{color:var(--muted)}
.viewer-button{background:var(--surface-raised);border:1px solid var(--line);color:var(--text-secondary)}
.viewer-button:hover:not(:disabled){background:var(--surface-raised)}
.image-stage{background:var(--canvas)}
.image-placeholder{color:var(--text-secondary)}
.image-placeholder span{color:var(--ink)}
.preview-warning{color:var(--warning)}
.series-meta{color:var(--muted)}
.study-meta-row{color:var(--muted)}
.study-meta-row b{color:var(--text-secondary)}
.report-panel{background:var(--surface)}
.report-heading{border-bottom:1px solid var(--line)}
.draft-indicator{color:var(--muted)}
.draft-indicator span{background:var(--surface-soft)}
.report-empty{color:var(--muted)}
.report-empty-icon{background:var(--surface-raised);color:var(--muted)}
.patient-summary{background:var(--surface-raised);border:1px solid var(--line)}
.patient-avatar{background:var(--surface-raised);color:var(--text-secondary)}
.patient-summary>div span{color:var(--muted)}
.copy-button{color:var(--muted)}
.field>span{color:var(--text-secondary)}
.field textarea,.field input{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.field textarea::placeholder,.field input::placeholder{color:var(--muted)}
.field textarea:focus,.field input:focus{border-color:var(--green);box-shadow:0 0 0 2px #7ebaa726}
.draft-note{color:var(--muted)}
.medical-note{border-top:1px solid var(--line);color:var(--muted)}
.note-icon{color:var(--muted)}
.toast{background:var(--canvas);color:var(--muted);box-shadow:0 9px 30px rgba(0,0,0,.35)}
.auth-screen{background:radial-gradient(ellipse at 70% 16%,var(--surface-raised) 0,transparent 36%),linear-gradient(145deg,var(--surface-raised),var(--surface-raised))}
.auth-institution-name{color:var(--ink)}
.institution-logo-mark{color:var(--muted)}
.auth-brand .institution-logo-image{background:var(--surface)}
.auth-card{background:var(--surface);border:1px solid var(--line);box-shadow:0 20px 60px rgba(0,0,0,.35)}
.auth-card-icon{background:var(--surface-raised);color:var(--text-secondary)}
.auth-card h1{color:var(--ink)}
.auth-intro{color:var(--muted)}
.auth-form small,.form-grid small,.institution-form small{color:var(--muted)}
.auth-security{border-top:1px solid var(--line);color:var(--muted)}
.auth-security span{color:var(--text-secondary)}
.auth-footer{color:var(--muted)}
.form-error{color:var(--danger);background:var(--surface-raised);border:1px solid var(--line)}
.text-button{color:var(--text-secondary)}
.user-chip>span:first-child{color:var(--text-secondary)}
.user-role{color:var(--muted)}
.logout-button{border:1px solid var(--line)}
.modal{background:rgba(3,8,13,.78)}
.modal-card{background:var(--surface);box-shadow:0 24px 90px rgba(0,0,0,.35)}
.admin-tabs{border-bottom:1px solid var(--line)}
.admin-tab{color:var(--muted)}
.pane-description{color:var(--muted)}
.user-create-form{background:var(--surface-raised);border:1px solid var(--line)}
.form-grid .field input,.institution-form .field input,.field select{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.field select:focus,.form-grid .field input:focus,.institution-form .field input:focus{border-color:var(--green);box-shadow:0 0 0 2px #7ebaa726}
.small-help{color:var(--muted)}
.users-table th{color:var(--muted);border-bottom:1px solid var(--line)}
.users-table td{border-bottom:1px solid var(--line);color:var(--text-secondary)}
.users-table td b{color:var(--ink)}
.users-table td small{color:var(--muted)}
.status-active{color:var(--green)}
.status-inactive{color:var(--danger)}
.table-action{color:var(--danger)}
.table-action.activate{color:var(--text-secondary)}
.logo-preview-row{border:1px dashed var(--line);color:var(--muted)}
.dashboard-heading h1{color:var(--ink)}
.dashboard-heading p:not(.eyebrow){color:var(--muted)}
.filter-card{background:var(--surface)}
.filter-card-heading{border-bottom:1px solid var(--line)}
.filter-card-heading b,.results-toolbar b{color:var(--ink)}
.filter-card-heading small{color:var(--muted)}
.filter-grid .field input,.filter-grid .field select{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.filter-grid .field input:focus,.filter-grid .field select:focus{border-color:var(--green);box-shadow:0 0 0 2px #7ebaa726}
.filter-footer{border-top:1px solid var(--line)}
.filter-footer>span{color:var(--muted)}
.results-toolbar>div span{color:var(--muted)}
.results-toolbar label{color:var(--muted)}
.results-toolbar select{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.results-wrap{border:1px solid var(--line);background:var(--surface)}
.results-table th{background:var(--surface-raised);color:var(--text-secondary);border-bottom:1px solid var(--line)}
.results-table td{color:var(--text-secondary);border-bottom:1px solid var(--line)}
.results-table tbody tr:hover{background:var(--surface-raised)}
.results-table td[data-column="patientName"]{color:var(--ink)}
.results-table td[data-column="modality"]{color:var(--text-secondary)}
.results-table td .result-report-link{color:var(--green);border-color:var(--line)}
.results-table td .result-report-link:hover{background:var(--surface-raised);border-color:var(--line)}
.results-table td.result-report-empty{color:var(--muted)}
.results-empty{color:var(--muted)!important}
.pagination{color:var(--muted)}
.dashboard-footnote{color:var(--muted)}
.date-filter-trigger{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.date-filter-trigger:hover,.date-filter-trigger[aria-expanded="true"]{border-color:var(--line);background:var(--surface)}
.date-filter-icon{color:var(--text-secondary)}
.date-filter-menu{background:var(--surface);border:1px solid var(--line);box-shadow:0 18px 48px rgba(0,0,0,.35)}
.date-presets{background:var(--surface-raised);border-right:1px solid var(--line)}
.date-presets small{color:var(--muted)}
.date-presets button{color:var(--text-secondary)}
.date-presets button:hover,.date-presets button:focus-visible{background:var(--surface-raised);color:var(--green)}
.date-custom>div:first-child b{color:var(--ink)}
.date-custom>div:first-child small{color:var(--muted)}
.date-range-inputs label{color:var(--text-secondary)}
.date-range-inputs input{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.date-range-inputs input:focus{border-color:var(--green);box-shadow:0 0 0 2px #7ebaa726}
.date-range-inputs>span{color:var(--muted)}
.date-menu-actions{border-top:1px solid var(--line)}
.date-filter-error{color:var(--danger)}
.advanced-filters{border-top:1px solid var(--line)}
.advanced-filters>summary{color:var(--text-secondary)}
.advanced-filters>summary::after{border:1px solid var(--line);color:var(--text-secondary)}
.advanced-filters>summary span{color:var(--muted)}
.exam-context-strip{background:var(--surface-raised);border:1px solid var(--line)}
.exam-context-strip small{color:var(--muted)}
.exam-context-strip b{color:var(--text-secondary)}
.editor-topline b{color:var(--ink)}
.editor-topline>div:first-child span{color:var(--muted)}
.template-tools label{color:var(--muted)}
.template-tools select{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.editor-toolbar{background:var(--surface-raised);border:1px solid var(--line)}
.editor-toolbar button{color:var(--text-secondary)}
.editor-toolbar button:hover{background:var(--surface);border-color:var(--line)}
.editor-toolbar>span{border-left:1px solid var(--line)}
.report-editor{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.report-editor:focus{border-color:var(--green);box-shadow:0 0 0 2px #7ebaa726}
.report-editor:empty:before{color:var(--muted)}
.report-editor h3{color:var(--text-secondary)}
.study-mode .report-actions{border-top:1px solid var(--line)}
.draft-indicator>span:first-child{background:var(--surface-soft)}
.editor-toolbar select{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.editor-color{color:var(--text-secondary)}
.editor-color:hover{background:var(--surface);border-color:var(--line)}
.editor-insert-row{background:var(--surface-raised);border:1px solid var(--line);color:var(--muted)}
.editor-insert-row select{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.template-tools #open-template-manager{border-color:var(--line);color:var(--text-secondary)}
.template-builder{background:var(--surface-raised);border:1px solid var(--line)}
.template-builder>.field input{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.template-section-heading b,.saved-templates h3{color:var(--ink)}
.template-section-heading small{color:var(--muted)}
.template-section-row input{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.template-row-control{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.template-row-control:hover{background:var(--surface-raised)}
.template-row-control.remove{color:var(--danger)}
.saved-template-card{border:1px solid var(--line);background:var(--surface)}
.saved-template-card b{color:var(--ink)}
.saved-template-card small{color:var(--muted)}
.template-empty{border:1px dashed var(--line);color:var(--muted)}
.font-size-control{border:1px solid var(--line);background:var(--surface);color:var(--muted)}
.editor-toolbar .font-size-control select{color:var(--text-secondary)}
.font-family-control{border:1px solid var(--line);background:var(--surface);color:var(--muted)}
.signing-note{border:1px solid var(--line);background:var(--surface-raised);color:var(--text-secondary)}
.signed-signature-panel{border:1px solid var(--line);background:var(--surface-raised)}
.signed-signature-panel img{background:var(--surface);border:1px solid var(--line)}
.signed-signature-panel b{color:var(--ink)}
.signed-signature-panel small{color:var(--text-secondary)}
.signed-signature-panel>strong{color:var(--green)}
.user-create-form .registration-section{border:1px solid var(--line)}
.registration-section legend{color:var(--text-secondary)}
.user-create-form .check-field{border:1px solid var(--line);background:var(--surface)}
.user-create-form .check-field>span{color:var(--text-secondary)}
.permission-groups label,.account-options label{color:var(--text-secondary)}
.registration-section>small{color:var(--muted)}
.account-options small{color:var(--muted)}
.security-form{border:1px solid var(--line);background:var(--surface-raised)}
.user-form-heading{color:var(--ink)}
.edit-admin-password-field{border:1px solid var(--line);background:var(--surface-raised)}
.report-layout-fields .field textarea{border:1px solid var(--line);color:var(--ink)}
.report-layout-fields .field textarea:focus{border-color:var(--green);box-shadow:0 0 0 2px #7ebaa726}
.report-layout-variables,.report-layout-preview{border:1px solid var(--line);background:var(--surface-raised)}
.report-layout-variables b,.report-layout-preview b{color:var(--ink)}
.report-layout-variables p{color:var(--green)}
.report-layout-variables small,.report-layout-preview small{color:var(--muted)}
.report-layout-preview pre{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.report-logo-controls input[type=file]{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.report-logo-preview{border:1px dashed var(--line);color:var(--muted)}
.report-layout-section{border:1px solid var(--line);background:var(--surface);box-shadow:0 2px 8px rgba(0,0,0,.35)}
.report-section-heading{border-bottom:1px solid var(--line)}
.report-section-heading b{color:var(--ink)}
.report-section-heading small{color:var(--muted)}
.report-step{background:var(--surface-raised);color:var(--green)}
.report-layout-section .report-layout-variables{background:var(--surface-raised)}
.report-logo-card{border:1px solid var(--line);background:var(--surface-raised)}
.report-logo-card-heading b{color:var(--ink)}
.report-logo-card-heading small{color:var(--muted)}
.report-logo-dropzone{border:1.5px dashed var(--line);background:var(--surface);color:var(--text-secondary)}
.report-logo-dropzone:hover,.report-logo-dropzone:focus-visible,.report-logo-dropzone.drag-active{border-color:var(--green);background:var(--surface-raised);box-shadow:0 0 0 3px #7ebaa726}
.report-logo-dropzone>b{color:var(--ink)}
.report-logo-dropzone u{color:var(--green)}
.report-logo-dropzone>small{color:var(--muted)}
.report-drop-icon{background:var(--surface-raised);color:var(--green)}
.report-logo-preview{background:var(--surface)}
.report-logo-guidance{color:var(--muted)}
.report-layout-savebar{border:1px solid var(--line);background:rgba(3,8,13,.78);box-shadow:0 -5px 16px rgba(0,0,0,.35)}
.report-layout-savebar>span{color:var(--text-secondary)}
.report-logo-settings .field>span{color:var(--text-secondary)}
.report-logo-settings output{color:var(--green)}
.report-logo-settings select{border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.report-logo-settings input[type=range]{accent-color:var(--green)}
.results-table td .result-viewer-link{color:var(--info);border-color:var(--line)}
.results-table td .result-viewer-link:hover{background:var(--surface-raised);border-color:var(--line)}
.results-table td .result-report-empty .result-report-link{color:var(--green)}
.column-resizer:hover,.column-resizer:focus-visible{background:#7ebaa71a}
.user-form-heading{background:var(--surface-raised);border-bottom:1px solid var(--line)}
.dicom-import-notice{background:var(--surface-raised);border:1px solid var(--line);color:var(--text-secondary)}
#dicom-file-count{color:var(--text-secondary)}
.dicom-import-list small{color:var(--muted)}
.dicom-import-result{color:var(--text-secondary)}
.dicom-import-list [data-status=success] .dicom-import-result,.dicom-import-list [data-status=existing] .dicom-import-result{color:var(--green)}
.dicom-import-list [data-status=error] .dicom-import-result,.dicom-import-list [data-status=invalid] .dicom-import-result{color:var(--danger)}
.dicom-import-progress-area{color:var(--text-secondary)}
.dicom-import-summary{color:var(--text-secondary)}
.dicom-import-footer>span{color:var(--muted)}
.topbar .dashboard-icon-action,.dashboard .dashboard-icon-action{border:1px solid var(--line);background:var(--surface);color:var(--text-secondary)}
.topbar .dashboard-icon-action:hover,.dashboard .dashboard-icon-action:hover{background:var(--surface-raised);border-color:var(--line);color:var(--green);box-shadow:0 3px 9px #00000040}
.topbar #dicom-import-open{background:var(--surface-raised);color:var(--green);border-color:var(--line)}
.results-table td .result-report-link.result-icon-action{background:var(--surface-raised);color:var(--green);border-color:var(--line)}
.results-table td .result-report-link.result-icon-action[aria-label="Laudar"]{background:var(--surface-raised);color:var(--warning);border-color:var(--line)}
.results-table td .result-viewer-link.result-icon-action{background:var(--surface-raised);color:var(--info);border-color:var(--line)}
.dashboard-icon-action:focus-visible,.result-icon-action:focus-visible{outline:2px solid var(--green)}

html,body{background:var(--canvas);color:var(--ink)}
body{scrollbar-color:#536879 #16212b}
::selection{background:#385b53;color:#e2ebe6}
.auth-screen{background:radial-gradient(ellipse at 75% 15%,#20352f 0,transparent 44%),linear-gradient(145deg,#10171e,#18252d)}
.auth-card,.modal-card{border:1px solid var(--line);box-shadow:0 20px 60px #00000040}
.modal{background:rgba(3,8,13,.76)}
.topbar{background:#18222b;border-bottom-color:#354655}
.button-primary,.brand-mark,.institution-logo-mark{background:var(--green);border-color:var(--green);color:var(--on-accent)}
.button-primary:hover{background:var(--green-dark);border-color:var(--green-dark);color:var(--on-accent)}
.button-secondary,.header-action{background:var(--surface-raised);border-color:#526878;color:var(--text-secondary)}
.button-secondary:hover,.header-action:hover{background:#2b3c47;border-color:var(--green);color:var(--ink)}
.field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),.field textarea,.field select,
.form-grid .field input,.institution-form .field input,.template-builder>.field input,.template-section-row input,
.filter-grid .field input,.filter-grid .field select,.date-filter-trigger,.date-range-inputs input,
.results-toolbar select,.template-tools select,.editor-toolbar select,.editor-insert-row select,.report-logo-settings select,
.report-layout-fields .field textarea,.report-logo-controls input[type=file]{background:var(--input-bg);border-color:var(--input-border);color:var(--ink)}
input,textarea,select,button{caret-color:var(--green)}
input::placeholder,textarea::placeholder{color:#9aaaba!important;opacity:1}
input:focus-visible,textarea:focus-visible,select:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{
 outline:2px solid var(--green);outline-offset:2px;box-shadow:0 0 0 3px #80bda81f;
}
input[type=checkbox],input[type=radio],input[type=range],progress{accent-color:var(--green)}
input[type=file]::file-selector-button{background:#2b3e49;color:var(--ink);border:1px solid #62798b;border-radius:5px;padding:5px 9px;margin-right:8px}
option{background:var(--input-bg);color:var(--ink)}
.filter-card,.results-wrap,.viewer-card,.report-panel,.studies-panel,.report-layout-section{background:var(--surface);border-color:var(--line)}
.results-table th{background:#24323d;color:var(--text-secondary);border-color:#455b6b}
.results-table td,.users-table td{color:var(--text-secondary);border-color:#344656}
.results-table td[data-column="patientName"],.users-table td b{color:var(--ink)}
.results-table td[data-column="modality"]{color:var(--green)}
.results-table tbody tr:hover,.study-row:hover{background:#25363e}
.study-row.active{background:#254039;border-color:#639b85}
.count-pill,.connection{background:#223c34;color:#9bcab3}
.status-dot,.exam-status-dot{background:#8bc8a3;box-shadow:0 0 0 3px #304f40}
.connection.error,.form-error{background:#3e2c32;color:var(--danger);border-color:#815b61}
.connection.error .status-dot{background:var(--danger);box-shadow:0 0 0 3px #5b3a40}
.connection.pending{background:#3b352a;color:var(--warning)}
.connection.pending .status-dot,.draft-indicator>span:first-child{background:var(--warning);box-shadow:none}
.draft-indicator{color:var(--warning)}
.edit-admin-password-field{background:#393329;border-color:#8b7652;color:var(--warning)}
.signing-note,.signed-signature-panel,.dicom-import-notice{background:#213b34;border-color:#456d5b;color:#bfd6c8}
.status-active,.dicom-import-list [data-status=success] .dicom-import-result,.dicom-import-list [data-status=existing] .dicom-import-result{color:var(--green)}
.status-inactive,.table-action,.dicom-import-list [data-status=error] .dicom-import-result,.dicom-import-list [data-status=invalid] .dicom-import-result{color:var(--danger)}
.table-action.activate{color:var(--green)}
.user-form-heading,.report-layout-savebar{background:#202d38;border-color:var(--line)}
.report-layout-savebar{box-shadow:0 -5px 16px #00000040}
.report-logo-dropzone,.report-logo-preview,.logo-preview-row{background:#18232c;border-color:#60788a}
.report-logo-dropzone:hover,.report-logo-dropzone:focus-visible,.report-logo-dropzone.drag-active{background:#253e36;border-color:var(--green)}
.report-layout-preview pre{background:#14202a;color:var(--ink);border-color:#4b6072}
.signed-signature-panel img{background:#cbd1cd;border-color:#748476}
.image-stage{background:#101412}
.report-editor{background:#18242e;color:var(--ink);border-color:var(--input-border)}
.report-editor h3{color:#bedacd}
.report-editor:focus{border-color:var(--green);box-shadow:0 0 0 2px #80bda826}
.report-editor:empty:before{color:var(--muted)}
.editor-toolbar,.editor-insert-row{background:#202f3b;border-color:#4b6274}
.editor-toolbar button,.editor-color,.editor-toolbar select,.editor-insert-row select{color:var(--ink)}
.editor-toolbar button:hover,.editor-color:hover{background:#314653;border-color:#718c9c}
.editor-color input{background:transparent}
.toast{background:#293d38;border:1px solid #709889;color:#dfebe4;box-shadow:0 8px 26px #00000055}
.topbar .dashboard-icon-action,.dashboard .dashboard-icon-action{background:#22323e;color:#bfced9;border-color:#587184}
.topbar .dashboard-icon-action:hover,.dashboard .dashboard-icon-action:hover{background:#2c493f;border-color:#82baa4;color:#c9e2d4}
.topbar #dicom-import-open{background:#244139;color:#a7d0bc;border-color:#608e79}
.results-table td .result-report-link.result-icon-action{background:#284236;color:#b0d6bb;border-color:#648b70}
.results-table td .result-report-link.result-icon-action[aria-label="Laudar"]{background:#42392a;color:#e0c18a;border-color:#8c7958}
.results-table td .result-viewer-link.result-icon-action{background:#273d50;color:#b0cee8;border-color:#647f98}
.results-table td .result-icon-action:hover{filter:brightness(1.12)}
.column-resizer:hover,.column-resizer:focus-visible{background:#80bda826;border-right-color:var(--green)}
}
@media print{
 :root{color-scheme:light}
 #report-editor,#report-editor *{color:#111!important;background:transparent!important;text-shadow:none!important}
}

/* Native OsiriX action: preserve the application icon colors. */
.results-table td .result-osirix-action{background:#263540;border-color:#647f98}
.result-osirix-action img{width:24px;height:24px;object-fit:contain;pointer-events:none}
.result-osirix-action:disabled{opacity:.65;cursor:progress;font-size:9px}

.osirix-transfer-status{position:fixed;right:18px;bottom:18px;z-index:19;display:flex;align-items:center;gap:9px;max-width:calc(100vw - 36px);padding:9px 12px;border:1px solid #596f80;border-radius:8px;background:#202d38;color:#d2dce5;font-size:12px;box-shadow:0 4px 16px #0003;pointer-events:none}
.osirix-transfer-status[hidden]{display:none}
.osirix-transfer-status.is-transferring::before{content:'';width:12px;height:12px;border:2px solid #596f80;border-top-color:#80bda8;border-radius:50%;animation:osirix-spin 1s linear infinite}
@keyframes osirix-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.osirix-transfer-status.is-transferring::before{animation:none}}
@media print{.osirix-transfer-status{display:none!important}}

/* Workstation viewer configuration */
#viewer-settings-modal .modal-card{max-width:860px}#viewer-settings-content{padding:5px 0 0;color:var(--ink)}
.viewer-intro{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:20px}.viewer-intro h3{font-size:18px;margin:0 0 7px}.viewer-intro p,.viewer-section p{font-size:13px;line-height:1.6;color:#b9c7d2;margin:6px 0 12px}.viewer-badge{flex-shrink:0;font-size:12px;color:#b0cee8;background:#273d50;border:1px solid #647f98;border-radius:20px;padding:6px 11px}
.viewer-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;align-items:center;margin-bottom:16px}.viewer-summary{display:grid;gap:6px;font-size:13px;line-height:1.5;color:#b9c7d2}.viewer-summary b{color:#d2dce5;font-size:15px}
.viewer-section{border:1px solid #3b4d5d;border-radius:10px;background:#1a242e;padding:17px;margin:16px 0}.viewer-section h4{font-size:14px;margin:0 0 9px;color:#d2dce5}.viewer-section .field{margin:12px 0}.viewer-section .field>span{font-size:13px;color:#b9c7d2}.viewer-section input:not([type=checkbox]),.viewer-section select,.viewer-config-grid select{background:#14202a;border:1px solid #596f80;color:#d2dce5;border-radius:6px;padding:10px;width:100%;font-size:13px}
.viewer-section small,.viewer-section p.viewer-note{font-size:12px;line-height:1.6;color:#a2b2c0}.viewer-folder-line{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0 16px}.viewer-folder-line>span{flex:1;min-width:190px;font-size:13px;color:#b9c7d2;overflow-wrap:anywhere}.viewer-parallel{max-width:340px}.viewer-checkbox{display:flex;align-items:center;gap:9px;font-size:13px;line-height:1.5;color:#d2dce5;margin:14px 0}.viewer-checkbox input{width:16px;height:16px;accent-color:#80bda8}
.viewer-notice{background:#493c29;color:#e6c794;border:1px solid #8e7956;border-radius:8px;padding:12px;font-size:13px;line-height:1.5}.viewer-check-section{background:#202d38}.viewer-check-actions{display:flex;gap:10px;flex-wrap:wrap}#viewer-check-result{margin:12px 0 0;color:#b0cee8;font-size:13px;line-height:1.6}.viewer-help{font-size:13px;line-height:1.7;color:#b9c7d2;padding:12px 0}.viewer-help summary{cursor:pointer;font-weight:600;color:#d2dce5}.viewer-help ol{padding-left:22px}.viewer-help li{margin:8px 0}.viewer-help a{color:#a3c5e1}.viewer-savebar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #3b4d5d;padding-top:16px;margin-top:16px}.viewer-savebar span{color:#a2b2c0;font-size:12px}.viewer-saved{color:#a6d5bc;font-size:13px;line-height:1.6}.viewer-saved:empty{display:none}
#viewer-settings-modal button:focus-visible,#viewer-settings-content button:focus-visible,#viewer-settings-content summary:focus-visible{outline:2px solid #a3c5e1;outline-offset:3px}
@media(max-width:640px){.viewer-config-grid{grid-template-columns:1fr}.viewer-intro{flex-wrap:wrap}.viewer-savebar{align-items:stretch;flex-direction:column}.viewer-section{padding:13px}.viewer-folder-line>span{flex-basis:100%}}

/* Patient documents share the dark dashboard surfaces. */
#patient-documents-list li{display:block;overflow-wrap:anywhere}
#patient-documents-list a{color:var(--accent,#80cbb8);font-size:13px;text-underline-offset:3px}
#patient-documents-form{display:grid;gap:12px;margin-top:18px}
#patient-documents-form.hidden{display:none}
#patient-documents-form label{font-size:13px;color:var(--text)}
#patient-documents-files{width:100%;min-width:0;font:inherit;font-size:13px}
#patient-documents-files::file-selector-button{border:1px solid var(--line);border-radius:7px;background:var(--surface-2,#243441);color:inherit;padding:9px 12px;margin-right:12px;cursor:pointer}
#patient-documents-submit{justify-self:start}
#patient-documents-status{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
#patient-documents-patient{font-size:14px;line-height:1.5;overflow-wrap:anywhere}

/* Keep every exam action reachable even in a saved, narrow column. */
.results-table td.result-actions{white-space:normal;overflow:visible}
.result-action-group{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
.results-table .result-action-group>.button{flex:0 0 auto;margin:0!important}

.study-registration-card{width:min(820px,100%)}
#study-registration-context{font-size:13px;line-height:1.5;overflow-wrap:anywhere}
#study-registration-fields{margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:8px}
#study-registration-fields .form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
#study-registration-fields input,#study-registration-fields textarea{width:100%;min-width:0;padding:10px;border:1px solid #596f80;border-radius:6px;background:#14202a;color:#d2dce5;font:inherit;font-size:14px}
#study-registration-fields .field>span{font-size:12px}
#study-registration-fields:disabled{opacity:.7}
.study-registration-footer{display:flex;align-items:center;gap:15px;margin-top:16px}
.study-registration-footer span{font-size:12px;color:#b9c7d2;line-height:1.5}
#study-registration-status{font-size:14px;line-height:1.6;overflow-wrap:anywhere}
@media(max-width:640px){#study-registration-fields .form-grid{grid-template-columns:1fr}.study-registration-footer{flex-wrap:wrap}}

.study-registration-scope{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #8e7956;border-radius:8px;background:#493c29;color:#e6c794;font-size:13px;line-height:1.6;margin:12px 0}
.study-registration-scope input{flex-shrink:0;width:18px;height:18px;accent-color:#80bda8}
.study-registration-scope.hidden{display:none}

/* Column searches keep the worklist in view; widths still follow the saved colgroup. */
.dashboard{padding-top:16px}
.dashboard-heading{margin-bottom:12px}
.dashboard .results-toolbar{margin:0 1px 9px}
.grid-filter-form{margin:0;min-width:0}
.results-wrap{max-height:calc(100dvh - 245px);min-height:180px;scrollbar-gutter:stable}
.results-table thead{position:sticky;top:0;z-index:3;background:#24323d}
.results-table thead th{position:relative;top:auto;padding-top:10px;padding-bottom:8px}
.results-table .column-filter-row td{padding:2px 7px 9px;background:#24323d;border-bottom:1px solid #455b6b;overflow:visible;white-space:normal}
.column-filter-row input,.column-filter-row select,.column-filter-row .date-filter-trigger{display:block;width:100%;min-width:0;height:32px;min-height:32px;margin:0;padding:6px 8px;border:1px solid var(--input-border);border-radius:5px;background:var(--input-bg);color:var(--ink);font-size:11px;font-weight:400;letter-spacing:0;box-sizing:border-box}
.column-filter-row input:focus,.column-filter-row select:focus{border-color:var(--green)}
.column-filter-row input[type=search]{appearance:none}
.column-filter-row .date-filter{display:block;min-width:0}
.column-filter-row .date-filter-details{height:32px}
.column-filter-row .date-filter-trigger{display:flex;gap:5px;align-items:center;justify-content:space-between;cursor:pointer;overflow:hidden}
.column-filter-row #date-filter-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.column-filter-row .date-filter-icon{flex:none;font-size:16px}
.column-filter-unavailable{display:flex;align-items:center;justify-content:center;height:32px;color:var(--muted);font-weight:400}
.column-filter-actions{display:flex;align-items:center;gap:5px}
.results-table .column-filter-actions .button{height:32px;min-height:32px;margin:0;padding:5px 8px;font-size:11px}
.column-filter-actions #grid-search{flex:1;min-width:0}
.column-filter-actions #clear-filters{flex:none;width:30px;padding:0;font-size:20px;line-height:1}
.date-filter-menu.grid-date-popup{position:fixed;z-index:1000;display:grid;grid-template-columns:145px minmax(0,1fr);margin:0;transform:none;overflow:auto;box-shadow:0 18px 48px #0008}
.grid-date-popup .date-custom{padding:14px}
.grid-date-popup .date-custom>div:first-child{margin-bottom:10px}
.grid-date-popup .date-presets{padding:15px 9px}
.grid-date-popup .date-range-inputs{margin-top:10px}
.grid-date-popup .date-range-inputs input{color-scheme:dark;width:100%;min-width:0}
.calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px}
.calendar-heading b{font-size:12px;color:var(--ink);text-transform:capitalize}
.calendar-heading button{width:29px;height:28px;border:1px solid var(--input-border);border-radius:5px;background:var(--input-bg);color:var(--ink);font-size:20px;line-height:1}
.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.calendar-days>span,.calendar-days>button{display:grid;place-items:center;min-width:0;height:29px;font-size:11px}
.calendar-days .calendar-weekday{height:21px;font-weight:600;color:var(--muted)}
.calendar-days button{border:1px solid transparent;border-radius:5px;background:transparent;color:var(--ink);padding:0}
.calendar-days button:hover{background:var(--surface-raised);border-color:var(--green)}
.calendar-days button[aria-current=date]{border-color:var(--green)}
.calendar-days button.calendar-in-range{background:#304c43;color:#d5e9df}
.calendar-days button.calendar-selected{background:var(--green);color:var(--on-accent);font-weight:700}
.date-calendar-hint{margin:8px 0 0;color:var(--muted);font-size:10px;min-height:14px}
@media(max-width:600px){.dashboard{padding-left:10px;padding-right:10px}.results-wrap{max-height:calc(100dvh - 260px)}.date-filter-menu.grid-date-popup{grid-template-columns:108px minmax(0,1fr)}.grid-date-popup .date-custom{padding:10px}.grid-date-popup .date-presets{padding:12px 5px}.calendar-days{gap:1px}.calendar-days>button{height:28px}.grid-date-popup .date-menu-actions{flex-wrap:wrap;gap:5px}.grid-date-popup .date-menu-actions .button{font-size:10px}.calendar-heading{gap:3px}.calendar-heading b{font-size:11px}}
.results-table tbody td{padding-top:6px;padding-bottom:6px}
#native-viewer-progress{position:fixed;right:18px;bottom:18px;z-index:20;display:grid;gap:9px;width:min(440px,calc(100vw - 36px));max-height:55vh;overflow:auto}
.native-transfer-card{padding:13px;border:1px solid #596f80;border-radius:9px;background:#202d38;color:#d2dce5;box-shadow:0 6px 22px #0005}
.native-transfer-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.native-transfer-heading b{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.native-transfer-heading button{flex:none;background:transparent;color:#bfced9;border:0;font-size:20px;padding:0 3px}
.native-transfer-card p{font-size:12px;line-height:1.5;margin:8px 0}
.native-transfer-card progress{display:block;width:100%;height:7px;margin:8px 0 12px}
.native-transfer-actions{display:flex;flex-wrap:wrap;gap:7px}
.native-transfer-actions .button{font-size:11px;text-decoration:none;padding:7px 9px}
.native-transfer-card.is-warning{border-color:var(--warning)}
.native-transfer-card.is-warning p{color:var(--warning)}
@media print{#native-viewer-progress{display:none!important}}
.study-status-badge{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;border-radius:5px;padding:4px 7px;font-size:10px;font-weight:600;background:#273a49;color:#b8cee0;border:1px solid #476075}
.study-status-badge.status-released{background:#253e46;color:#9dd3df;border-color:#476e79}
.study-status-badge.status-pending{background:#42392a;color:#e0c18a;border-color:#8c7958}
.study-status-badge.status-review{background:#3e3047;color:#d7b9e2;border-color:#796184}
.study-status-badge.status-typing{background:#273d50;color:#b0cee8;border-color:#647f98}
.study-status-badge.status-finalized{background:#284236;color:#b0d6bb;border-color:#648b70}
.registration-workflow-note{font-size:12px;color:var(--muted);line-height:1.6;margin:10px 0 14px}
#study-registration-fields .field{align-content:start}
/* Keep actions at hand and the horizontal rail outside vertical row scrolling. */
.results-frame{height:calc(100dvh - 245px);min-height:220px;display:flex;flex-direction:column;position:relative}
.results-frame .results-wrap{flex:1;min-height:0;max-height:none;overflow-y:auto;overflow-x:hidden;border-bottom-left-radius:0;border-bottom-right-radius:0}
.grid-scrollbar{flex:0 0 18px;height:18px;overflow-x:scroll;overflow-y:hidden;position:sticky;bottom:0;z-index:4;background:#14202a;border:1px solid var(--line);border-top:0;border-radius:0 0 7px 7px;scrollbar-color:#6a8798 #14202a;scrollbar-width:thin}
#grid-scrollbar-content{height:1px}
.grid-scrollbar::-webkit-scrollbar{height:14px}
.grid-scrollbar::-webkit-scrollbar-track{background:#14202a;border-radius:6px}
.grid-scrollbar::-webkit-scrollbar-thumb{background:#6a8798;border:2px solid #14202a;border-radius:7px;min-width:36px}
.grid-scrollbar::-webkit-scrollbar-thumb:hover{background:#91afbd}
.results-table tbody td:first-child{position:sticky;left:0;z-index:2;background:var(--surface);border-right:1px solid var(--line)}
.results-table tbody tr:hover td:first-child{background:#25363e}
.results-table thead tr:first-child th:first-child,.results-table .column-filter-row td:first-child{position:sticky;left:0;z-index:4;background:#24323d;border-right:1px solid #455b6b}
select.study-status-control{width:100%;max-width:100%;min-width:0;font-size:11px;cursor:pointer;padding:5px 4px;text-overflow:ellipsis}
.study-status-control:disabled{opacity:.7;cursor:wait}
.registration-situation-value{margin:0;min-height:38px;display:flex;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:5px;background:var(--input-bg);font-size:13px;color:var(--ink)}
@media(max-width:600px){.results-frame{height:calc(100dvh - 280px);min-height:200px}}
.grid-scrollbar{overflow:hidden;touch-action:none;cursor:pointer}
#grid-scrollbar-thumb{position:absolute;left:2px;top:3px;height:10px;background:#819fae;border-radius:6px;cursor:grab;touch-action:none;box-shadow:inset 0 0 0 1px #a8bfca55}
#grid-scrollbar-thumb:hover{background:#abc1cc}
#grid-scrollbar-thumb:active{cursor:grabbing}
.grid-scrollbar:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.grid-scrollbar[aria-disabled=true] #grid-scrollbar-thumb{opacity:.4;cursor:default}
@media(max-width:600px){.grid-scrollbar{flex-basis:22px;height:22px}#grid-scrollbar-thumb{height:14px}.results-table tbody td:first-child,.results-table thead tr:first-child th:first-child,.results-table .column-filter-row td:first-child{position:relative;left:auto}}
.results-table th.reorderable-column{cursor:grab;touch-action:none;user-select:none}
.results-table th.reorderable-column:focus-visible{outline:2px solid var(--green);outline-offset:-3px}
.results-table.reordering-columns th:first-child,.results-table.reordering-columns .column-filter-row td:first-child,.results-table.reordering-columns tbody td:first-child{position:relative;left:auto}
.dragging-exam-column,.dragging-exam-column *{cursor:grabbing!important;user-select:none!important}
.column-drag-preview{position:fixed;z-index:3000;pointer-events:none;max-width:280px;padding:10px 16px;background:#28463e;color:#e2eee7;border:1px solid var(--green);border-radius:6px;font-size:12px;font-weight:700;box-shadow:0 6px 24px #0007}
.column-drop-marker{position:fixed;width:3px;z-index:2999;pointer-events:none;background:var(--green);box-shadow:0 0 0 1px #07191088}
.grid-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}

.assignment-trigger{border:1px solid var(--border,#36505c);border-radius:5px;background:transparent;color:inherit;padding:6px 8px;cursor:pointer;width:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.assignment-trigger:hover{background:#547e7833}
.assignment-dialog{width:min(460px,calc(100vw - 32px));max-height:80vh;overflow:auto;border:1px solid #44616c;border-radius:12px;background:var(--panel,#1b2832);color:var(--text,#e0e9ee);padding:22px;box-shadow:0 20px 70px #0008}
.assignment-dialog::backdrop{background:#0009}
.assignment-dialog h2{font-size:18px;margin:0}.assignment-dialog p{font-size:13px}
.assignment-results{display:grid;gap:6px;margin:12px 0;max-height:290px;overflow:auto}
.assignment-doctor{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;padding:10px;border:1px solid #44616c;border-radius:6px;background:transparent;color:inherit;cursor:pointer}
.assignment-doctor:hover,.assignment-doctor:focus-visible{background:#547e7833}.assignment-doctor span{font-size:12px;opacity:.8}

.study-image-count{display:block;font-size:10px;opacity:.8;margin-top:2px}


.results-toolbar .results-filter-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:1;min-width:0}.filter-shortcuts{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.filter-shortcut{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:16px;background:var(--surface);max-width:260px;overflow:hidden}.filter-shortcut button,.save-filter-shortcut{border:0;background:transparent;color:var(--text-secondary);cursor:pointer;font:inherit;font-size:11px;min-height:28px}.filter-shortcut-apply{padding:5px 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.filter-shortcut-apply[aria-pressed="true"]{background:var(--accent,#80b4a5);color:#12282c}.filter-shortcut-standard,.filter-shortcut-remove{flex:none;width:24px;padding:3px}.filter-shortcut-standard[aria-pressed="true"]{color:#e7bd70}.filter-shortcut button:hover,.save-filter-shortcut:hover{background:#547e7833}.save-filter-shortcut{border:1px dashed var(--line);border-radius:16px;padding:4px 10px;white-space:nowrap}.filter-shortcut button:disabled,.save-filter-shortcut:disabled{opacity:.55;cursor:wait}.filter-shortcut-default{display:flex;align-items:center;gap:7px;font-size:13px;margin:16px 0}#filter-shortcut-error{color:#efaaa2;min-height:18px}#filter-shortcut-summary{font-size:12px;opacity:.8}.results-tools{flex:none}

.column-filter-actions #save-filter-shortcut{flex:1;min-width:0;white-space:nowrap;padding:5px 6px;font-size:11px}
/* Report workspace: patient header, collapsible context and document ribbon. */
.app-shell.study-mode{max-width:none;margin:0;min-height:calc(100dvh - 66px)}
.study-mode .report-panel{padding:0 14px 8px;min-height:calc(100dvh - 66px);background:var(--canvas);display:flex;flex-direction:column}
.study-mode .report-heading{max-width:none;padding:9px 2px;border-bottom:1px solid var(--line);gap:12px}.study-mode .report-heading h2{font-size:16px;margin:0}.study-mode .report-heading .eyebrow{display:none}.study-mode .report-heading .draft-indicator{margin-left:auto}
.study-mode .report-form{max-width:none;width:100%;overflow:visible;padding:0;margin:0}.editor-patient-bar{display:flex;align-items:center;gap:18px;padding:11px 8px;border-bottom:1px solid var(--line);background:var(--surface)}
.study-mode .editor-patient-bar .patient-summary{margin:0;padding:0;border:0;background:transparent;flex:1.1;min-width:230px}.editor-patient-bar #report-patient-name{font-size:15px}.editor-patient-bar .exam-context-strip{flex:1.6;margin:0;padding:0;border:0;background:transparent;grid-template-columns:1.6fr 1fr .7fr}.editor-patient-bar .study-status-badge{flex:none}
.editor-context-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);padding:8px 0}.editor-context-tabs,.editor-navigation{display:flex;gap:5px;flex-wrap:wrap}.editor-context-tabs button{border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--text-secondary);padding:8px 12px;font-size:11px;cursor:pointer}.editor-context-tabs button[aria-pressed="true"]{border-color:var(--green);box-shadow:inset 0 -2px var(--green);color:var(--ink)}.editor-navigation .button{padding:7px 10px;font-size:11px;min-height:32px}
.editor-workspace-layout{position:relative;display:grid;grid-template-columns:286px minmax(0,1fr);gap:0;height:calc(100dvh - 247px);min-height:500px;border:1px solid var(--line);border-top:0}.editor-workspace-layout.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
.editor-sidebar{grid-column:1;min-width:0;background:var(--surface);border-right:1px solid var(--line);overflow:auto;padding:0 12px 14px}.editor-sidebar[hidden]{display:none}.editor-sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 0;margin-bottom:10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:1}.editor-sidebar-heading b{font-size:12px}.editor-sidebar-heading button{font-size:20px}
.editor-sidebar details{margin:8px 0;border:1px solid var(--line);border-radius:5px;padding:9px}.editor-sidebar summary{font-size:11px;font-weight:600;cursor:pointer;color:var(--text-secondary)}.editor-sidebar dl,.editor-document-heading dl{display:grid;grid-template-columns:auto 1fr;gap:8px 10px;font-size:11px;line-height:1.5}.editor-sidebar dt,.editor-document-heading dt{color:var(--muted)}.editor-sidebar dd,.editor-document-heading dd{margin:0;overflow-wrap:anywhere}.editor-sidebar .field{margin:12px 0}.editor-sidebar .field input,.editor-sidebar .field select{width:100%;min-width:0}.editor-sidebar .button{font-size:11px;padding:7px 9px}.editor-sidebar section>p{font-size:12px;color:var(--muted);line-height:1.5}.editor-sidebar h3{font-size:11px;margin:18px 0 8px}.editor-sidebar small{display:block;color:var(--muted);font-size:11px;line-height:1.5}
.editor-writing-area{grid-column:2;min-width:0;min-height:0;display:flex;flex-direction:column;background:var(--canvas)}.editor-report-state{margin:0;padding:7px 12px;font-size:11px;border-bottom:1px solid var(--line);background:var(--surface);color:var(--muted)}
.editor-ribbon-tabs{display:flex;flex-wrap:wrap;background:var(--surface);border-bottom:1px solid var(--line)}.editor-ribbon-tabs button{flex:1;min-width:80px;padding:10px 7px;color:var(--text-secondary);font-size:12px;font-weight:600;background:transparent;border:0;border-bottom:2px solid transparent;cursor:pointer}.editor-ribbon-tabs button[aria-selected="true"]{border-bottom-color:var(--green);background:var(--canvas);color:var(--ink)}
.editor-ribbon-panel{display:flex;align-items:center;flex-wrap:wrap;gap:9px;min-height:57px;padding:8px 12px;background:var(--surface);border-bottom:1px solid var(--line)}.editor-ribbon-panel[hidden],.editor-sidebar section[hidden],#formula-ellipsoid[hidden],#formula-percentage[hidden]{display:none!important}
.study-mode .editor-ribbon-panel .report-actions{margin:0;padding:0;border:0;display:flex;gap:7px;flex-wrap:wrap}.editor-ribbon-panel .button{font-size:11px;min-height:30px;padding:6px 10px}.editor-ribbon-panel .editor-topline{width:100%;margin:0}.editor-ribbon-panel .editor-topline>div:first-child{display:none}.editor-ribbon-panel .template-tools{justify-content:flex-start}.editor-ribbon-panel .editor-toolbar,.editor-ribbon-panel .editor-insert-row{background:transparent;border:0;padding:0;width:100%}.editor-workflow-control{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted);margin-left:auto}.editor-workflow-control select{padding:6px;border:1px solid var(--line);border-radius:5px;background:var(--canvas);color:var(--ink);max-width:145px}
.editor-document-scroll{flex:1;min-height:0;overflow:auto;padding:12px 25px 25px}.editor-ruler{display:flex;justify-content:space-between;max-width:794px;height:22px;padding:0 10px;margin:0 auto 10px;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(1% - 1px),var(--line) 1%);background-size:100% 7px;background-repeat:no-repeat;background-position:bottom;font-size:9px;color:var(--muted)}
.editor-document-page{width:100%;max-width:794px;min-height:900px;margin:0 auto;border:1px solid var(--line);background:var(--surface);box-shadow:0 5px 16px #0002;padding:38px 42px}.editor-document-heading{margin-bottom:22px;padding-bottom:15px;border-bottom:1px solid var(--line)}.editor-document-heading>b{display:block;text-align:center;font-size:16px;letter-spacing:.3px}.editor-document-heading>span{display:block;text-align:center;font-size:10px;letter-spacing:1.5px;color:var(--muted);margin:7px 0 18px}.editor-document-heading dl{grid-template-columns:auto 1fr auto 1fr;font-size:10px;gap:5px 10px}.editor-document-page .report-editor{min-height:580px;max-height:none;overflow:visible;border:0;border-radius:0;padding:0;box-shadow:none;background:transparent;line-height:1.75}.editor-document-page .report-editor:focus{border:0;box-shadow:none}.editor-document-scroll .signed-signature-panel{max-width:794px;margin:15px auto 0}.study-mode .medical-note{max-width:none;padding:7px 2px;margin:0;font-size:10px}
.editor-review-panel ul{display:flex;flex-wrap:wrap;gap:6px 18px;list-style:none;margin:0;padding:0;font-size:11px}.editor-review-panel li[data-ok="true"]{color:var(--green)}.editor-review-panel li[data-ok="false"]{color:var(--warning,#e4be77)}.editor-support-panel{align-items:flex-start;flex-direction:column;font-size:11px}.editor-support-panel #editor-review-checklist{display:flex;flex-wrap:wrap;gap:8px 16px}.editor-support-panel label{display:flex;align-items:center;gap:6px}.editor-support-panel small{color:var(--muted)}
.editor-phrase-card,.editor-history-card{border:1px solid var(--line);border-radius:5px;padding:10px;margin:8px 0}.editor-phrase-card b,.editor-history-card b{font-size:12px;display:block;overflow-wrap:anywhere}.editor-phrase-card p{font-size:11px;color:var(--muted);max-height:66px;overflow:auto;white-space:pre-wrap;margin:8px 0}.editor-phrase-card>div{display:flex;gap:8px;flex-wrap:wrap}.editor-phrase-card button,.editor-history-card a{font-size:11px}.editor-history-card small{margin:5px 0}.editor-history-card a{color:var(--green);display:inline-block;margin-top:5px}.editor-sidebar output{display:block;margin:14px 0;padding:10px;border:1px solid var(--line);border-radius:5px;font-size:13px}#editor-phrase-content{width:100%;min-height:160px;resize:vertical;background:var(--canvas);color:var(--ink);border:1px solid var(--line);border-radius:5px;padding:10px}#editor-phrase-error{color:var(--warning,#e4be77);font-size:12px}
@media(max-width:1000px){.editor-patient-bar{flex-wrap:wrap;gap:10px}.editor-patient-bar .exam-context-strip{flex:1;min-width:350px}.editor-workspace-layout{grid-template-columns:250px minmax(0,1fr);height:calc(100dvh - 270px)}.editor-document-scroll{padding:10px 12px 20px}.editor-document-page{padding:25px}.editor-context-bar{flex-wrap:wrap}.editor-ribbon-tabs button{font-size:11px;min-width:70px}}
@media(max-width:760px){.study-mode .report-panel{padding:0 7px 8px}.study-mode .report-heading{padding:9px 0}.study-mode .report-heading>div{order:0;width:auto}.editor-patient-bar{padding:10px}.editor-patient-bar .exam-context-strip{min-width:100%;grid-template-columns:1.5fr 1fr .7fr}.editor-context-tabs button{padding:7px 9px}.editor-workspace-layout,.editor-workspace-layout.sidebar-collapsed{grid-template-columns:minmax(0,1fr);height:calc(100dvh - 330px);min-height:500px}.editor-sidebar{position:absolute;inset:0 auto 0 0;width:min(320px,90%);z-index:8;box-shadow:5px 0 18px #0004}.editor-writing-area{grid-column:1}.editor-document-page{padding:20px 15px;min-height:720px}.editor-document-heading dl{grid-template-columns:auto 1fr}.editor-ribbon-panel{padding:8px}.editor-workflow-control{margin-left:0}.editor-ribbon-tabs{flex-wrap:nowrap;overflow:auto}.editor-ribbon-tabs button{flex:none}.editor-navigation .button{font-size:10px}}
@media print{.study-mode .report-heading,.editor-patient-bar,.editor-context-bar,.editor-sidebar,.editor-ribbon-tabs,.editor-ribbon-panel,.editor-report-state,.editor-ruler{display:none!important}.editor-workspace-layout,.editor-workspace-layout.sidebar-collapsed{display:block;height:auto;min-height:0;border:0}.editor-writing-area,.editor-document-scroll{display:block;overflow:visible;height:auto;padding:0}.editor-document-page{padding:0;border:0;box-shadow:none;max-width:none;min-height:0}.editor-document-page .report-editor{min-height:0}.study-mode .report-panel{padding:0;min-height:0}}

.editor-workspace-layout [hidden]{display:none!important}

#report-identifiers-dialog .field{margin:12px 0}#report-identifiers-dialog p{font-size:12px;line-height:1.5}#report-identifiers-error{color:var(--warning,#e4be77);min-height:18px}

/* Optional grayscale workspace. Dark defaults above remain unchanged. */
@media screen {
 html[data-theme="light"] {
  color-scheme:light;
  --canvas:#dedede;--surface:#e8e8e8;--surface-raised:#e6e6e6;--surface-soft:#dedede;
  --ink:#242424;--text-secondary:#414141;--muted:#606060;--line:#bdbdbd;
  --paper:#ededed;--green:#454545;--green-dark:#303030;--mint:#e4e4e4;
  --lime:#d6d6d6;--amber:#65502e;--navy:#dedede;--on-accent:#fff;
  --danger:#9b2929;--warning:#79531b;--info:#414141;
  --input-bg:#f0f0f0;--input-border:#9c9c9c;--shadow:0 10px 32px #00000012;
  --panel:#e8e8e8;--text:#242424;--border:#bdbdbd;--surface-2:#e6e6e6;--accent:#454545;
 }
 html[data-theme="light"] body{scrollbar-color:#888 #e6e6e6}
 html[data-theme="light"] ::selection{background:#ccc;color:#111}
 html[data-theme="light"] :is(.topbar,.modal-card,.auth-card,.assignment-dialog,.viewer-section,.report-editor,.date-filter-menu,.date-presets,.date-custom,.native-transfer-card){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-theme="light"] :is(.results-table thead,.results-table th,.results-table .column-filter-row td,.results-table thead tr:first-child th:first-child,.results-table .column-filter-row td:first-child){background:#e0e0e0;color:var(--ink);border-color:var(--line)}
 html[data-theme="light"] :is(.results-table tbody tr:hover,.results-table tbody tr:hover td:first-child,.study-row:hover,.study-row.active){background:#e7e7e7;border-color:var(--line)}
 html[data-theme="light"] :is(.button-secondary,.header-action,.topbar .dashboard-icon-action,.dashboard .dashboard-icon-action,.topbar #dicom-import-open,.results-table td .result-icon-action,.results-table td .result-report-link.result-icon-action,.results-table td .result-report-link.result-icon-action[aria-label="Laudar"],.results-table td .result-viewer-link.result-icon-action,.study-status-badge,.connection,.count-pill,.editor-toolbar,.editor-insert-row,.user-form-heading,.report-layout-savebar,.report-logo-dropzone,.report-logo-preview,.logo-preview-row,.report-layout-preview pre,.column-drag-preview){background:var(--surface-raised);color:var(--ink);border-color:var(--input-border)}
 html[data-theme="light"] :is(.button-secondary:hover,.header-action:hover,.topbar .dashboard-icon-action:hover,.dashboard .dashboard-icon-action:hover,.editor-toolbar button:hover,.editor-color:hover,.assignment-doctor:hover,.assignment-trigger:hover){background:#d6d6d6;color:var(--ink);border-color:#777}
 html[data-theme="light"] :is(.viewer-intro p,.viewer-section p,.viewer-summary,.viewer-summary b,.viewer-section h4,.viewer-section small,.viewer-section p.viewer-note,.viewer-folder-line>span,.study-registration-footer span,.report-editor h3){color:var(--text-secondary)}
 html[data-theme="light"] :is(.viewer-notice,.study-registration-scope,.signing-note,.signed-signature-panel,.dicom-import-notice,.edit-admin-password-field){background:#ededed;color:var(--ink);border-color:#aaa}
 html[data-theme="light"] :is(.connection.error,.form-error){background:#fff0f0;color:var(--danger);border-color:#d5a0a0}
 html[data-theme="light"] .connection.pending{background:#eee;color:var(--text-secondary)}
 html[data-theme="light"] :is(.status-dot,.exam-status-dot){background:#666;box-shadow:0 0 0 3px #ddd}
 html[data-theme="light"] .connection.error .status-dot{background:var(--danger);box-shadow:0 0 0 3px #efd5d5}
 html[data-theme="light"] :is(input,textarea)::placeholder{color:#6b6b6b!important}
 html[data-theme="light"] #study-registration-fields :is(input,textarea){background:var(--input-bg);color:var(--ink);border-color:var(--input-border)}
 html[data-theme="light"] input[type=file]::file-selector-button{background:#e6e6e6;color:#242424;border-color:#999}
 html[data-theme="light"] .grid-date-popup .date-range-inputs input{color-scheme:light}
 html[data-theme="light"] .calendar-days button.calendar-in-range{background:#ddd;color:#222}
 html[data-theme="light"] .grid-scrollbar{background:#ddd;scrollbar-color:#888 #ddd}
 html[data-theme="light"] #grid-scrollbar-thumb{background:#888;box-shadow:none}
 html[data-theme="light"] #grid-scrollbar-thumb:hover{background:#666}
 html[data-theme="light"] .toast{background:#eee;color:#222;border-color:#999;box-shadow:0 8px 26px #0002}
 html[data-theme="light"] .modal{background:#0006}
 html[data-theme="light"] .editor-document-page{background:var(--paper)}
}

@media screen{
html[data-theme="light"] .filter-shortcut-apply[aria-pressed="true"]{background:#454545;color:#fff}
html[data-theme="light"] .filter-shortcut-standard[aria-pressed="true"]{color:#555}
html[data-theme="light"] #filter-shortcut-error{color:var(--danger)}
}

.priority-dialog{width:min(560px,calc(100vw - 32px))}
.priority-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0}
.priority-fields .field{min-width:0;align-content:start}.priority-fields .field>span{font-size:12px}
.priority-fields input,.priority-fields select{width:100%;min-width:0;background:var(--input-bg);color:var(--ink);border:1px solid var(--input-border);padding:8px;border-radius:4px}
.priority-fields input[type=color]{height:37px;padding:3px}.priority-fields small,.priority-switches small{font-size:10px;color:var(--muted);line-height:1.5}
.priority-groups{grid-column:1/-1}.priority-switches{display:grid;gap:15px}
.priority-switches label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px;font-size:12px}.priority-switches small{grid-column:1/-1}
.priority-switches input{appearance:none;width:44px;height:24px;border-radius:14px;background:var(--surface-soft);border:1px solid var(--input-border);position:relative;cursor:pointer}
.priority-switches input:before{content:'';position:absolute;width:18px;height:18px;top:2px;left:2px;border-radius:50%;background:var(--ink);transition:transform .15s}
.priority-switches input:checked{background:var(--green)}.priority-switches input:checked:before{transform:translateX(19px);background:var(--on-accent)}
.priority-footer{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line);padding-top:16px;margin-top:20px}
.priority-badge{display:inline-block;justify-self:start;width:fit-content;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:700;background:var(--surface-raised);color:var(--ink);overflow-wrap:anywhere}
.priority-pending{outline:1px dashed currentColor;outline-offset:2px}
.priority-select{width:100%;max-width:100%;min-width:0;padding:6px 8px;border:1px solid var(--input-border);border-radius:5px;font-size:11px;cursor:pointer;background:var(--input-bg);color:var(--ink)}
.priority-select option{background:var(--input-bg);color:var(--ink)}
.results-table .priority-highlight>td{color:var(--priority-color)!important}
.results-table .priority-highlight>td[data-column=series] small{color:inherit}
#priority-error{color:var(--danger);font-size:12px;min-height:18px}
@media(max-width:500px){.priority-fields{grid-template-columns:1fr}.priority-groups{grid-column:1}}
@media print{.priority-dialog{display:none!important}}

.priority-manage{margin-top:16px}.priority-manage select{background:var(--input-bg);color:var(--ink);border:1px solid var(--input-border);border-radius:4px;padding:8px;width:100%}
.priority-fields [hidden]{display:none!important}

/* Selection stays beside the pinned action column. */
.results-table [data-column="selection"]{text-align:center!important;width:46px;padding:8px!important}
.results-table tbody td[data-column="selection"]{position:sticky;left:var(--grid-actions-width,162px);z-index:2;background:var(--surface);border-right:1px solid var(--line)}
.results-table thead [data-column="selection"]{position:sticky;left:var(--grid-actions-width,162px);z-index:4;background:var(--surface);border-right:1px solid var(--line)}
.results-table [data-column="selection"] input{width:17px;height:17px;min-height:0;margin:0;cursor:pointer;accent-color:var(--green)}
.results-table .study-row-selected{outline:1px solid var(--green);outline-offset:-1px}

.editor-document-branding{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:16px}.editor-document-branding:has(img[hidden]):has(button[hidden]){display:none}.editor-document-branding img{max-width:270px;max-height:82px;object-fit:contain}.editor-qr-slot{width:72px;height:72px;flex:none}.editor-document-heading dl{display:grid;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);column-gap:10px;row-gap:8px}.editor-document-heading dd{overflow-wrap:anywhere;min-width:0}#report-layout-preview.report-preview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 24px;padding:18px;background:var(--surface);color:var(--ink);border:1px solid var(--line);font-size:12px;line-height:1.5}.report-preview-grid>span{overflow-wrap:anywhere}.report-preview-wide{grid-column:1/-1}.report-qr-future{opacity:.8}.report-qr-future input:disabled{cursor:not-allowed}.report-preview-logo{max-width:220px;max-height:70px;object-fit:contain;grid-column:1/-1}

@media(max-width:760px){.editor-document-heading dl{grid-template-columns:auto minmax(0,1fr)}}

.editor-logo-area{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.editor-logo-area .text-button{font-size:10px;padding:0}

/* Reserve the complete action strip before allowing column resizing. */
.results-table .result-action-group{flex-wrap:nowrap;width:max-content;min-width:max-content}

.results-table .result-action-group>.result-report-link:disabled{opacity:.4;cursor:not-allowed;transform:none;box-shadow:none}

/* Responsive workstation: use available space without stretching the report page. */
@media screen {
  :root{--app-header-height:66px;--workspace-gap:clamp(10px,1.4vw,28px)}
  body{min-width:320px}
  .topbar{height:auto;min-height:60px;padding:10px var(--workspace-gap);gap:clamp(6px,1vw,16px);flex-wrap:wrap}
  .topbar>.brand{flex:none;max-width:clamp(100px,18vw,240px);min-width:0}
  .topbar .brand-logo-image{max-width:100%;object-fit:contain}
  .topbar .user-chip{min-width:0;max-width:clamp(100px,18vw,230px)}
  .topbar .dashboard-icon-action{flex-shrink:0}
  .dashboard{width:100%;max-width:none;height:calc(100dvh - var(--app-header-height));min-height:360px;padding:12px var(--workspace-gap) 10px;display:flex;flex-direction:column;gap:0}
  .dashboard-heading,.results-toolbar,.pagination,.dashboard-footnote{flex-shrink:0}
  .dashboard-heading{flex-wrap:wrap;gap:8px;margin-bottom:10px}
  .results-toolbar{flex-wrap:wrap;gap:8px}
  .grid-filter-form{display:flex;flex:1;flex-direction:column;min-height:0}
  .results-frame{height:auto;flex:1;min-height:160px;width:100%}
  .results-frame .results-wrap{min-width:0}
  .results-table tbody td{font-size:clamp(11px,.75vw,13px)}
  .results-table thead th{font-size:clamp(9px,.65vw,11px)}
  .filter-shortcuts{min-width:0}
  .filter-shortcut{max-width:min(260px,55vw)}
  .app-shell.study-mode{width:100%;max-width:1920px;margin:0 auto;height:calc(100dvh - var(--app-header-height));min-height:480px}
  .app-shell.study-mode .report-panel{height:100%;min-height:0;padding:0 var(--workspace-gap) 8px;overflow:visible}
  .study-mode .report-form{display:flex;flex-direction:column;flex:1;min-height:0;overflow:visible}
  .study-mode .report-heading,.editor-patient-bar,.editor-context-bar{flex-shrink:0}
  .editor-patient-bar{flex-wrap:wrap;gap:8px 16px;padding:9px 10px}
  .editor-patient-bar .exam-context-strip{min-width:240px}
  .editor-context-bar{flex-wrap:wrap;gap:6px;padding:6px 0}
  .editor-workspace-layout{flex:1;height:auto;min-height:220px;grid-template-columns:clamp(220px,19vw,320px) minmax(0,1fr)}
  .editor-workspace-layout.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}
  .editor-ribbon-tabs,.editor-ribbon-panel,.editor-report-state{flex-shrink:0}
  .editor-document-scroll{padding:12px clamp(10px,2vw,30px) 24px}
  .editor-document-page{padding:clamp(18px,2.5vw,38px) clamp(16px,3vw,42px)}
  .modal{padding:var(--workspace-gap)}
  .modal-card{max-width:calc(100vw - 2 * var(--workspace-gap));max-height:calc(100dvh - 2 * var(--workspace-gap));padding:clamp(16px,2vw,28px)}
  #admin-modal>.modal-card{width:min(1040px,100%)}
  .admin-tabs{flex-wrap:wrap;gap:4px 18px}
  .modal-heading{gap:10px}
  .modal-heading>div{min-width:0}
  .modal-heading h2{overflow-wrap:anywhere}
  .auth-card{max-width:calc(100vw - 28px)}
}
@media screen and (max-width:760px){
  .topbar{gap:6px;padding:8px 10px}
  .topbar .user-chip{max-width:120px}
  .dashboard{padding:10px 8px 8px;min-height:400px}
  .dashboard-heading{flex-direction:row;align-items:center}
  .dashboard-actions{width:auto;gap:6px}
  .results-tools{margin-left:auto}
  .pagination{flex-direction:row;align-items:center;flex-wrap:wrap}
  .editor-patient-bar .patient-summary{min-width:0;flex-basis:100%}
  .editor-patient-bar .exam-context-strip{min-width:0;flex-basis:100%}
  .editor-workspace-layout,.editor-workspace-layout.sidebar-collapsed{grid-template-columns:minmax(0,1fr);height:auto;min-height:220px}
  .editor-sidebar{width:min(300px,90%)}
  .editor-document-heading dl{grid-template-columns:auto minmax(0,1fr)}
  .editor-document-page{padding:18px 16px}
  .editor-ribbon-tabs button{font-size:11px;min-width:70px;padding:8px 6px}
}
@media screen and (max-height:600px){
  .app-shell.study-mode{min-height:540px;height:auto}
  .editor-workspace-layout{height:360px;flex:none}
  .dashboard{height:auto;min-height:calc(100dvh - var(--app-header-height))}
  .results-frame{height:260px;flex:none}
}

.ohif-tabs-links{display:grid;gap:8px;margin:14px 0;max-height:50dvh;overflow:auto}.ohif-tabs-links .button{justify-content:flex-start;white-space:normal;text-align:left;overflow-wrap:anywhere}.results-tools{flex-wrap:wrap}

.attachment-pdf-dialog{width:min(1200px,calc(100vw - 24px));height:min(940px,calc(100dvh - 24px));max-width:none;max-height:none;margin:auto;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:0 18px 80px #0008}
.attachment-pdf-dialog[open]{display:flex;flex-direction:column;gap:10px}.attachment-pdf-dialog::backdrop{background:#0009}
.attachment-pdf-dialog .modal-heading{flex:none}.attachment-pdf-dialog h2{font-size:16px;min-width:0;overflow-wrap:anywhere}.attachment-pdf-dialog .modal-heading .icon-button{flex:none}
.attachment-pdf-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:7px;flex:none}.attachment-pdf-toolbar label{display:flex;align-items:center;gap:5px;font-size:12px}.attachment-pdf-toolbar input,.attachment-pdf-toolbar select{border:1px solid var(--input-border);border-radius:5px;background:var(--input-bg);color:var(--ink);padding:7px;min-width:0}.attachment-pdf-toolbar input{width:60px}.attachment-pdf-toolbar .button{font-size:12px;padding:7px 10px;text-decoration:none;min-height:32px}.attachment-pdf-toolbar button:disabled{opacity:.4;cursor:default}
.attachment-pdf-viewport{min-height:0;min-width:0;flex:1;overflow:auto;background:#41464a;border:1px solid var(--line);padding:16px;scrollbar-gutter:stable}.attachment-pdf-viewport canvas{display:block;margin:0 auto;background:white;box-shadow:0 3px 14px #0005}.attachment-pdf-viewport canvas[hidden]{display:none}#attachment-pdf-status{font-size:12px;min-height:18px;margin:0;flex:none;color:var(--muted)}
@media(max-width:600px){.attachment-pdf-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);padding:10px;gap:6px}.attachment-pdf-toolbar{gap:5px}.attachment-pdf-toolbar .button{font-size:11px;padding:6px}.attachment-pdf-viewport{padding:10px}}

.attachment-pdf-toolbar [hidden]{display:none!important}

/* Keep report header settings above the separate footer block. */
.report-layout-area .report-layout-fields,.report-layout-area .report-logo-controls{grid-template-columns:minmax(0,1fr)}

/* Explain when patient identifiers are needed without crowding the ribbon. */
#editor-identifiers-action{flex-direction:column;gap:2px;line-height:1.25}
#editor-identifiers-action small{font-size:10px;font-weight:400;opacity:.8}

/* Personal password settings share the authenticated configuration dialog. */
.account-password-form{display:grid;gap:14px;width:100%;max-width:420px}
.account-password-form .pane-description{margin:0;font-size:12px;line-height:1.5}
.account-password-form .field small{font-size:11px;font-weight:400;color:var(--muted)}
.account-password-status{color:var(--green);font-size:13px;margin:0}

/* Compact workstation viewer choice in the exam-queue header. */
.viewer-quick-select{height:34px;min-width:96px;max-width:124px;border:1px solid var(--input-border);border-radius:6px;background:var(--input-bg);color:var(--ink);padding:5px 8px;font-size:12px;cursor:pointer}
.viewer-quick-select:focus-visible{outline:2px solid var(--green);outline-offset:2px}

/* Connection status is an administrator-only diagnostic indicator. */
#connection[hidden]{display:none!important}

/* Report mask library: independent list/preview composition, keyboard-friendly dialogs. */
.report-masks-dialog,.report-mask-edit-dialog{color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px;width:min(1180px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow:auto}
.report-masks-dialog::backdrop,.report-mask-edit-dialog::backdrop{background:#0009}
.report-masks-dialog .modal-heading,.report-mask-edit-dialog .modal-heading{gap:16px}.report-masks-dialog h2{margin:3px 0 6px}
.report-masks-filters{display:grid;grid-template-columns:2fr 1fr 1.2fr 1fr;gap:12px;margin:16px 0}
.report-masks-options,.report-mask-maintenance,.report-mask-format,.report-masks-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.report-masks-options{font-size:12px}.report-masks-options label{display:flex;align-items:center;gap:6px}
.report-masks-workspace{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr);gap:18px;margin:14px 0}
.report-masks-results{min-width:0;max-height:52vh;overflow:auto;border:1px solid var(--line);border-radius:8px;padding:12px}
#report-masks-count{font-size:12px;color:var(--muted);margin-bottom:10px}.report-mask-card{display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;border:1px solid var(--line);border-radius:7px;padding:10px;margin-bottom:8px}.report-mask-card.selected{border-color:var(--green)}
.report-mask-card button{border:0;background:transparent;color:var(--ink);padding:0;text-align:left;white-space:normal}.report-mask-card b,.report-mask-card small{display:block;overflow-wrap:anywhere}.report-mask-card small{color:var(--muted);font-size:11px;margin-top:5px}.report-mask-card input{margin-top:3px}
.report-mask-preview-panel{min-width:0;display:flex;flex-direction:column;gap:10px}.report-mask-preview-panel h3{margin:0;font-size:16px}#report-mask-preview-meta{margin:0;font-size:12px;color:var(--muted)}
.mask-rich-text{font:14px/1.6 Arial,sans-serif;overflow-wrap:anywhere;overflow:auto;max-width:100%;border:1px solid var(--line);border-radius:7px;padding:16px;background:var(--surface-raised);color:var(--ink)}
#report-mask-preview{min-height:260px;max-height:43vh}.mask-rich-text table{max-width:100%;border-collapse:collapse}.mask-rich-text td,.mask-rich-text th{padding:4px;border:1px solid var(--line)}.mask-rich-text p{margin:0 0 10px}
.report-masks-footer{border-top:1px solid var(--line);padding-top:14px;justify-content:flex-end}.report-masks-footer p{flex:1;min-width:220px;font-size:12px;color:var(--muted);margin:0;line-height:1.5}
.report-mask-edit-dialog{width:min(940px,calc(100vw - 24px))}.report-mask-edit-dialog form{display:grid;gap:14px}.report-mask-metadata{display:grid;grid-template-columns:2fr 1fr 1.2fr;gap:12px}.report-mask-format button{background:var(--surface-raised);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:5px 10px;min-width:30px}.report-mask-content{min-height:280px;max-height:48vh;outline:none}.report-mask-content:focus{border-color:var(--green)}
#report-mask-versions{max-height:160px;overflow:auto;font-size:12px}#report-mask-versions button{display:block;margin:6px 0}
@media(max-width:760px){.report-masks-filters,.report-mask-metadata{grid-template-columns:1fr 1fr}.report-masks-workspace{grid-template-columns:1fr}.report-masks-results{max-height:28vh}#report-mask-preview{min-height:180px;max-height:30vh}.report-masks-dialog,.report-mask-edit-dialog{padding:14px}.report-masks-footer .button{white-space:normal}.report-masks-options .topbar-spacer{display:none}}
@media(max-width:420px){.report-masks-filters,.report-mask-metadata{grid-template-columns:1fr}.report-mask-content{min-height:210px}}
.report-masks-dialog [hidden],.report-mask-edit-dialog [hidden]{display:none!important}.report-mask-card small{grid-column:2}

.patient-scanner-controls{border:1px solid var(--line);border-radius:8px;padding:12px;margin:14px 0}.patient-scanner-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.patient-scanner-controls [hidden],#patient-scanner-controls[hidden]{display:none!important}#patient-scanner-status{font-size:12px;color:var(--muted);line-height:1.5;margin:8px 0 0}#scanner-install-dialog{max-width:min(620px,calc(100vw - 24px));padding:22px}#scanner-install-dialog p,#scanner-install-dialog li{line-height:1.6}#scanner-install-dialog li{margin-bottom:8px}
.pacs-mode-banner { padding: 10px 16px; background: #fff0bd; color: #342700; text-align: center; font: 600 13px system-ui, sans-serif; }
.pacs-mode-banner[hidden] { display: none; }

.account-profile-dialog{width:min(640px,calc(100vw - 32px));max-height:85dvh;overflow:auto;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:24px}.account-profile-dialog::backdrop{background:rgba(0,0,0,.55)}.account-profile-dialog .field{margin-bottom:14px}.account-profile-dialog h2{margin-top:0}.account-profile-buttons{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}

.account-profile-dialog .form-error:empty{display:none}

#license-banner[hidden],#license-blocker[hidden]{display:none!important}#license-banner{position:fixed;top:0;left:0;right:0;z-index:10050;padding:10px 18px;background:#66501e;color:#fff3cd;font-size:13px;line-height:1.4;border-bottom:1px solid #bd9951}body{padding-top:var(--license-banner-size,0px)}.topbar{top:var(--license-banner-size,0px)}#license-blocker{position:fixed;inset:0;z-index:200000;background:var(--canvas);color:var(--ink);display:grid;place-items:center;padding:24px}#license-blocker section{max-width:600px;background:var(--paper);padding:30px;border:1px solid var(--line);border-radius:12px}#license-block-contact{overflow-wrap:anywhere}

.connector-split{display:inline-flex;align-items:stretch;flex:0 0 auto}.results-table td .connector-split .result-osirix-action{border-radius:8px 0 0 8px}.results-table td .connector-series-arrow{width:19px;min-width:19px;height:30px;padding:0;border-radius:0 8px 8px 0;margin:0!important;border-left:0;font-size:12px}.connector-series-menu{position:fixed;z-index:10000;width:min(340px,calc(100vw - 16px));max-height:min(320px,calc(100vh - 16px));overflow:auto;background:var(--paper,#fff);color:var(--ink,#18231f);border:1px solid var(--line,#ddd);border-radius:9px;box-shadow:0 12px 32px #0003;padding:12px;font:13px system-ui,sans-serif}.connector-series-content{display:grid;gap:8px;margin-top:8px}.connector-series-all,.connector-series-item{display:flex;align-items:flex-start;gap:8px;cursor:pointer}.connector-series-all{padding:5px 0;border-bottom:1px solid var(--line,#ddd)}.connector-series-list{display:grid;gap:4px;max-height:190px;overflow:auto}.connector-series-item{padding:5px;border-radius:5px}.connector-series-item:hover{background:var(--canvas,#f4f6f2)}.connector-series-item span{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}.connector-series-item small{color:var(--muted,#666)}.connector-series-download{justify-self:end}

.editor-viewer-split #editor-open-images{height:32px;min-width:32px;padding:0 5px}
.editor-viewer-split:has(#editor-series-arrow:not([hidden])) #editor-open-images{border-radius:8px 0 0 8px}
.editor-viewer-split #editor-series-arrow{width:19px;min-width:19px;height:32px;min-height:32px;padding:0;border-radius:0 8px 8px 0;margin:0;border-left:0;font-size:12px}

.findings-panel{display:flex;flex-direction:column;align-items:stretch}.findings-panel[hidden]{display:none}.findings-group{display:flex;gap:12px;flex-wrap:wrap}.finding-button{flex:1;min-width:120px;padding:12px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font-weight:700;text-transform:uppercase}.finding-button[aria-pressed="true"][data-finding="normal"]{background:#b9e6c8;color:#123c23}.finding-button[aria-pressed="true"][data-finding="pathological"]{background:#ffda36;color:#242000}.finding-button[aria-pressed="true"][data-finding="critical"]{background:#b82020;color:#fff}.finding-button:disabled{opacity:.65}.finding-badge{display:block;font-size:11px;font-weight:700;margin-top:4px}.finding-badge.critical{color:#cf3333}.finding-badge.pathological{color:#a57200}.finding-badge.normal{color:#237c42}

.findings-group{gap:6px}.editor-ribbon-panel .finding-button{flex:0 0 auto;min-width:0;min-height:30px;padding:6px 12px;font-size:11px;font-weight:600;text-transform:none}.findings-panel #finding-status:empty{display:none}

.group-mine-filter{display:inline-flex;align-items:center;gap:5px;font-size:11px;white-space:nowrap}.group-mine-filter input{width:auto}.group-scenarios-dialog{width:min(720px,calc(100vw - 24px));max-height:90vh;overflow:auto}.group-scenarios-dialog section{border-top:1px solid var(--line);padding:10px 0}.group-scenarios-dialog .field{display:grid;gap:4px;margin:8px 0}.group-scenarios-dialog select[multiple]{min-height:120px}.group-scenario-actions{display:flex;gap:8px;flex-wrap:wrap}#group-scenarios-status{color:var(--ink);white-space:pre-wrap}
#group-scenarios-open[hidden]{display:none!important}

#filter-assigned-me-wrap[hidden]{display:none!important}.column-filter-row .group-mine-filter input[type=checkbox]{display:inline-block;width:14px;height:14px;min-height:0;padding:0;margin:0;accent-color:var(--green)}

.group-scenarios-pane section{border-top:1px solid var(--line);padding:10px 0}.group-scenarios-pane .field{display:grid;gap:4px;margin:8px 0}.group-scenarios-pane select[multiple]{min-height:120px}

#scenarios-pane{font-size:12px;line-height:1.4}#scenarios-pane h3{font-size:14px;margin:10px 0 7px}#scenarios-pane p{font-size:12px;margin:6px 0}#scenarios-pane .field span{font-size:11px}#scenarios-pane input,#scenarios-pane select{font-size:12px}#scenarios-pane small{font-size:11px}#scenarios-pane .button{font-size:11px;min-height:30px;padding:6px 10px}

.shared-filter-panel .shared-filter-groups{border:1px solid var(--line);border-radius:7px;padding:10px;margin:10px 0}.shared-filter-groups legend{font-weight:700;font-size:12px}.shared-filter-groups div{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:7px}.shared-filter-groups label{display:flex;gap:6px;align-items:center;font-size:12px}.shared-filter-groups input{width:auto}.legacy-scenarios{border-top:1px solid var(--line);padding-top:10px;margin-top:12px}.legacy-scenarios>summary{cursor:pointer;font-weight:600}

/* Critérios da fila nos filtros compartilhados. */
.shared-filter-criteria{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
#shared-filter-finding-wrap[hidden],#shared-filter-date-range[hidden]{display:none!important}
@media(max-width:600px){.shared-filter-criteria{grid-template-columns:1fr}}

#filter-share-admin[hidden],#filter-share-targets[hidden]{display:none!important}.filter-share-list{display:flex;flex-wrap:wrap;gap:6px 14px;max-height:120px;overflow:auto;padding:6px 0}.filter-share-list label{display:inline-flex;align-items:center;gap:5px;font-size:12px}.filter-share-list label[hidden]{display:none}.assignment-dialog #filter-share-targets fieldset{margin:8px 0;padding:6px 10px}#filter-share-search{max-width:100%}

.filter-share-dropdown{border:1px solid #d5dfe5;border-radius:6px;padding:7px 10px;margin:8px 0}.filter-share-dropdown summary{cursor:pointer;font-size:12px;font-weight:600}.filter-share-dropdown .filter-share-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}#filter-share-edit-criteria[hidden]{display:none!important}
