/* Visual proposal, isolated from the original prototype and hospital systems. */
.clinic-checks [hidden]{display:none!important}
.brand img{max-width:100%}
:root{--bg:#f5f7fa;--surface:#fff;--ink:#172b43;--muted:#64758a;--line:#e3e9f0;--blue:#2965c7;--soft:#eef4ff;--teal:#34abb3;--nav:#142c47;--green:#197355;--greenbg:#edf8f2;--amber:#95520c;--amberbg:#fff4de;--red:#a93650;--redbg:#fff0f2;--shadow:0 3px 12px #243a5604}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;font-size:1rem;letter-spacing:-.012em}
.sidebar{width:216px;background:var(--surface);border-right:1px solid var(--line);color:var(--ink);padding:30px 16px 18px}
.sidebar .brand{background:none;border-radius:0;margin:0 12px 46px;padding:0}
.brand img{width:142px;height:37px;object-fit:contain}
.nav-item{font-size:15px;gap:13px;padding:13px 15px;border-radius:8px;margin:4px 0;color:#607188;font-weight:550;transition:background .15s}
.nav-item:hover{background:var(--bg);color:var(--ink)}
.nav-item.active{color:var(--blue);background:#edf3ff;font-weight:650}
.nav-item.active:before{background:var(--blue);height:20px;left:0;width:3px}
.nav-item .ico{width:20px;height:20px;stroke-width:1.7}
.sidebar-bottom .nav-item{font-size:14px;padding:10px 15px}
.sidebar-bottom .profile-link{border-top:0!important;margin-top:2px!important;padding-top:10px!important;border-radius:8px!important}
.sidebar-bottom .vendor{border-top:1px solid var(--line);margin:22px 12px 0;padding:24px 0 0!important}
.vendor img{max-width:116px;background:#fff;padding:0;border-radius:0;opacity:.82}
.shell{margin-left:216px}
.topbar{height:70px;padding:0 34px;box-shadow:none;position:sticky;backdrop-filter:none}
.crumb{font-size:14px;gap:14px}.crumb>span:first-child{color:var(--muted)}
.top-actions{gap:12px}.sample-label{font-size:12px;color:var(--muted);padding:4px 9px;border:1px solid var(--line);border-radius:5px;margin-right:8px}
.search-trigger{width:265px;height:37px;background:var(--bg);border-color:var(--line);font-size:14px}
.icon-button{width:37px;height:37px;border-radius:7px}.icon-button.bare:hover{background:var(--bg)}
main{padding:30px 34px 40px;max-width:1800px}h1{font-size:30px;font-weight:700;letter-spacing:-.04em;line-height:1.25}h2{font-size:16px;letter-spacing:-.015em;font-weight:650}h3{font-size:15px;font-weight:650}
.page-head{margin-bottom:24px;min-height:45px}.page-head p{font-size:14px;line-height:1.5}.head-actions{display:flex;gap:9px}
.button{font-size:14px;min-height:37px;padding:8px 13px;border-color:#dbe3ee;border-radius:7px;line-height:1.35;font-weight:550;box-shadow:0 1px 2px #192c4205}
.button.primary{background:var(--blue);box-shadow:0 2px 3px #2965c718}.button.quiet{box-shadow:none}.text-link{font-size:14px;font-weight:600}
.segmented{background:#eaf0f6;border:0;padding:4px;border-radius:8px}.segmented button{font-size:14px;padding:8px 15px}.segmented button.active{box-shadow:0 1px 3px #172b4315}
.card{border-radius:11px;box-shadow:var(--shadow);border-color:var(--line)}.card-head{padding:18px 20px;min-height:59px}.card-body{padding:21px}.card-foot{padding:13px 20px;min-height:44px;font-size:12px;line-height:1.5}.card-foot>.ico{width:16px;height:16px}
.card-head .count{font-size:12px;background:var(--soft);color:var(--blue);padding:3px 7px;margin-left:7px}
.badge{font-size:12px;font-weight:600;border-radius:5px;padding:4px 8px}.badge:not(.blue):not(.amber):not(.red):not(.green){background:#f0f3f7;color:#65748a}
.avatar{width:35px;height:35px;border:1px solid #dce7f7;border-radius:9px;color:#3566ab;background:#f1f5fc;font-weight:600}
.overview-strip{display:grid;grid-template-columns:repeat(3,1fr);background:var(--surface);border:1px solid var(--line);border-radius:10px;margin-bottom:24px;padding:18px 0}
.overview-strip>a,.overview-strip>div,.overview-strip>button{display:flex;align-items:center;gap:15px;padding:2px 26px;border:0;border-right:1px solid var(--line);background:none;text-align:left;color:var(--ink)}
.overview-strip>:last-child{border-right:0}.overview-icon{height:44px;width:44px;background:var(--soft);display:grid;place-items:center;color:var(--blue);border-radius:10px;flex:none}
.overview-strip strong{font-size:25px;font-weight:650;line-height:1.2;display:block}.overview-strip span>span{font-size:13px;color:var(--muted);display:block;margin-top:4px}
.dashboard{grid-template-columns:minmax(0,2.15fr) minmax(300px,1fr);gap:22px}.stack{gap:22px}
.work-queue th{font-size:12px;padding:13px 17px}.work-queue td{padding:21px 17px}.work-queue td:first-child{width:24%}.work-queue td:last-child{width:90px}.work-queue td:nth-child(3){width:118px}.work-queue td strong{font-size:14px;font-weight:600;line-height:1.5}.work-queue td small{font-size:12px;margin-top:4px}.work-queue .patient-cell{min-width:143px}.work-queue .button{min-height:33px;font-size:13px;padding:6px 10px}
.activity{padding:17px 20px;gap:13px}.activity strong{font-size:14px;line-height:1.5;display:block;font-weight:600}.activity p{font-size:13px}.activity small{font-size:12px;margin-top:4px}.activity-icon{width:33px;height:33px;background:#f0f4fa;color:#5b79a4;border-radius:8px}.activity-icon.lab{color:#187b83;background:#eef9f8}.activity-icon.transfer{color:#93680e;background:#fff6e7}.activity-icon .ico{width:17px;height:17px}.changes-card .card-head>.ico{color:var(--muted);width:18px}
.watch-grid{display:grid;grid-template-columns:repeat(3,1fr)}.watch-patient{display:flex;align-items:center;gap:10px;padding:21px 16px;border-right:1px solid var(--line)}.watch-patient:last-child{border:0}.watch-patient strong{font-size:14px;display:block}.watch-patient small{font-size:12px;display:block;margin-top:3px}.watch-patient>.ico{margin-left:auto;width:15px;color:var(--muted)}
.draft-empty{display:flex;gap:10px;align-items:center;padding:25px 20px;color:var(--muted);font-size:14px}.draft-empty .ico{width:18px;color:var(--green)}
.toolbar{padding:15px 20px;gap:10px}.toolbar select{font-size:14px;max-width:235px}.toolbar .search-field{max-width:400px}.toolbar .meta{font-size:12px}
input,select,textarea{font-size:14px;border-color:#d9e1ec;border-radius:6px;padding:10px 12px}select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2364758a' stroke-width='1.7' d='m7 10 5 5 5-5'/%3E%3C/svg%3E");background-position:right 9px center;background-repeat:no-repeat;padding-right:34px;min-height:38px}
.search-field input{font-size:14px;padding-left:37px;min-height:39px}.chips{background:#fbfcfe;padding:11px 20px;min-height:47px}.chips .badge{border:1px solid #dbe7fc;background:#f4f8ff}
th{padding:13px 17px;font-size:12px;background:#f7f9fc;letter-spacing:.015em;font-weight:600}td{padding:16px 17px;font-size:14px;line-height:1.6}td small{font-size:12px}.patient-cell strong{font-size:14px;white-space:nowrap}.cell-clinic{font-size:14px;display:block;max-width:245px}.cell-owner{white-space:nowrap;font-size:13px}.review{font-size:13px}.page-controls .button{min-height:30px;font-size:12px}.page-controls .button:disabled{opacity:.45}
.patient-banner{margin-bottom:18px}.patient-banner h1{font-size:28px}.patient-banner p{font-size:14px}.patient-banner .avatar{width:54px;height:54px;font-size:16px;border-radius:12px}
.context-line{border-left:3px solid var(--teal);padding:13px 16px;font-size:14px;gap:13px;margin-bottom:22px}.context-line select{font-size:13px;min-height:34px;padding:7px 32px 7px 10px}.tabs{gap:30px;margin-bottom:23px}.tabs a,.tabs button{font-size:14px;padding-bottom:13px}.tabs .active{border-bottom-width:3px}
.summary-grid{grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr);gap:22px}.key-values{gap:23px 28px}.kv dt{font-size:12px}.kv dd{font-size:15px}.note-card{padding:20px}.note-card p{font-size:14px;line-height:1.65;margin:10px 0}.note-card small{font-size:12px}.note-card .text-link{font-weight:650}
.notice{font-size:13px}.source-small{font-size:12px;margin-top:16px;padding-top:13px}.meta,small{font-size:12px}.field{font-size:13px}.summary-grid textarea{min-height:75px;line-height:1.6}
.timeline{padding:5px 25px 23px}.timeline-date{font-size:12px;letter-spacing:.035em;color:var(--muted);margin:22px 0 20px}.timeline-event{padding-left:35px;padding-bottom:27px;margin-left:15px}.timeline-event h3{font-size:15px}.timeline-event p{font-size:14px;color:#43576e;line-height:1.6;max-width:880px}.timeline-event small{font-size:12px}.timeline-event .time{font-size:13px}.timeline-event .timeline-dot{background:#edf5ff}.timeline-event:has(.event-button:hover){background:var(--bg)}
.panel-dialog{width:500px;box-shadow:-10px 0 50px #172b4320}.panel-dialog::backdrop{background:#14274424;backdrop-filter:blur(1px)}.dialog-head{padding:24px}.dialog-head h2{font-size:20px}.dialog-body{padding:24px}.check-row{font-size:14px;padding:14px 0}.filter-rule{border-radius:8px;background:#f7f9fc}.dialog-foot .button.primary{padding-left:23px;padding-right:23px}
[data-view=patients] .toolbar{padding-top:10px;padding-bottom:10px}
[data-view=patients] td{padding-top:11px;padding-bottom:11px}
[data-view=patients] .page-head{margin-bottom:20px}
[data-view=patient] main>.row:first-child{margin-bottom:9px!important}
[data-view=patient] main>.row:first-child .button{padding:2px 0;min-height:26px}
[data-view=patient] .patient-banner{margin-bottom:17px}
[data-view=patient] .context-line{margin-bottom:19px}
.laboratory-layout{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(320px,1fr);gap:22px;align-items:start}
.laboratory-layout .toolbar{gap:8px}.laboratory-layout .toolbar select{max-width:200px}.laboratory-layout .toolbar input{max-width:140px}
.laboratory-layout th{padding:12px;font-size:12px}.laboratory-layout td{padding:15px 12px;font-size:14px}.laboratory-layout .card-head .meta{font-size:12px}
.laboratory-layout .chart{max-height:250px}.lab-reading{display:flex;align-items:baseline;gap:8px}.lab-reading strong{font-size:31px;font-weight:600}.lab-reading span{font-size:14px;color:var(--muted)}.lab-reading small{margin-left:auto}.lab-range-note{border-top:1px solid var(--line);margin-top:16px;padding-top:16px;font-size:13px;color:var(--muted);line-height:1.6}
.lab-design{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(330px,1fr);gap:22px;align-items:start}.lab-design>section:first-child{grid-column:1/-1}.chart{max-height:230px}.chart text{font-size:13px}.chart .plot{stroke-width:3}.chart .gridline{stroke-dasharray:none;opacity:.7}
[data-theme=dark]{--bg:#111d2d;--surface:#1b2a3e;--ink:#e2ebf6;--muted:#b0bed0;--line:#2d4057;--blue:#8db7ff;--soft:#243b59;--nav:#0b1625;--green:#9bd9b5;--greenbg:#203e34;--amber:#f1c18e;--amberbg:#42372a;--red:#f1a2b4;--redbg:#462c3d}
[data-theme=dark] .nav-item{color:#b6c6da}[data-theme=dark] .nav-item.active{background:#2c4360;color:var(--blue)}[data-theme=dark] .brand{background:#fff;border-radius:6px;padding:8px}[data-theme=dark] th,[data-theme=dark] .chips,[data-theme=dark] .filter-rule{background:#203147}[data-theme=dark] .avatar{background:var(--soft);border-color:var(--line);color:var(--blue)}[data-theme=dark] .timeline-event p{color:var(--muted)}[data-theme=dark] .badge:not(.blue):not(.amber):not(.green):not(.red){background:#26384e;color:var(--muted)}
@media(min-width:1600px){main{padding-top:34px}.dashboard{grid-template-columns:minmax(0,2.15fr) minmax(330px,1fr)}}
@media(max-width:1200px){.sidebar{width:190px}.shell{margin-left:190px}main{padding:25px}.topbar{padding:0 25px}.dashboard,.summary-grid{grid-template-columns:minmax(0,1fr) 300px}.watch-grid{grid-template-columns:1fr}.watch-patient{border-right:0;border-bottom:1px solid var(--line)}.overview-strip>a,.overview-strip>div,.overview-strip>button{padding:2px 16px}.overview-strip span>span{font-size:12px}}
@media(max-width:980px){.dashboard,.summary-grid,.clinical-grid{grid-template-columns:1fr}.sample-label{display:none}.overview-strip{grid-template-columns:1fr 1fr}.overview-strip>:last-child{display:none}.toolbar input[type=date]{max-width:160px}.watch-grid{grid-template-columns:repeat(3,1fr)}.watch-patient{border-bottom:0;border-right:1px solid var(--line)}}
@media(max-width:1100px){.laboratory-layout{grid-template-columns:1fr}}
@media(max-width:760px){.sidebar{width:216px}.shell{margin-left:0}.topbar{padding:0 17px;height:62px}main{padding:22px 17px}.page-head{align-items:flex-start;flex-wrap:wrap;gap:16px}.page-head h1{font-size:27px}.search-trigger{width:36px;padding:8px}.search-trigger span,.search-trigger kbd{display:none}.overview-strip>a,.overview-strip>div,.overview-strip>button{gap:10px;padding:0 13px}.overview-icon{width:33px;height:33px}.overview-strip strong{font-size:23px}.overview-strip span>span{font-size:11px}.watch-grid{grid-template-columns:1fr}.watch-patient{border-bottom:1px solid var(--line);border-right:0}.context-line{gap:10px}.context-line .push{margin-left:0}.patient-banner{align-items:flex-start}.patient-banner h1{font-size:23px}.patient-banner .row{flex-wrap:wrap}.patient-banner .button{font-size:12px}.tabs{gap:24px}.work-queue{min-width:680px}.toolbar{padding:14px}.toolbar select{max-width:100%}.timeline-event p{max-width:100%}}

/* Personal work overview. These rules leave the patient and laboratory views intact. */
.dashboard-scope{
  display:flex;align-items:flex-end;flex-wrap:wrap;gap:14px 18px;
  padding:17px 20px;margin-bottom:10px;background:var(--surface);
  border:1px solid var(--line);border-radius:10px;
}
.dashboard-scope>.field,.dashboard-scope>label:not(.scope-watch){
  display:grid;gap:6px;flex:1 1 190px;min-width:0;max-width:290px;margin:0;
  color:var(--muted);font-size:12px;font-weight:550;
}
.dashboard-scope select{width:100%;min-height:40px;font-weight:400;color:var(--ink)}
.dashboard-scope .scope-watch{
  display:flex;align-items:center;gap:9px;min-height:40px;margin:0;
  color:var(--ink);font-size:13px;font-weight:400;line-height:1.5;cursor:pointer;
}
.dashboard-scope .scope-watch input{
  width:17px;height:17px;flex:none;margin:0;accent-color:var(--blue);
}
.scope-caption{color:var(--muted);font-size:12px;line-height:1.6;margin:0 2px 20px}
.scope-caption strong{color:var(--ink);font-weight:550}

.work-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:24px}
.work-summary>button{
  display:flex;align-items:center;gap:14px;min-width:0;min-height:91px;
  padding:17px 20px;text-align:left;background:var(--surface);color:var(--ink);
  border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);
  transition:background .15s,border-color .15s;
}
.work-summary>button:hover{background:var(--soft);border-color:#bacdec}
.work-summary>button.active,.work-summary>button[aria-pressed=true]{
  background:var(--soft);border-color:var(--blue);box-shadow:inset 3px 0 0 var(--blue);
}
.work-summary .stat-icon{
  display:grid;place-items:center;flex:none;width:40px;height:40px;
  background:var(--soft);color:var(--blue);border-radius:9px;
}
.work-summary .stat-icon .ico{width:21px;height:21px}
.work-summary>button>span:not(.stat-icon){min-width:0}
.work-summary>button>.ico:last-child{margin-left:auto}
.work-summary strong{display:block;font-size:25px;font-weight:650;line-height:1.2;font-variant-numeric:tabular-nums}
.work-summary small{display:block;margin-top:5px;font-size:13px;line-height:1.45;color:var(--muted)}
.work-summary .active small{color:var(--ink)}
.work-layout{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(300px,1fr);gap:22px;align-items:start}
.work-layout>*,.work-layout .stack{min-width:0}
.work-layout .stack{display:grid;gap:22px;align-content:start}
.work-layout .card-head{flex-wrap:wrap;gap:8px 14px}
.work-layout .card-head h2{line-height:1.5}
.work-layout .card-head .meta{line-height:1.5}
.work-layout .table-wrap{overflow-x:auto;overscroll-behavior-x:contain;max-width:100%}

.queue-tabs{display:flex;align-items:stretch;gap:5px;padding:0 15px;border-bottom:1px solid var(--line);overflow-x:auto}
.queue-tabs button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;
  min-height:45px;padding:10px 11px;border:0;border-bottom:2px solid transparent;
  background:transparent;color:var(--muted);font-size:13px;font-weight:550;white-space:nowrap;
}
.queue-tabs button:hover{background:var(--bg);color:var(--ink)}
.queue-tabs button.active,.queue-tabs button[aria-selected=true],.queue-tabs button[aria-pressed=true]{
  color:var(--blue);border-bottom-color:var(--blue);
}
.queue-tabs button .count,.queue-tabs button>span{
  display:inline-block;min-width:21px;padding:1px 6px;border-radius:5px;
  background:var(--bg);color:var(--muted);font-size:11px;line-height:1.55;font-variant-numeric:tabular-nums;
}
.queue-tabs button.active .count,.queue-tabs button.active>span{background:var(--soft);color:var(--blue)}
.queue-empty,.compact-empty{
  display:flex;align-items:center;gap:12px;min-height:92px;padding:23px 20px;
  text-align:left;color:var(--muted);font-size:13px;line-height:1.6;
}
.queue-empty .ico,.compact-empty .ico{width:22px;height:22px;flex:none;margin:0;color:var(--muted)}
.queue-empty h3,.compact-empty h3{font-size:14px;color:var(--ink);margin:0 0 4px}
.queue-empty p,.compact-empty p{max-width:none;margin:0;font-size:13px;line-height:1.6}
.queue-empty .button,.compact-empty .button{margin-top:12px}
.work-layout .work-queue{width:100%;min-width:800px;table-layout:fixed}
.work-layout .work-queue th,.work-layout .work-queue td{
  white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;
}
.work-layout .work-queue th{position:relative;padding:12px 14px;font-size:11px;line-height:1.5;letter-spacing:.01em}
.work-layout .work-queue th .visually-hidden{top:0;left:0}
.work-layout .work-queue td{padding:18px 14px;vertical-align:top;font-size:13px;line-height:1.55}
.work-layout .work-queue :is(th,td):nth-child(1){width:22%}
.work-layout .work-queue :is(th,td):nth-child(2){width:30%}
.work-layout .work-queue :is(th,td):nth-child(3){width:15%}
.work-layout .work-queue :is(th,td):nth-child(4){width:18%}
.work-layout .work-queue :is(th,td):nth-child(5){width:15%}
.work-layout .work-queue td strong{font-size:13px;line-height:1.55;font-weight:600}
.work-layout .work-queue td small{margin-top:5px;font-size:12px;line-height:1.55}
.work-layout .work-queue .patient-cell{min-width:0;gap:9px;align-items:flex-start}
.work-layout .work-queue .patient-cell>div{min-width:0}
.work-layout .work-queue .patient-cell strong{white-space:normal}
.work-layout .work-queue .patient-cell .avatar{width:29px;height:29px;font-size:10px}
.work-layout .work-queue .cell-owner{white-space:normal;align-items:flex-start;font-size:12px}
.work-layout .work-queue .cell-owner .mini-avatar{flex:none}
.work-layout .work-queue .badge{white-space:normal;font-size:11px;padding:3px 6px;line-height:1.45}
.work-layout .work-queue .button{min-height:34px;padding:6px 9px;font-size:12px;white-space:nowrap}
.work-layout .work-queue td:last-child{text-align:right}

.notification-group{display:flex;align-items:flex-start;border-bottom:1px solid var(--line);min-width:0}
.notification-group:last-child{border-bottom:0}
.notification-group .activity{flex:1;min-width:0;border:0;padding:16px 13px 16px 20px;gap:10px}
.notification-group button.activity{width:100%;background:var(--surface);text-align:left;font:inherit}
.notification-group button.activity:hover{background:var(--bg)}
.notification-group .activity>div:not(.activity-icon){min-width:0}
.notification-group .activity strong{font-size:13px;line-height:1.55}
.notification-group .activity p{font-size:12px;line-height:1.6;word-break:normal;overflow-wrap:normal}
.notification-group .activity small.meta{display:block;font-size:11px;line-height:1.6;margin-top:5px}
.notification-group .notification-status{
  display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;
  align-self:center;margin:12px 15px 12px 0;font-size:11px;line-height:1.5;color:var(--muted);
}
.notification-group button.notification-status{
  min-height:32px;max-width:96px;padding:5px 7px;border:1px solid var(--line);
  border-radius:6px;background:var(--surface);text-align:center;
}
.notification-group button.notification-status:hover{background:var(--soft);border-color:var(--blue);color:var(--blue)}
.notification-group .notification-status .ico{width:14px;height:14px}
.unread-dot{display:inline-block;width:7px;height:7px;flex:none;background:var(--blue);border-radius:50%;vertical-align:middle;margin-right:5px}
.team-line{
  display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;
  min-height:52px;padding:13px 20px;border:0;border-bottom:1px solid var(--line);
  background:transparent;color:var(--ink);text-align:left;font-size:13px;line-height:1.5;
}
.team-line:last-child{border-bottom:0}
button.team-line:hover,a.team-line:hover{background:var(--bg)}
.team-line strong{font-size:13px;font-weight:550}
.team-line small{font-size:12px;line-height:1.5}
.team-line>span:first-of-type small{display:block}
.team-line>.count,.team-line>strong:last-child{font-variant-numeric:tabular-nums;font-weight:600;color:var(--blue)}

.filter-summary{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;
  padding:11px 20px;background:var(--bg);border-bottom:1px solid var(--line);
  color:var(--muted);font-size:12px;line-height:1.6;
}
.filter-summary .meta{font-size:12px}
.toolbar>.filter-summary{flex-basis:100%;min-width:0}
.filter-summary .chips{display:contents}
.filter-summary .chip,.filter-summary .badge{font-size:11px;line-height:1.5;white-space:normal}
.filter-summary .text-link{font-size:12px;min-height:28px}
.saved-view-label{display:inline-flex;align-items:center;gap:6px;color:var(--ink);font-size:12px;font-weight:550;line-height:1.5}
.saved-view-label .ico{width:15px;height:15px;color:var(--muted)}
.saved-view-label small{font-size:11px;font-weight:400;color:var(--muted)}
.preferences-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:22px;align-items:start}
.preferences-grid>*{min-width:0}
.preferences-grid .field{line-height:1.5}
.preferences-grid .check-row{line-height:1.6}
.preferences-grid .check-row input{flex:none}
.preferences-grid .card-foot{line-height:1.6}

.work-summary>button:focus-visible,.dashboard-scope :is(select,input):focus-visible,
.queue-tabs button:focus-visible,.team-line:focus-visible,.notification-status:focus-visible,
.saved-view-label:focus-visible{
  outline:3px solid var(--blue);outline-offset:3px;
}
.queue-tabs button:focus-visible,.team-line:focus-visible,.notification-group .activity:focus-visible{outline-offset:-3px}
[data-theme=dark] .dashboard-scope select{border-color:var(--line)}
[data-theme=dark] .work-summary>button:hover{border-color:var(--blue)}
[data-theme=dark] .work-summary>button.active .stat-icon{background:var(--surface)}
[data-theme=dark] .work-layout .activity-icon{background:var(--soft);color:var(--blue)}
[data-theme=dark] .work-layout .activity-icon.lab{background:#203e3d;color:#98d9d4}
[data-theme=dark] .work-layout .activity-icon.transfer{background:var(--amberbg);color:var(--amber)}
[data-theme=dark] .filter-summary .chip{border-color:var(--line)}
[data-theme=dark] .work-layout .button.primary{color:var(--nav)}

@media(min-width:1600px){
  .work-layout .work-queue th,.work-layout .work-queue td{padding-left:16px;padding-right:16px}
  .work-layout .work-queue td strong{font-size:14px}
}
@media(max-width:1280px){
  .work-layout{grid-template-columns:minmax(0,1fr)}
  .work-layout>aside.stack{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .dashboard-scope>.field,.dashboard-scope>label:not(.scope-watch){max-width:none}
  .work-summary>button{padding:16px}
}
@media(max-width:980px){.preferences-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){
  .dashboard-scope{padding:15px;gap:13px;align-items:stretch}
  .dashboard-scope>.field,.dashboard-scope>label:not(.scope-watch){flex-basis:100%;width:100%}
  .dashboard-scope .scope-watch{width:100%;min-height:32px}
  .scope-caption{margin-bottom:17px}
  .work-summary{grid-template-columns:minmax(0,1fr);gap:9px;margin-bottom:20px}
  .work-summary>button{min-height:74px;padding:13px 16px;gap:13px}
  .work-summary .stat-icon{width:36px;height:36px}
  .work-summary strong{font-size:23px}
  .work-summary small{margin-top:2px}
  .work-layout{gap:18px}
  .work-layout .stack{gap:18px}
  .work-layout>aside.stack{grid-template-columns:minmax(0,1fr)}
  .work-layout .card-head{padding:15px 16px}
  .queue-tabs{padding:0 9px;gap:2px}
  .queue-tabs button{min-height:44px;padding:10px}
  .work-layout .work-queue{min-width:800px}
  .queue-empty,.compact-empty{padding:21px 16px;min-height:86px}
  .notification-group .activity{padding:15px 10px 15px 16px}
  .notification-group .notification-status{margin-right:12px}
  .team-line{padding:13px 16px}
  .filter-summary{padding:11px 14px;gap:7px 10px}
  .saved-view-label{flex-wrap:wrap}
  .preferences-grid{gap:18px}
}
@media(max-width:400px){
  .notification-group{flex-wrap:wrap}
  .notification-group .activity{flex-basis:100%;padding-bottom:9px}
  .notification-group .notification-status{margin:0 16px 12px auto}
}

/* Four working lists: compact, independent panels with local table scrolling. */
.board-head,.board-scope,.board-grid{font-size:14px;min-width:0}
.board-head{margin-bottom:18px;min-height:40px}
.board-head h1{font-size:28px;line-height:1.25}
.board-head p{font-size:13px;margin-top:5px}
.board-head .head-actions{min-width:0;flex-wrap:wrap;align-items:center}
.board-scope.dashboard-scope{padding:12px 16px;gap:10px 16px;margin-bottom:8px;border-radius:9px}
.board-scope.dashboard-scope>.field,.board-scope.dashboard-scope>label:not(.scope-watch){
  flex:0 1 220px;min-width:0;max-width:260px;gap:5px;font-size:12px;
}
.board-scope.dashboard-scope select{min-height:36px;padding-top:7px;padding-bottom:7px;font-size:13px}
.board-scope.dashboard-scope .scope-watch{min-height:36px;font-size:13px}
.board-scope+.scope-caption{margin-bottom:16px;font-size:12px}
.board-period{display:inline-flex;align-items:center;gap:8px;min-width:0;color:var(--muted);font-size:12px}
.board-period select,select.board-period{min-width:0;max-width:200px;min-height:34px;padding-top:6px;padding-bottom:6px;font-size:13px;color:var(--ink)}
.board-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}
.board-grid>*{min-width:0}
.board-body{min-width:0}
.board-panel{
  display:flex;flex-direction:column;min-width:0;max-width:100%;
  border-radius:9px;box-shadow:none;background:var(--surface);
}
.board-panel>.card-head{
  flex:none;align-items:flex-start;min-height:62px;padding:13px 16px;gap:10px;
}
.board-panel>.card-head>div{min-width:0;flex:1}
.board-panel .card-head h2{font-size:14px;line-height:1.5;font-weight:650;letter-spacing:-.01em}
.board-panel .card-head .count{
  display:inline-block;min-width:22px;padding:1px 6px;margin-left:6px;
  font-size:11px;font-weight:600;line-height:1.5;text-align:center;font-variant-numeric:tabular-nums;
}
.board-panel .panel-subtitle{margin-top:3px;font-size:12px;line-height:1.5;color:var(--muted)}
.board-panel .card-head>.ico{width:17px;height:17px;margin-top:2px;color:var(--muted)}
.panel-tools{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;flex:none;min-width:0;
  padding:10px 16px;border-bottom:1px solid var(--line);background:var(--surface);
}
.panel-tools .search-field{flex:1 1 160px;min-width:0;max-width:none}
.panel-tools .search-field input{width:100%;min-height:34px;padding-top:6px;padding-bottom:6px;font-size:13px}
.panel-tools .search-field .ico{width:16px;height:16px;top:9px}
.panel-tools select{flex:0 0 auto;min-width:min(160px,100%);max-width:100%;min-height:34px;padding-top:6px;padding-bottom:6px;font-size:13px}
.panel-tools select[aria-label="Notification period"]{width:225px;min-width:0}
.board-table-wrap{
  position:relative;flex:1 1 auto;min-width:0;max-width:100%;min-height:180px;max-height:320px;
  overflow:auto;overscroll-behavior:contain;scroll-padding:42px 8px 8px;
}
.board-table-wrap>.board-table{width:100%;min-width:420px;border-collapse:separate;border-spacing:0;table-layout:fixed}
.board-table :is(th,td){white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;text-align:left}
.board-table :is(th,td):nth-child(1){width:32%}
.board-table :is(th,td):nth-child(2){width:43%}
.board-table :is(th,td):nth-child(3){width:25%}
.board-table th{
  position:sticky;top:0;z-index:1;padding:9px 12px;
  background:#f7f9fc;color:var(--muted);font-size:12px;font-weight:550;line-height:1.5;letter-spacing:0;
}
.board-table th:first-child,.board-table td:first-child{padding-left:16px}
.board-table th:last-child,.board-table td:last-child{padding-right:16px}
.board-table td{position:relative;padding:11px 12px;font-size:13px;line-height:1.5;vertical-align:top}
.board-table :is(th,td) .visually-hidden{top:0;left:0}
.board-table td small{display:block;margin-top:3px;font-size:12px;line-height:1.5;color:var(--muted)}
.board-table .board-priority{color:var(--amber);font-weight:500}
.board-table td strong{font-size:13px;font-weight:550;line-height:1.5}
.board-table .patient-cell{min-width:0;align-items:flex-start;gap:8px}
.board-table .patient-cell>div{min-width:0}
.board-table .patient-cell strong{white-space:normal;font-size:13px}
.board-table .patient-cell .avatar{width:27px;height:27px;font-size:10px}
.board-table .patient-link,.board-table td>a{font-size:13px;font-weight:550;color:var(--blue)}
.board-table .patient-link:hover,.board-table td>a:hover{text-decoration:underline;text-underline-offset:3px}
.board-table .badge{max-width:100%;white-space:normal;font-size:11px;font-weight:550;padding:2px 6px;line-height:1.5}
.board-table .unread-dot{width:6px;height:6px;margin-right:5px}
.board-row-link{
  display:block;width:100%;min-width:0;padding:0;border:0;background:transparent;
  color:var(--blue);font:inherit;font-size:13px;font-weight:550;line-height:1.5;text-align:left;
}
.board-row-link:hover{text-decoration:underline;text-underline-offset:3px}
.board-row-link small{display:block;margin-top:3px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.5}
.board-empty{
  display:flex;flex-direction:column;justify-content:center;gap:4px;min-height:90px;
  padding:22px 16px;color:var(--muted);font-size:13px;line-height:1.6;text-align:left;
}
.board-empty h3{color:var(--ink);font-size:13px;font-weight:550;line-height:1.5;margin:0}
.board-empty p{margin:0;font-size:13px;line-height:1.6;max-width:48ch}
.board-panel>.board-empty{flex:1}
.board-empty-inline{padding:13px 16px;color:var(--muted);font-size:12px;line-height:1.6}
.board-empty-inline .text-link{font-size:12px}
.board-footer{
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;
  flex:none;min-height:42px;padding:9px 16px;border-top:1px solid var(--line);
  background:var(--surface);color:var(--muted);font-size:12px;line-height:1.5;
}
.board-footer>span{min-width:0}
.board-footer .text-link{min-height:24px;font-size:12px;font-weight:550;text-align:left}
.board-unassigned{
  display:inline-flex;align-items:center;gap:5px;min-width:0;min-height:24px;
  padding:0;border:0;background:transparent;color:var(--blue);font:inherit;font-size:12px;text-align:left;
}
.board-unassigned:hover{text-decoration:underline;text-underline-offset:3px}
.board-unassigned .ico{width:14px;height:14px;flex:none}
.board-table :is(a,button):focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:2px}
.board-footer :is(a,button):focus-visible,.panel-tools :is(input,select):focus-visible,.board-period select:focus-visible{
  outline:2px solid var(--blue);outline-offset:2px;
}
[data-theme=dark] .board-table th{background:#203147}
[data-theme=dark] .panel-tools :is(input,select){border-color:var(--line)}
[data-theme=dark] .board-table tbody tr:hover{background:var(--soft)}

@media(min-width:1280px){.board-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .board-head{gap:12px;margin-bottom:16px}
  .board-head h1{font-size:25px}
  .board-head .head-actions{width:100%}
  .board-scope.dashboard-scope{padding:12px 14px;gap:10px}
  .board-scope.dashboard-scope>.field,.board-scope.dashboard-scope>label:not(.scope-watch){flex:1 1 100%;max-width:none}
  .board-scope.dashboard-scope .scope-watch{min-height:30px}
  .board-grid{gap:16px}
  .board-panel>.card-head{min-height:58px;padding:12px 14px}
  .panel-tools{padding:9px 14px}
  .panel-tools .search-field{flex-basis:150px}
  .board-table-wrap{min-height:150px;max-height:280px}
  .board-table-wrap>.board-table{min-width:420px}
  .board-table th:first-child,.board-table td:first-child{padding-left:14px}
  .board-table th:last-child,.board-table td:last-child{padding-right:14px}
  .board-footer{padding:8px 14px}
  .board-empty{padding:20px 14px}
}

/* Feedback revision: clinic context, a single report editor and grouped collections. */
.board-scope.dashboard-scope{align-items:flex-end;margin-bottom:20px}
.board-scope.dashboard-scope>.scope-caption{
  flex:1 1 230px;min-width:0;margin:0 0 8px auto;text-align:right;
  overflow-wrap:anywhere;line-height:1.5;
}
.board-scope.dashboard-scope>.button{min-height:36px}
.feedback-card{min-width:0;max-width:100%;box-shadow:none}
.feedback-card>.card-head{flex-wrap:wrap;gap:10px 16px;padding:16px 20px}
.feedback-card>.card-head h2{min-width:0;line-height:1.5}
.feedback-card>.card-head>select{max-width:100%;min-height:36px;font-size:13px}
.feedback-card>.table-wrap,.feedback-card .board-table-wrap{
  min-width:0;max-width:100%;overflow:auto;overscroll-behavior:contain;
}
.feedback-card>.table-wrap>table{min-width:520px}
.feedback-card>.table-wrap>table.risk-table{min-width:690px;table-layout:fixed}
.risk-table :is(th,td):nth-child(1){width:23%}
.risk-table :is(th,td):nth-child(2){width:47%}
.risk-table :is(th,td):nth-child(3){width:15%}
.risk-table :is(th,td):nth-child(4){width:15%;text-align:right}
.risk-table td{padding-top:16px;padding-bottom:16px;vertical-align:middle}
.risk-table .board-patient{font-weight:600;color:var(--blue)}
.risk-table .board-patient:hover{text-decoration:underline;text-underline-offset:3px}
.risk-table :is(th,td){white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none}
.risk-reason{display:flex;align-items:baseline;gap:8px;font-size:13px;line-height:1.6;min-width:0}
.risk-reason+.risk-reason{margin-top:6px}
.risk-reason>.badge{flex:none;font-size:11px;min-width:66px;justify-content:center;padding:2px 6px}
.risk-reason>span:last-child{min-width:0;overflow-wrap:anywhere}
.feedback-card .board-table-wrap{min-height:0;max-height:325px}
.feedback-card .activity{padding:17px 20px}
.feedback-card .activity>div{min-width:0}
.feedback-card .activity :is(p,strong,small){overflow-wrap:anywhere}
.feedback-card .board-empty{min-height:105px}
.feedback-card .board-empty p{max-width:none}

.message-layout{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);gap:22px;align-items:start}
.message-layout>*,.message-layout .card-body,.message-layout .toolbar{min-width:0}
.message-layout .card-head{flex-wrap:wrap;gap:10px 12px}
.message-layout .card-head h2{line-height:1.5}
.editor-options{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px 9px;margin-bottom:18px}
.editor-options>.field{flex:1 1 190px;min-width:0;margin:0}
.editor-options>.field select{width:100%;min-height:38px}
.editor-options>.button{min-height:38px}
.message-layout .document-editor{display:block;min-height:290px;padding:16px;line-height:1.8}
.message-layout .save-status{min-height:19px;margin:9px 0 20px;line-height:1.5}
.message-layout .card-body>.field:last-child{max-width:250px;margin-bottom:0}
.message-layout .notice{margin-bottom:15px}
.message-layout .card-foot{gap:9px;padding:16px 20px;justify-content:flex-end}
.message-layout .card-foot .button{white-space:normal;text-align:center}
.message-layout .toolbar{gap:8px;padding:14px 20px}
.message-layout .toolbar select{flex:1 1 170px;min-width:0;max-width:100%}
.message-layout .note-card h3{align-items:flex-start;flex-wrap:wrap;gap:8px}
.message-layout .note-card h3>.text-link{min-width:0;text-align:left;line-height:1.6}
.message-layout .note-card p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75}
.message-layout .note-card small{display:block;line-height:1.6;overflow-wrap:anywhere}
.message-layout .empty{padding:45px 20px}

.lab-revision-layout{display:grid;grid-template-columns:minmax(270px,.85fr) minmax(0,1.6fr);gap:22px;align-items:start}
.lab-revision-layout>*,.lab-revision-layout .card-body{min-width:0;max-width:100%}
.lab-revision-layout>.card:first-child .card-head>.ico{width:19px;height:19px;color:var(--muted)}
.lab-revision-layout .card-head{flex-wrap:wrap;gap:8px 12px}
.lab-revision-layout .card-body>.field{margin-bottom:23px}
.lab-revision-layout .chart{display:block;width:100%;height:auto;max-height:none;margin:12px 0 9px}
.lab-revision-layout .chart text{font-size:12px}
.lab-revision-layout .lab-reading{flex-wrap:wrap;gap:7px}
.lab-revision-layout .lab-reading strong{font-size:30px;font-variant-numeric:tabular-nums}
.lab-revision-layout .lab-reading small{font-variant-numeric:tabular-nums}
.lab-revision-layout .card-body>.meta{line-height:1.7;padding-top:12px;border-top:1px solid var(--line)}
.lab-revision-layout .toolbar{gap:8px;padding:14px 20px}
.lab-revision-layout .toolbar select{flex:1 1 170px;max-width:100%;min-width:0}
.lab-revision-layout .toolbar input[type=date]{flex:0 1 170px;width:170px;min-width:0;max-width:100%}
.lab-revision-layout .card-foot{line-height:1.7}
.collection-row{border-bottom:1px solid var(--line)}
.collection-row:last-of-type{border-bottom:0}
.collection-row>summary{
  display:flex;align-items:center;gap:10px 16px;min-width:0;padding:18px 20px;
  list-style:none;cursor:pointer;background:var(--surface);font-size:13px;line-height:1.5;
}
.collection-row>summary::-webkit-details-marker{display:none}
.collection-row>summary::before{
  content:"";display:block;width:7px;height:7px;flex:none;
  border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);
  transform:rotate(-45deg);margin-right:3px;
}
.collection-row[open]>summary::before{transform:rotate(45deg);margin-top:-4px}
.collection-row>summary:hover{background:var(--bg)}
.collection-row>summary>span:first-of-type{flex:1 1 160px;min-width:0}
.collection-row>summary strong{display:block;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.collection-row>summary small{display:block;line-height:1.6;margin-top:3px;overflow-wrap:anywhere}
.collection-row>summary>span:nth-of-type(2){color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.collection-row>summary>.badge{font-size:11px;padding:3px 7px;flex:none}
.collection-row[open]>summary{border-bottom:1px solid var(--line);background:var(--bg)}
.collection-row .table-wrap{min-width:0;max-width:100%;overflow:auto;overscroll-behavior:contain}
.collection-row .table-wrap>table{min-width:520px;table-layout:fixed}
.collection-row :is(th,td){padding:12px 16px;white-space:normal;overflow-wrap:normal;word-break:normal}
.collection-row :is(th,td):first-child{width:26%;padding-left:20px}
.collection-row :is(th,td):nth-child(2){width:31%}
.collection-row :is(th,td):nth-child(3){width:21%}
.collection-row :is(th,td):last-child{width:22%;text-align:right;padding-right:20px}
.collection-row td{font-size:13px;line-height:1.6}
.collection-row td small{font-size:11px;line-height:1.6}
.collection-row .button{font-size:12px;min-height:34px;padding:6px 10px}
.collection-row>summary:focus-visible{outline:3px solid var(--blue);outline-offset:-3px}
.history-switch{gap:9px}
.history-switch .button{white-space:normal;min-height:38px}
[data-theme=dark] .feedback-card .risk-table tbody tr:hover{background:var(--soft)}
[data-theme=dark] .message-layout .button.primary,[data-theme=dark] .history-switch .button.primary{background:#4776bc;border-color:#6f9bde;color:#fff}
[data-theme=dark] .collection-row[open]>summary{background:#203147}
[data-theme=dark] .collection-row>summary:hover{background:var(--soft)}

@media(max-width:1200px){
  .message-layout{grid-template-columns:minmax(0,1fr)}
  .message-layout .editor-options>.field{flex:0 1 280px}
  .message-layout .document-editor{min-height:260px}
  .lab-revision-layout{grid-template-columns:minmax(260px,.8fr) minmax(0,1.35fr);gap:18px}
}
@media(max-width:1050px){
  .lab-revision-layout{grid-template-columns:minmax(0,1fr)}
  .lab-revision-layout>.card:first-child .card-body{max-width:560px}
}
@media(max-width:760px){
  .board-scope.dashboard-scope>.scope-caption{flex-basis:100%;margin:0;text-align:left}
  .board-scope.dashboard-scope>.button{min-height:44px}
  .board-scope.dashboard-scope select{min-height:44px;font-size:16px}
  .feedback-card>.card-head{padding:15px 16px;align-items:flex-start}
  .feedback-card>.card-head>.button,.feedback-card>.card-head>select{min-height:44px}
  .feedback-card>.card-head>select{font-size:16px}
  .feedback-card>.table-wrap>table.risk-table{min-width:690px}
  .risk-reason{line-height:1.65}
  .message-layout,.lab-revision-layout{gap:18px}
  .message-layout :is(input,select,textarea),.lab-revision-layout :is(input,select){font-size:16px}
  .message-layout select,.message-layout input,.lab-revision-layout select,.lab-revision-layout input{min-height:44px}
  .message-layout .card-head,.message-layout .card-foot{padding:15px 16px}
  .message-layout .card-body{padding:17px 16px}
  .message-layout .editor-options>.field{flex:1 1 100%}
  .message-layout .editor-options>.button{flex:1 1 auto;min-height:44px}
  .message-layout .card-head>.button,.message-layout .card-foot>.button{min-height:44px}
  .message-layout .document-editor{min-height:260px;padding:13px}
  .message-layout .toolbar,.lab-revision-layout .toolbar{padding:14px 16px}
  .message-layout .note-card{padding:18px 16px}
  .lab-revision-layout .toolbar input[type=date]{flex:1 1 120px;width:120px}
  .collection-row>summary{flex-wrap:wrap;padding:16px;gap:9px 12px;min-height:75px}
  .collection-row>summary>span:first-of-type{flex-basis:calc(100% - 24px)}
  .collection-row>summary>span:nth-of-type(2){margin-left:23px}
  .collection-row .button,.history-switch .button{min-height:44px}
}
