#patients-status[data-error=true] { color: var(--theme-warning, #f1bb75); }
.landing-welcome { display: none; }
.landing-layout { display: contents; }
.patients-home[data-account-state="signed-out"] {
  --landing-background: var(--theme-warning-surface, #f6f3ee);
  --landing-text: var(--theme-warning, #30271c);
  --landing-muted: var(--theme-text-muted, #72675b);
  --landing-accent: var(--theme-warning, #30271c);
  background: var(--landing-background);
  color: var(--landing-text);
  color-scheme: var(--appearance-scheme, light);
  font: 400 1rem/1.5 Nunito, sans-serif;
}
.patients-home[data-account-state="signed-out"] main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100svh;
  padding: 3rem 1.5rem;
}
.patients-home[data-account-state="signed-out"] .site-header,
.patients-home[data-account-state="signed-out"] .workspace-heading,
.patients-home[data-account-state="signed-out"] .patient-view-nav,
.patients-home[data-account-state="signed-out"] #patient-view-description,
.patients-home[data-account-state="signed-out"] #patients-status:not([data-error="true"]) { display: none !important; }
.patients-home[data-account-state="signed-out"] .landing-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.75rem;
  width: min(100%, 30rem);
}
.patients-home[data-account-state="signed-out"] .landing-welcome { display: block; width: 100%; }
.landing-welcome h1 { margin: 0; line-height: 0; }
.landing-welcome img { display: block; width: 100%; height: auto; }
.patients-home[data-account-state="signed-out"] #account-panel {
  display: block;
  width: min(100%, 26.25rem);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
}
.patients-home .account-landing .account-microsoft {
  width: 100%;
  min-height: 3.25rem;
  padding: .85rem 1rem;
  border: 1px solid var(--landing-accent);
  border-radius: .25rem;
  background: var(--landing-accent);
  color: var(--theme-text, #fff);
  font: 500 1rem/1.5 Nunito, sans-serif;
  transition: background .15s ease;
}
.patients-home .account-landing .account-microsoft:hover { background: var(--theme-warning-surface, #4c4033); }
.patients-home .account-landing .account-microsoft:focus-visible { outline: 2px solid var(--theme-border-strong, #877461); outline-offset: 4px; }
.patients-home .account-landing [role="status"] { margin: 1rem 0 0; color: var(--theme-danger, #86432e); font: 400 .9375rem/1.5 Nunito, sans-serif; text-align: center; overflow-wrap: anywhere; }
.patients-home .account-landing [role="status"]:empty { display: none; }
.patients-home[data-account-state="signed-out"] #patients-status[data-error="true"] { max-width: 26.25rem; color: var(--theme-danger, #86432e); }
@media (max-width: 480px) {
  .patients-home[data-account-state="signed-out"] .landing-layout { gap: 2rem; }
  .patients-home .account-landing .account-microsoft { font-size: .9375rem; }
}
.patients-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .65rem; margin: .5rem 0; }
.patients-actions p { flex: 1 1 10rem; margin: 0; color: var(--theme-text, #d0d4dd); font-size: .85rem; }
.patients-table td { width: auto; text-align: left; font-size: .875rem; color: inherit; }
.patients-table td:first-child { width: 30%; font-weight: inherit; }
.patients-table td:last-child { white-space: nowrap; font-size: .8rem; }
.test-badge { display: inline-block; border: 1px solid var(--theme-accent-border, #70518d); background: var(--theme-accent-surface, #493260); border-radius: .3rem; padding: .05rem .3rem; font-size: .75rem; color: var(--theme-accent, #f0e6ff); }
.patients-pagination { margin-top: .6rem; text-align: center; }
@media (max-width: 600px) { .patients-table { min-width: 38rem; } }
.patient-view-nav { display: flex; gap: .3rem; margin: 1rem 0; border-bottom: 1px solid var(--theme-border, #414853); }
.patient-view-nav button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--theme-text-muted, #aeb8c5); padding: .65rem 1rem; cursor: pointer; }
.patient-view-nav [aria-current] { border-bottom-color: var(--theme-success-border, #80c7bd); background: var(--theme-link-surface, #233237); color: var(--theme-success, #a7d9cd); }
.patient-view-nav small { display: inline-block; margin-left: .4rem; padding: .1rem .35rem; border: 1px solid var(--theme-border, #414853); border-radius: 1rem; color: var(--theme-text, #cbd1da); }
.timeline-help { font-size: .85rem; color: var(--theme-text-muted, #aeb8c5); margin: 1rem 0 .5rem; }
.timeline-legend { display: flex; gap: .5rem 1.25rem; flex-wrap: wrap; font-size: .75rem; color: var(--theme-text-muted, #aeb8c5); margin: .5rem 0 1rem; }
.timeline-legend span:last-child { margin-left: auto; }
.patients-table { min-width: 64rem; table-layout: fixed; border-collapse: separate; border-spacing: 0; width: 100%; }
.patients-table .timeline-patient-heading { width: 13rem; vertical-align: bottom; padding-bottom: 1rem; }
.patients-table .timeline-tick { position: relative; text-align: center; vertical-align: top; padding: .8rem .3rem; font-size: .8rem; color: var(--theme-text, #d0d4dd); }
.timeline-tick::before { content: ''; position: absolute; top: 1.55rem; left: 0; right: 0; height: 1px; background: var(--theme-surface-hover, #535e6b); }
.timeline-tick:nth-child(4)::before { left: 50%; }
.timeline-tick:last-child::before { right: 50%; }
.timeline-tick-number { position: relative; z-index: 1; display: grid; place-items: center; margin: 0 auto .65rem; width: 1.5rem; height: 1.5rem; border: 1px solid var(--theme-border-strong, #648383); border-radius: 50%; background: var(--theme-link-surface, #26353b); color: var(--theme-success, #a7d9cd); font-size: .75rem; }
.patients-table .timeline-patient { font-weight: inherit; text-align: left; padding: 1rem .6rem; background: var(--theme-surface, #20232a); overflow-wrap: anywhere; }
.timeline-patient > a { display: block; color: var(--theme-link, #dfe9ed); font-size: .95rem; margin-bottom: .4rem; }
.timeline-patient small { display: block; font-size: .7rem; color: var(--theme-text-muted, #aeb8c5); line-height: 1.6; }
.patients-table td.timeline-stage { padding: .5rem .2rem; text-align: center; white-space: normal; vertical-align: top; }
.timeline-stage > a { display: flex; flex-direction: column; align-items: center; min-height: 6rem; padding: .4rem .15rem; color: var(--theme-text-muted, #aeb8c5); text-decoration: none; border: 1px solid transparent; border-radius: .4rem; }
.timeline-stage > a:hover { background: var(--theme-link-surface, #29343c); border-color: var(--theme-border-strong, #535e6b); }
.timeline-marker { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; font-size: 1.45rem; }
.timeline-status { font-size: .7rem; margin: .35rem 0; }
.timeline-stage [data-state="in-progress"] .timeline-marker { color: var(--theme-warning, #f1bb75); }
.timeline-stage [data-state="complete"] .timeline-marker { color: var(--theme-success, #a7d9cd); }
.timeline-stage [data-state="no-record"] .timeline-marker { color: var(--theme-text-muted, #7c8796); }
.timeline-date-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; color: var(--theme-link, #86baff); margin-top: .3rem; }
.timeline-date { display: block; font-size: .65rem; line-height: 1.5; }
.timeline-appointment { margin-top: .4rem; color: var(--theme-success, #a7d9cd) !important; }
.table-scroll:focus-visible, .patient-view-nav :focus-visible, .timeline-stage a:focus-visible { outline: 2px solid var(--theme-link-border, #86baff); outline-offset: 2px; }
@media (max-width: 650px) {
  .timeline-legend span:last-child { margin-left: 0; flex-basis: 100%; }
  .patients-table .timeline-patient-heading { width: 10rem; }
  .patient-view-nav button { padding: .65rem .7rem; }
}

.timeline-stage [data-state="recorded"] .timeline-marker { color: var(--theme-success, #a7d9cd); }
.timeline-stage [data-state="scheduled"] .timeline-marker { color: var(--theme-link, #86baff); }

.patient-practice-logos{display:flex;flex-wrap:wrap;align-items:center;gap:.45rem;margin:.3rem 0 .45rem}.patient-practice-logos .practice-logo-window{--logo-width:6.75rem;--logo-height:2.4rem}.patient-practice-logos .practice-branding{margin:0;padding:0;border: 0;min-height:0}.patient-unassigned{display:inline-block;color: var(--theme-warning, #e7c485)!important}.timeline-stage>.timeline-stage-summary{display:flex;flex-direction:column;align-items:center;min-height:6rem;padding:.4rem .15rem;color: var(--theme-text-muted, #aeb8c5)}

/* Dense patient roster with identity kept easy to scan. */
.patient-view-nav { margin:.5rem 0; }
.patient-view-nav button { padding:.4rem .8rem; }
.timeline-help { margin:.5rem 0 .25rem;font-size:.75rem; }
.timeline-legend { margin:.25rem 0 .5rem;gap:.3rem 1rem;font-size:.7rem; }
.patients-table .timeline-patient { padding:.4rem .6rem;vertical-align:middle; }
.timeline-patient > a { margin-bottom:.1rem;font-size:.875rem; }
.timeline-patient small { line-height:1.35; }
.timeline-patient .patient-updated { font-size:.65rem;color: var(--theme-text-muted, #8993a2); }
.patients-table .timeline-tick { padding:.4rem .2rem;font-size:.75rem; }
.timeline-tick::before { top:1rem; }
.timeline-tick-number { width:1.2rem;height:1.2rem;margin-bottom:.3rem;font-size:.65rem; }
.patients-table .timeline-patient-heading { padding-bottom:.5rem; }
.patients-table td.timeline-stage { padding:.2rem;vertical-align:middle; }
.timeline-stage > a,.timeline-stage > .timeline-stage-summary { min-height:0;padding:.2rem .1rem; }
.timeline-marker { width:1.25rem;height:1.25rem;font-size:1.15rem; }
.timeline-status { margin:.1rem 0;font-size:.65rem; }
.timeline-date-label { margin-top:.1rem;font-size:.6rem; }
.timeline-date { font-size:.6rem;line-height:1.25; }
.timeline-patient .patient-practice-logos { margin:.1rem 0;gap:.25rem; }
.timeline-patient .patient-practice-logos .practice-logo-window { --logo-width:4.5rem;--logo-height:1.45rem; }

.patients-table .timeline-practice-heading { width:8rem;vertical-align:bottom;padding-bottom:.5rem; }
.patients-table td.timeline-practice { padding:.4rem;vertical-align:middle;white-space:normal; }
.timeline-practice .patient-practice-logos { margin:0;gap:.3rem; }
.timeline-practice .practice-logo-window { --logo-width:6rem;--logo-height:2rem; }
.practice-assignment-button { width:100%;padding:.35rem;border: 1px solid transparent;border-radius: .4rem;background: transparent;color: inherit;text-align:left;cursor:pointer; }
.practice-assignment-button:hover,.practice-assignment-button:focus-visible { border-color: var(--theme-link-border, #86baff);background: var(--theme-link-surface, #29343c); }
.roster-assignment-dialog { max-width:min(32rem,calc(100vw - 2rem));background: var(--theme-surface, #20232a);color: var(--theme-link, #dfe9ed);border: 1px solid var(--theme-border-strong, #535e6b);border-radius: .6rem;padding:1.25rem; }
.roster-assignment-dialog::backdrop { background: var(--theme-canvas, #0009); }
.roster-assignment-dialog fieldset { display:grid;gap:.75rem;margin:1rem 0; }
.roster-assignment-dialog label { display:flex;align-items:center;gap:.5rem; }
.roster-assignment-dialog input[type=checkbox] { width:auto; }

.roster-assignment-dialog form {display:grid;gap:.8rem;min-width:min(22rem,75vw)}
.roster-assignment-dialog form > label {display:grid;gap:.3rem}
.roster-assignment-dialog form input,.roster-assignment-dialog form select {max-width:100%;box-sizing:border-box}

/* Compact visit tracker: one status, a meaningful date, and scheduling on demand. */
.patients-table{min-width:58rem;}
.patients-table .timeline-patient-heading{width:12rem;}
.patients-table .timeline-tick{vertical-align:bottom;padding:.65rem .25rem;}
.timeline-tick::before,.timeline-tick-number{display:none;}
.patients-table td.timeline-stage{position:relative;padding:.3rem .2rem;}
.timeline-visit{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;min-height:2.2rem;color: var(--theme-text-muted, #b6c2cc);text-decoration:none;padding:.2rem 1rem .2rem .1rem;border: 1px solid transparent;border-radius: .3rem;}
.timeline-visit:hover,.timeline-visit:focus-visible{border-color: var(--theme-link-border, #536c79);background: var(--theme-link-surface, #253039);}
.timeline-visit-item{display:flex;align-items:center;justify-content:center;gap:.3rem;flex-wrap:wrap;}
.timeline-visit-item small{font-size:.7rem;}
.timeline-visit-item .timeline-date{flex-basis:100%;font-size:.65rem;}
.timeline-visit[data-state=resolved] .timeline-marker,.timeline-visit[data-state=recorded] .timeline-marker{color: var(--theme-success, #a7d9cd);}
.timeline-visit[data-state=scheduled] .timeline-marker{color: var(--theme-link, #86baff);}
.timeline-target{font-size:.6rem;color: var(--theme-text-muted, #9ca8b8);}
.timeline-schedule{position:absolute;right:.15rem;top:.25rem;background: transparent;border: 0;color: var(--theme-link, #9ab9c6);padding:.2rem;opacity:.45;cursor:pointer;line-height:1;}
.timeline-schedule:hover,.timeline-schedule:focus-visible{opacity:1;color: var(--theme-success, #bde9e1);outline: 1px solid var(--theme-link-border, #86baff);}
.timeline-schedule:disabled{opacity:.15;cursor:default;}
.timeline-schedule svg{width:1rem;height:1rem;display:block;}
.patient-unassigned{color: var(--theme-text-muted, #aeb8c5)!important;}
.visit-schedule-dialog{max-width:min(32rem,calc(100vw - 2rem));max-height:85vh;overflow:auto;background: var(--theme-surface, #20232a);color: var(--theme-link, #dfe9ed);border: 1px solid var(--theme-border-strong, #535e6b);border-radius: .6rem;padding:1.25rem;}
.visit-schedule-dialog::backdrop{background: var(--theme-canvas, #0009);}
.visit-schedule-dialog h2{font-size:1.15rem;margin:.1rem 0 .5rem;}
.visit-schedule-dialog form{display:grid;gap:.8rem;min-width:min(23rem,75vw);}
.visit-schedule-dialog label{display:grid;gap:.3rem;}
.visit-schedule-dialog label[hidden]{display:none;}
.visit-schedule-dialog input,.visit-schedule-dialog select{width:100%;box-sizing:border-box;}
.visit-dialog-actions{display:flex;flex-wrap:wrap;gap:.5rem;}
.visit-schedule-dialog [role=status]{margin:0;font-size:.85rem;}

.timeline-visit-item[data-state=resolved] .timeline-marker,.timeline-visit-item[data-state=recorded] .timeline-marker{color: var(--theme-success, #a7d9cd);}
.timeline-visit-item[data-state=in-progress] .timeline-marker{color: var(--theme-warning, #f1bb75);}
.timeline-visit-item[data-state=scheduled] .timeline-marker{color: var(--theme-link, #86baff);}
.timeline-visit-item[data-state=no-record] .timeline-marker{color: var(--theme-text-muted, #7c8796);}

/* Patient worklist uses the existing roster palette and chart/visit controls. */
.worklist-help { color: var(--theme-text-muted, #aeb8c5);font-size:.8rem;line-height:1.5;margin:.7rem 0 1rem;max-width:70rem; }
.worklist-table { min-width:76rem;table-layout:fixed; }
.worklist-table th { text-align:left; }
.worklist-table thead th { color: var(--theme-link, #b7c5d4);font-size:.75rem;font-weight:600;padding:.8rem .7rem;background: var(--theme-surface-raised, #252c35);border-bottom: 1px solid var(--theme-border-strong, #4b5664);vertical-align:middle; }
.worklist-table .timeline-patient-heading { width:12rem;padding:.8rem .7rem; }
.worklist-table .timeline-practice-heading { width:8.5rem;padding:.8rem .7rem; }
.worklist-table .worklist-eye-heading { width:5.5rem; }
.worklist-table .worklist-stage-heading { width:11rem; }
.worklist-table .worklist-action-heading { width:auto; }
.worklist-table .worklist-date-heading { width:9rem; }
.worklist-table .worklist-controls-heading { width:9.5rem; }
.worklist-table td,.worklist-table .timeline-patient { padding:.85rem .7rem;vertical-align:middle;white-space:normal;font-size:.85rem;line-height:1.45;overflow-wrap:anywhere; }
.worklist-table .worklist-patient-start > * { border-top: 1px solid var(--theme-border, #3b444f); }
.worklist-table tbody tr:first-child > * { border-top: 0; }
.worklist-table .timeline-patient { background: transparent; }
.worklist-table .timeline-patient > a { font-size:.9rem;font-weight:600; }
.worklist-table .patient-dob { margin-top:.3rem; }
.worklist-table .worklist-eye { white-space:nowrap;overflow-wrap:normal;color: var(--theme-link, #bfccd8);font-size:.78rem;font-weight:600; }
.worklist-table .worklist-status { display:inline-block;color: var(--theme-link, #d9e4ef); }
.worklist-table .worklist-action a { color: var(--theme-success, #a7d9cd);text-decoration:underline;text-decoration-color: var(--theme-success, #638f87);text-underline-offset:.2em; }
.worklist-table small { display:block;color: var(--theme-text-muted, #a3afbf);font-size:.72rem;line-height:1.45;margin-top:.3rem; }
.worklist-table .worklist-date { font-size:.8rem; }
.worklist-table .worklist-unknown { color: var(--theme-text-muted, #a3afbf); }
.worklist-table .worklist-visits { width:100%;min-width:0;font-size:.75rem;padding:.4rem;background: var(--theme-surface-raised, #252c35);color: var(--theme-link, #c7d3df);border: 1px solid var(--theme-border-strong, #4b5664);border-radius: .3rem; }
.worklist-table .worklist-eye-continuation td { border-top: 1px dashed var(--theme-border, #343e49); }
.worklist-table tbody tr:hover { background: var(--theme-link-surface, #242d35); }
.worklist-table :focus-visible { outline: 2px solid var(--theme-link-border, #86baff);outline-offset: 3px; }
.worklist-table .visually-hidden { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
@media(max-width:650px) { .worklist-help { font-size:.75rem; } }

.worklist-refresh { border: 0;background: transparent;padding:0;font:inherit;text-align:left;color: var(--theme-success, #a7d9cd);text-decoration:underline;text-underline-offset:.2em;cursor:pointer; }
.worklist-scroll-hint { display:none; }
@media(max-width:900px) { .worklist-scroll-hint { display:block;margin:.5rem 0;color: var(--theme-text-muted, #aeb8c5);font-size:.75rem; } }

/* Keep roster refresh compact while retaining a full touch/focus target. */
.patients-actions .patients-refresh-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;min-width:44px;min-height:44px;padding:10px;line-height:1}
.patients-refresh-icon svg{display:block;flex:none;width:20px;height:20px;pointer-events:none}
.patients-refresh-icon:focus-visible{outline:2px solid var(--theme-link-border,#86baff);outline-offset:3px}
.patients-home .table-scroll{position:relative}

/* App/page controls remain in place while the patient list uses the remainder. */
.patients-home[data-account-state="signed-in"] { height:100dvh;min-height:0;overflow:hidden; }
.patients-home[data-account-state="signed-in"] > main { box-sizing:border-box;display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden; }
.patients-home[data-account-state="signed-in"] main > :not(#patients-content) { flex-shrink:0; }
.patients-home[data-account-state="signed-in"] #patients-content:not([hidden]),
.patients-home[data-account-state="signed-in"] #patients-office:not([hidden]) { display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:0;overflow:hidden; }
.patients-home[data-account-state="signed-in"] #patients-office > :not(.table-scroll) { flex-shrink:0; }
.patients-home[data-account-state="signed-in"] .table-scroll { flex:1 1 0;min-height:0;min-width:0;overflow:auto;scrollbar-gutter:stable; }
.patients-home[data-account-state="signed-in"] .worklist-table thead th { position:sticky;top:0;z-index:2;background:var(--theme-surface-raised,#252c35); }
@media (max-height:700px), (max-width:650px) {
  .patients-home[data-account-state="signed-in"] .workspace-heading { margin-block:.25rem; }
  .patients-home[data-account-state="signed-in"] .patient-view-nav { margin-block:.3rem; }
  .patients-home[data-account-state="signed-in"] .patient-view-nav button { padding-block:.35rem; }
  .patients-home[data-account-state="signed-in"] .filters,.patients-home[data-account-state="signed-in"] .patients-actions { margin-block:.25rem; }
  .patients-home[data-account-state="signed-in"] .timeline-help,.patients-home[data-account-state="signed-in"] .worklist-scroll-hint { margin-block:.2rem; }
}
/* Keep the existing centered Lucent landing screen until scoped rows are ready. */
.patients-home:is([data-worklist-state=loading],[data-worklist-state=error]) #account-panel{display:none!important}
.patients-home:is([data-worklist-state=loading],[data-worklist-state=error]) #patients-status{display:none!important}
#worklist-loading-panel{width:100%;text-align:center;line-height:1.5;color:var(--theme-text-muted,#c6c2bc)}
#worklist-loading-panel[hidden]{display:none!important}
#worklist-loading-status{margin:0}
#worklist-loading-retry{min-height:44px;margin-top:1rem;padding:.65rem 1rem}
.patients-home[data-worklist-state=error] #worklist-loading-status{color:var(--theme-danger,#e8b2b2)}
/* Match the temporary account-connecting message to the worklist loading line. */
.patients-home[data-account-state="signed-out"]:not(:has(#patients-status[data-error="true"])) #account-panel:not(.account-landing) > p[role="status"]:only-child{font:inherit;line-height:1.5;text-align:center;color:var(--theme-text-muted,#c6c2bc)}
/* Lucent worklist filters only: compact segmented tabs with readable count pills. */
.patients-home .patient-view-nav{display:flex;flex-wrap:wrap;align-items:stretch;gap:.375rem;width:fit-content;max-width:100%;margin:.65rem 0;padding:.25rem;border:1px solid var(--theme-border,#5b5361);border-radius:.8rem;background:var(--theme-surface-raised,#252c35);--worklist-tab-focus:#d5b7e4}
.patients-home .patient-view-nav > button[data-patient-view]{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.35rem .55rem;min-height:44px;min-width:0;margin:0;padding:.55rem .8rem;border:1px solid transparent;border-radius:.55rem;background:transparent;color:var(--theme-text-muted,#c3bdc9);font:550 .875rem/1.25 Nunito,system-ui,sans-serif;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}
.patients-home .patient-view-nav > button[data-patient-view]:hover:not([aria-current]){background:var(--theme-surface-hover,#3c3544);color:var(--theme-text,#f5f0f7)}
.patients-home .patient-view-nav > button[data-patient-view][aria-current="page"]{background:#4b3557;color:#fffafc;border-color:#9e85aa;font-weight:700;box-shadow:0 1px 3px #0002}
.patients-home .patient-view-nav > button[data-patient-view] > small{display:inline-flex;flex:none;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.5rem;margin:0;padding:.15rem .45rem;border:0;border-radius:999px;background:var(--theme-surface-hover,#3e3747);color:var(--theme-text,#eee7f2);font:650 .75rem/1.2 Nunito,system-ui,sans-serif;font-variant-numeric:tabular-nums}
.patients-home .patient-view-nav > button[data-patient-view] > small[data-zero="true"]{background:var(--theme-surface,#20232a);color:var(--theme-text-muted,#c3bdc9);font-weight:500}
.patients-home .patient-view-nav > button[data-patient-view][aria-current="page"] > small{background:#f3eaf8;color:#4b3557}
.patients-home .patient-view-nav > button[data-patient-view][aria-current="page"] > small[data-zero="true"]{background:#67516f;color:#f1e8f4}
.patients-home .patient-view-nav > button[data-patient-view]:focus-visible{outline:3px solid var(--worklist-tab-focus);outline-offset:2px}
:root[data-theme="light"] .patients-home .patient-view-nav{--worklist-tab-focus:#4b3557}
@media(max-width:600px){.patients-home .patient-view-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:.375rem}.patients-home .patient-view-nav > button[data-patient-view]{justify-content:space-between;padding:.5rem .65rem}}
@media(prefers-reduced-motion:reduce){.patients-home .patient-view-nav > button[data-patient-view]{transition:none}}
:root[data-theme="light"] .patients-home .patient-view-nav > button[data-patient-view]:not([aria-current]) > small[data-zero="true"]{background:#e4ddd6;color:#655b51}
/* Cohesive search/action toolbar, scoped to the patient worklist. */
.patients-home .worklist-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.65rem 1rem;margin:.6rem 0;min-width:0;flex-shrink:0;--worklist-toolbar-focus:#d5b7e4}
.patients-home .worklist-toolbar .filters{display:flex;flex:1 1 26rem;flex-wrap:wrap;align-items:flex-end;gap:.65rem .75rem;margin:0;min-width:0}
.patients-home .worklist-toolbar .practice-picker{flex:1 1 12rem;min-width:0}
.patients-home .worklist-toolbar .filters > label{flex:2 1 16rem;min-width:0;margin:0}
.patients-home .worklist-toolbar .filters label{display:grid;gap:.4rem;color:var(--theme-text-muted,#c3bdc9);font:650 .8rem/1.25 Nunito,system-ui,sans-serif}
.patients-home .worklist-toolbar .filters :is(input,select){box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0;padding:.65rem .8rem;border:1px solid var(--theme-border,#6f6678);border-radius:.6rem;background:var(--theme-surface,#20232a);color:var(--theme-text,#f3eef6);font:500 .875rem/1.3 Nunito,system-ui,sans-serif}
.patients-home .worklist-toolbar .filters input::placeholder{color:var(--theme-text-muted,#c3bdc9);opacity:1}
.patients-home .worklist-toolbar .filters :is(input,select):hover:not(:disabled){border-color:var(--theme-border-strong,#9f8eac)}
.patients-home .worklist-toolbar .patients-actions{display:flex;flex:0 0 auto;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:.5rem;margin:0;min-width:0}
.patients-home .worklist-toolbar #patients-count{flex:0 0 auto;margin:0 .25rem 0 0;min-width:0;color:var(--theme-text-muted,#c3bdc9);font:550 .8rem/1.4 Nunito,system-ui,sans-serif;font-variant-numeric:tabular-nums}
.patients-home .worklist-toolbar .patients-actions > button{display:inline-flex;flex:0 0 auto;white-space:nowrap;align-items:center;justify-content:center;min-height:44px;min-width:44px;margin:0;padding:.65rem .9rem;border:1px solid var(--theme-border,#6f6678);border-radius:.6rem;font:650 .875rem/1.25 Nunito,system-ui,sans-serif;text-align:center;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}
.patients-home .worklist-toolbar .patients-actions #patients-questionnaire{background:#4b3557;border-color:#9e85aa;color:#fffafc;box-shadow:0 1px 3px #0002}
.patients-home .worklist-toolbar .patients-actions #patients-questionnaire:hover:not(:disabled){background:#5a4168;border-color:#b69ac4}
.patients-home .worklist-toolbar .patients-actions :is(#patients-add,#patients-refresh,#patients-seed){background:var(--theme-surface,#20232a);border-color:var(--theme-border,#6f6678);color:var(--theme-text,#f3eef6);box-shadow:none}
.patients-home .worklist-toolbar .patients-actions :is(#patients-add,#patients-refresh,#patients-seed):hover:not(:disabled){background:var(--theme-surface-hover,#3c3544);border-color:var(--theme-border-strong,#9f8eac)}
.patients-home .worklist-toolbar .patients-actions #patients-refresh{flex:0 0 44px;width:44px;padding:10px}
.patients-home .worklist-toolbar :is(input,select,button):focus-visible{outline:3px solid var(--worklist-toolbar-focus);outline-offset:2px}
.patients-home .worklist-toolbar .patients-actions > button:disabled{opacity:.55;cursor:default;box-shadow:none}
.patients-home #patients-content[aria-busy="true"] .worklist-toolbar #patients-refresh svg{opacity:.65}
:root[data-theme="light"] .patients-home .worklist-toolbar{--worklist-toolbar-focus:#4b3557}
@media(max-width:600px){.patients-home .worklist-toolbar{gap:.6rem;margin:.4rem 0}.patients-home .worklist-toolbar .filters{flex-basis:100%;gap:.6rem}.patients-home .worklist-toolbar .practice-picker,.patients-home .worklist-toolbar .filters > label{flex-basis:100%}.patients-home .worklist-toolbar .patients-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 44px;gap:.5rem;flex-basis:100%;width:100%}.patients-home .worklist-toolbar #patients-count{grid-column:1;grid-row:1;margin:0}.patients-home .worklist-toolbar #patients-questionnaire{grid-column:2/4;grid-row:1}.patients-home .worklist-toolbar #patients-add{grid-column:1/3;grid-row:2}.patients-home .worklist-toolbar #patients-refresh{grid-column:3;grid-row:2}.patients-home .worklist-toolbar #patients-seed{grid-column:1/-1}.patients-home .worklist-toolbar .patients-actions > button{min-width:0;padding:.6rem .65rem;font-size:.8125rem}}
@media(prefers-reduced-motion:reduce){.patients-home .worklist-toolbar .patients-actions > button{transition:none}}
.patients-home .worklist-toolbar [hidden]{display:none!important}

@media(min-width:601px) and (max-width:1000px){.patients-home .worklist-toolbar .filters,.patients-home .worklist-toolbar .patients-actions{flex-basis:100%}}

@media(min-width:601px) and (max-width:1000px){.patients-home .worklist-toolbar #patients-count{flex:1 1 auto}}
/* Center only the worklist Practice column and retain the full assignment target. */
.patients-home .worklist-table .timeline-practice-heading{text-align:center}
.patients-home .worklist-table td.timeline-practice{vertical-align:middle;text-align:center}
.patients-home .worklist-table td.timeline-practice > .patient-practice-logos{width:100%;justify-content:center;align-items:center;text-align:center}
.patients-home .worklist-table td.timeline-practice .practice-branding{justify-content:center;text-align:center}
/* Keep worklist patient identity strong, with DOB visually nested below the name. */
.patients-home .worklist-table .timeline-patient > a{color:var(--theme-text,#f5f5f5);font-size:.9375rem;font-weight:700;line-height:1.4;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em;overflow-wrap:anywhere}
.patients-home .worklist-table .timeline-patient > a:hover{text-decoration-thickness:2px}
.patients-home .worklist-table .timeline-patient > a:focus-visible{outline:3px solid var(--theme-action,var(--theme-link-border,#cbb0da));outline-offset:3px;border-radius:.15rem}
.patients-home .worklist-table .timeline-patient > .patient-dob{padding-inline-start:.65rem}
/* Compact table rhythm requested for every worklist text/control context. */
.patients-home .worklist-table,.patients-home .worklist-table *{line-height:1!important}
.patients-home .worklist-table .timeline-patient > a{margin-bottom:0}
.patients-home .worklist-table .timeline-patient > .patient-dob{margin-top:.15rem}
.patients-home .worklist-table .worklist-visits{min-height:32px}
.patients-home .worklist-table .practice-assignment-button{min-height:44px}
.patients-home .worklist-table .worklist-visits{appearance:none;-webkit-appearance:none;padding-right:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%238b7896' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .45rem center}
/* Patient-level surgical dates span per-eye status rows, with explicit eye labels. */
.patients-home .worklist-table{min-width:58rem}
.patients-home .worklist-table .worklist-surgery-heading{width:11rem}
.patients-home .worklist-table .worklist-stage-heading{width:auto}
.patients-home .worklist-table .worklist-surgery-date{vertical-align:middle;font-variant-numeric:tabular-nums}
.patients-home .worklist-surgery-line{display:flex;align-items:baseline;gap:.4rem;margin:.25rem 0;white-space:nowrap}
.patients-home .worklist-surgery-eye{min-width:1.5rem;font-weight:650;color:var(--theme-text-muted,#c3bdc9)}
.patients-home .worklist-surgery-date .worklist-unknown{white-space:normal;font-size:.8rem}
.patients-home .worklist-table a.worklist-status{color:var(--theme-text,#eee7f2);text-decoration:underline;text-underline-offset:.18em}
.patients-home .worklist-table a.worklist-status:hover{text-decoration-thickness:2px}
.patients-home .worklist-surgery-line{flex-wrap:wrap;gap:.2rem .4rem}
.patients-home .worklist-surgery-line time{white-space:nowrap}
/* Patient-scoped referral/preparation detail; never adds a mandatory wide column. */
.patients-home .worklist-workflow{margin:0 0 .55rem;max-width:100%;min-width:0}
.patients-home .worklist-workflow > summary{cursor:pointer;padding:.5rem .6rem;border:1px solid var(--theme-border,#6f6678);border-radius:.5rem;background:var(--theme-surface-raised,#252c35);color:var(--theme-text,#f3eef6);min-height:44px;overflow-wrap:anywhere}
.patients-home .worklist-workflow > summary strong{font-size:.8rem;font-weight:700}
.patients-home .worklist-workflow > summary span{display:block;margin-top:.3rem;font-size:.72rem;color:var(--theme-text-muted,#c3bdc9)}
.patients-home .worklist-workflow-panel{margin-top:.5rem;min-width:0;overflow-wrap:anywhere}
.patients-home .worklist-workflow-panel section,.patients-home .workflow-parallel{padding:.65rem;margin:.5rem 0;border:1px solid var(--theme-border,#6f6678);border-radius:.5rem;background:var(--theme-surface,#20232a)}
.patients-home .worklist-workflow-panel h3{margin:0 0 .5rem;font-size:.8rem;color:var(--theme-text,#f3eef6)}
.patients-home .worklist-workflow-panel p{margin:.4rem 0;font-size:.75rem}
.patients-home .worklist-workflow-panel p b,.patients-home .worklist-workflow-panel p span{display:block;margin-bottom:.25rem}
.patients-home .worklist-workflow-panel p span{color:var(--theme-text-muted,#c3bdc9)}
.patients-home .workflow-parallel-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:.5rem}
.patients-home .workflow-parallel-columns section{margin:0}
.patients-home .worklist-workflow-panel a{display:inline-block;padding:.4rem 0;font-size:.75rem;text-decoration:underline;color:var(--theme-text,#f3eef6)}
.patients-home .worklist-workflow-panel ul{padding-left:1rem;margin:.5rem 0;font-size:.75rem}
.patients-home .worklist-workflow-panel li{margin:.3rem 0}
.patients-home .worklist-workflow-panel button{min-height:36px;max-width:100%;padding:.5rem .6rem;white-space:normal;font-size:.75rem;border:1px solid var(--theme-border,#6f6678);border-radius:.4rem;background:var(--theme-surface-raised,#252c35);color:var(--theme-text,#f3eef6)}
.patients-home .workflow-checklist-state,.patients-home .workflow-scheduling-note{font-weight:600}
.patients-home .workflow-event-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:.5rem}
.patients-home .workflow-event-groups > details{padding:.5rem;border:1px solid var(--theme-border,#6f6678);border-radius:.4rem;min-width:0}
.patients-home .workflow-event-groups summary,.patients-home .worklist-workflow-panel > details > summary{cursor:pointer;min-height:36px;font-size:.78rem;font-weight:650}
.patients-home .workflow-event-row{margin:.5rem 0!important;padding:.5rem!important}
.workflow-event-editor{box-sizing:border-box;width:min(44rem,calc(100vw - 1rem));max-height:calc(100dvh - 2rem);overflow:auto;padding:1.25rem;border:1px solid var(--theme-border,#6f6678);border-radius:.7rem;background:var(--theme-surface,#20232a);color:var(--theme-text,#f3eef6);font:1rem/1.4 system-ui,sans-serif}
.workflow-event-editor::backdrop{background:#0008}
.workflow-event-editor h2{margin:0 0 .5rem;font-size:1.2rem}
.workflow-event-editor form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.workflow-event-editor label{display:flex;flex-direction:column;gap:.3rem;font-size:.85rem;min-width:0}
.workflow-event-editor :is(input,select,textarea){box-sizing:border-box;max-width:100%;min-width:0;width:100%;min-height:44px;padding:.6rem;font:inherit;background:var(--theme-surface,#20232a);color:var(--theme-text,#f3eef6);border:1px solid var(--theme-border,#6f6678);border-radius:.4rem}
.workflow-event-editor :is(p,pre){grid-column:1/-1;white-space:pre-wrap;overflow-wrap:anywhere;font-size:.85rem;margin:.3rem 0}
.workflow-event-editor button{min-height:44px;white-space:normal;padding:.6rem;border-radius:.4rem;font:inherit}
.workflow-event-editor [hidden]{display:none!important}
@media(max-width:500px){.workflow-event-editor form{grid-template-columns:minmax(0,1fr)}}
.patients-home .workflow-inline-strip{display:flex;flex-wrap:wrap;gap:.3rem;margin:0 0 .5rem;align-items:flex-start}
.patients-home .workflow-inline-state{flex-basis:100%;font-size:.7rem;color:var(--theme-text-muted,#c3bdc9)}
.patients-home .workflow-inline-state:empty{display:none}
.patients-home .workflow-inline-group{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem;border-left:2px solid var(--theme-border,#6f6678);padding-left:.3rem;max-width:100%}
.patients-home .workflow-inline-group-label{width:100%;font-size:.65rem;font-weight:650;color:var(--theme-text-muted,#c3bdc9)}
.patients-home .workflow-step{min-height:28px;padding:.3rem .35rem;margin:0;border:1px solid var(--theme-border,#6f6678);border-radius:.35rem;background:var(--theme-surface,#20232a);color:var(--theme-text,#f3eef6);font-size:.7rem;white-space:normal;cursor:pointer}
.patients-home .workflow-step[data-state=completed]{background:var(--theme-success-surface,#4b3557);color:var(--theme-text,#fffafc)}
.patients-home .workflow-step[data-state=scheduled]{border-color:#ae8dbd;background:var(--theme-accent-surface,#493260)}
.patients-home .workflow-step[data-state=cancelled]{text-decoration:line-through;color:var(--theme-text-muted,#c3bdc9)}
.patients-home .workflow-step[data-state=unavailable]{border-style:dashed}
@media(max-width:600px){.patients-home .workflow-step{min-height:36px}}

.patients-home .worklist-table{min-width:68rem}
.patients-home .workflow-inline-group{flex:1 1 8rem}
.patients-home .workflow-step:focus-visible{outline:2px solid var(--theme-accent,#c8bdb2);outline-offset:2px}
@media(pointer:coarse){.patients-home .workflow-step{min-height:44px}}

.patients-home .worklist-workflow:not([open]) > summary{min-height:28px;padding:.35rem .45rem}
.patients-home .worklist-workflow:not([open]) > summary strong{font-size:.7rem}
.patients-home .worklist-workflow:not([open]) > summary span{display:none}
/* Dense patient line: reserve most horizontal space for the visible event strip. */
.patients-home .worklist-table .timeline-patient-heading{width:10rem}
.patients-home .worklist-table .timeline-practice-heading{width:6rem}
.patients-home .worklist-table .worklist-eye-heading{width:5rem}
.patients-home .worklist-table .worklist-surgery-heading{width:7.5rem}
.patients-home .worklist-table .worklist-controls-heading{width:8.5rem}
.patients-home .worklist-table .worklist-stage{padding:.5rem}
.patients-home .workflow-inline-strip{gap:.3rem;margin-bottom:.2rem}
.patients-home .workflow-inline-group{flex:1.4 1 11rem}
.patients-home .workflow-inline-group:nth-of-type(1){flex:.6 1 5.5rem}
.patients-home .workflow-inline-group:nth-of-type(2){flex:1.6 1 12rem}
.patients-home .workflow-inline-group:nth-of-type(4){flex:1.2 1 9rem}
.patients-home .worklist-workflow:not([open]){display:inline-block;vertical-align:middle;margin:0 .45rem 0 0}
.patients-home .worklist-workflow:not([open]) > summary{min-height:24px;padding:.3rem .2rem;border:0;background:transparent;text-decoration:underline;text-underline-offset:.15em}
.patients-home .worklist-table .worklist-status{font-size:.72rem;vertical-align:middle}
@media(pointer:coarse){.patients-home .worklist-workflow:not([open]) > summary{min-height:44px}}
/* Approved minimal stage panels: shared labels, one flat patient line. */
.patients-home .worklist-table{min-width:80rem;table-layout:fixed;border-collapse:separate;border-spacing:0}
.patients-home .worklist-table .timeline-patient-heading{width:11rem}
.patients-home .worklist-table .timeline-practice-heading{width:6rem}
.patients-home .worklist-table .worklist-controls-heading{width:8.5rem}
.patients-home .worklist-table .minimal-stage-exam{width:6rem}
.patients-home .worklist-table .minimal-stage-testing{width:20rem}
.patients-home .worklist-table .minimal-stage-consult{width:17rem}
.patients-home .worklist-table .minimal-stage-planning{width:19rem}
.patients-home .worklist-table thead th{background:var(--theme-canvas,#16181c);color:var(--theme-text,#f3eef6);border-bottom:1px solid var(--theme-border,#6f6678);padding:.6rem .45rem;font-weight:500}
.patients-home .minimal-stage-headings th b{font-weight:600;font-size:.76rem}
.patients-home .minimal-stage-headings th small{font-size:.63rem;margin-top:.35rem;color:var(--theme-text-muted,#c3bdc9);font-weight:400}
.patients-home .worklist-table thead .minimal-step-labels th{padding:.4rem .45rem;font-size:.65rem;font-weight:400;color:var(--theme-text-muted,#c3bdc9)}
.patients-home .minimal-step-labels th > div{display:grid;grid-template-columns:repeat(var(--steps,1),minmax(0,1fr));align-items:center;text-align:center;gap:1px}
.patients-home .worklist-table tbody th.timeline-patient,.patients-home .worklist-table tbody td{padding:.5rem .45rem;vertical-align:middle}
.patients-home .worklist-table .timeline-patient > a{font-size:.82rem;font-weight:600}
.patients-home .worklist-table .patient-dob{font-size:.65rem;margin-top:.15rem}
.patients-home .minimal-stage-panel{display:grid;grid-template-columns:repeat(var(--steps,1),minmax(0,1fr));align-items:center;min-height:40px;border:1px solid var(--theme-border,#6f6678);border-radius:5px;background:var(--theme-surface,#20232a);padding:0 3px;gap:1px}
.patients-home .minimal-stage-panel[data-complete=true]{background:var(--theme-action-soft,var(--theme-accent-surface,#493260));border-color:var(--theme-action-border,var(--theme-border,#6f6678))}
.patients-home .minimal-stage-mark{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:38px;width:100%;min-width:0;padding:3px 1px;margin:0;border:0;border-radius:3px;background:transparent;color:var(--theme-text-muted,#c3bdc9);font-size:1rem;cursor:pointer}
.patients-home .minimal-stage-mark[data-state=completed]{color:var(--theme-action,var(--theme-text,#fffafc))}
.patients-home .minimal-stage-mark[data-state=scheduled]{color:var(--theme-link,#bfccd8)}
.patients-home .minimal-stage-mark[data-state=attention]{color:var(--theme-warning,#f1bb75)}
.patients-home .minimal-stage-mark:hover{background:var(--theme-surface-hover,#303741)}
.patients-home .minimal-stage-mark time{font-size:.6rem;margin-top:3px;font-variant-numeric:tabular-nums}
.patients-home .minimal-surgery-date{font-size:.65rem;text-align:center;padding:3px 1px;color:var(--theme-text-muted,#c3bdc9);font-variant-numeric:tabular-nums;overflow-wrap:normal}
.patients-home .minimal-surgery-line{margin:2px 0;white-space:nowrap}
.patients-home .minimal-context{display:inline;min-height:24px;max-width:100%;padding:2px 0;margin:1px 0 0 .65rem;border:0;background:transparent;color:var(--theme-text-muted,#c3bdc9);font-size:.6rem;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.patients-home .minimal-stage-legend{display:flex;flex-wrap:wrap;gap:.35rem 1rem;margin:.35rem 0 .6rem;color:var(--theme-text-muted,#c3bdc9);font-size:.65rem}
.minimal-stage-details{width:min(70rem,calc(100vw - 1rem))}
.minimal-stage-details > .workflow-inline-strip{display:none}
.minimal-stage-details .worklist-workflow-panel{font-size:.85rem}
.minimal-stage-details .worklist-workflow-panel section{margin:.65rem 0}
.minimal-stage-details .workflow-event-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:1rem}
.minimal-stage-details .workflow-event-row{margin:.5rem 0;padding:.5rem;border-bottom:1px solid var(--theme-border,#6f6678)}
.minimal-stage-details a{color:var(--theme-text,#f3eef6)}
@media(pointer:coarse){.patients-home .minimal-stage-mark{min-height:44px}.patients-home .minimal-context{min-height:44px;padding:.4rem}.patients-home .worklist-table .timeline-patient{position:relative;padding-bottom:1rem}.patients-home .minimal-context{margin:0}}
.patients-home[data-account-state="signed-in"] .worklist-table thead{position:sticky;top:0;z-index:3}
.patients-home[data-account-state="signed-in"] .worklist-table thead th{position:static;background:var(--theme-canvas,#16181c)}

.patients-home .worklist-table tbody tr{height:72px}
@media(pointer:coarse){.patients-home .worklist-table .timeline-patient{padding-bottom:.5rem}}
/* This table follows the approved quiet shared-header preview, including Light. */
:root[data-theme] .patients-home .worklist-table > thead > tr > th{background-color:var(--theme-canvas,#16181c)!important;color:var(--theme-text,#f3eef6)!important}
:root[data-theme] .patients-home .worklist-table > thead :is(span,small){color:var(--theme-text-muted,#c3bdc9)!important}
.patients-home .worklist-table .minimal-stage-headings th{border-bottom:2px solid color-mix(in srgb,var(--theme-action,#ae8dbd) 35%,var(--theme-canvas,#16181c))}
.patients-home .minimal-stage-panel{border-color:color-mix(in srgb,var(--theme-border,#6f6678) 40%,var(--theme-surface,#20232a))}
.patients-home .minimal-stage-panel[data-complete=true]{background:var(--theme-action-tint,var(--theme-accent-surface,#493260));border-color:var(--theme-action-tint,var(--theme-border,#6f6678))}
/* Dashboard tabs are the visible page header; retain the skip target and h1 identity. */
.patients-home[data-account-state="signed-in"] > main > .workspace-heading{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;border:0;
  overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;
}
/* Keep stage groups content-sized instead of stretching across wide displays. */
.patients-home .worklist-table{width:74rem;min-width:74rem;max-width:none}
.patients-home .worklist-table .timeline-patient-heading{width:11rem}
.patients-home .worklist-table .timeline-practice-heading{width:6rem}
.patients-home .worklist-table .minimal-stage-exam{width:4.5rem}
.patients-home .worklist-table .minimal-stage-testing{width:15rem}
.patients-home .worklist-table .minimal-stage-consult{width:13rem}
.patients-home .worklist-table .minimal-stage-planning{width:16rem}
.patients-home .worklist-table .worklist-controls-heading{width:8.5rem}
.patients-home .worklist-table tbody th.timeline-patient,.patients-home .worklist-table tbody td{padding:.4rem .3rem}
.patients-home .worklist-table thead th,.patients-home .worklist-table thead .minimal-step-labels th{padding-inline:.3rem}
.patients-home .minimal-stage-panel{padding-inline:2px;gap:0}
.patients-home .worklist-table tbody tr{height:68px}
/* The complete Exam sublabel needs its own readable width. */
.patients-home .worklist-table{width:75rem;min-width:75rem}
.patients-home .worklist-table .minimal-stage-exam{width:5.5rem}
/* Each parallel preparation track has its own evidence-derived visit state. */
.patients-home .visit-track-panel{row-gap:1px}
.patients-home .visit-track-summary{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:.2rem;min-width:0}
.patients-home .visit-track-state,.patients-home .visit-track-schedule{min-height:24px;margin:0;padding:2px 3px;font-size:.65rem;white-space:normal;cursor:pointer}
.patients-home .visit-track-state{border:0;background:transparent;text-align:left;color:var(--theme-text,#f3eef6);font-weight:600;min-width:0}
.patients-home .visit-track-state[data-status=Unavailable]{text-decoration:underline;color:var(--theme-warning,#f1bb75)}
.patients-home .visit-track-schedule{border:1px solid var(--theme-border,#6f6678);border-radius:3px;background:var(--theme-surface-raised,#252c35);color:var(--theme-text,#f3eef6)}
.patients-home .visit-track-panel .minimal-stage-mark{min-height:24px}
.patients-home .visit-track-missing{grid-column:1/-1;display:block;font-size:.58rem;margin:0 0 2px;color:var(--theme-text-muted,#c3bdc9)}
@media(pointer:coarse){.patients-home .visit-track-state,.patients-home .visit-track-schedule,.patients-home .visit-track-panel .minimal-stage-mark{min-height:44px}}
/* Compact visit scheduling icon and explicit recorded appointment badge. */
.patients-home .visit-track-schedule{display:inline-flex;align-items:center;justify-content:center;flex:0 0 26px;width:26px;min-width:26px;padding:3px}
.patients-home .visit-track-schedule svg{display:block;width:16px;height:16px;flex:none}
.patients-home .visit-track-schedule:focus-visible{outline:2px solid var(--theme-action,var(--theme-link,#c8bdb2));outline-offset:2px}
.patients-home .visit-track-schedule:disabled{opacity:.5;cursor:wait}
.patients-home .visit-track-state{display:flex;flex-wrap:wrap;align-items:center;gap:.2rem}
.patients-home .visit-track-date-badge{display:inline-block;white-space:nowrap;font-size:.6rem;font-weight:500;font-variant-numeric:tabular-nums;padding:2px 4px;border-radius:3px;background:var(--theme-surface-raised,#252c35);color:var(--theme-text,#f3eef6)}
@media(pointer:coarse){.patients-home .visit-track-schedule{flex-basis:44px;width:44px;min-width:44px;min-height:44px}}
/* Patient progression: centered purple headers and evidence-proportional fill. */
.patients-home .worklist-table{width:77rem;min-width:77rem}
.patients-home .worklist-table .minimal-stage-planning{width:16.5rem}
.patients-home .worklist-table .minimal-stage-postop{width:10rem}
:root[data-theme] .patients-home[data-account-state="signed-in"] .worklist-table > thead > tr > th{background-color:#4b3557!important;color:#fffafc!important;text-align:center;vertical-align:middle;border-color:#796184}
:root[data-theme] .patients-home[data-account-state="signed-in"] .worklist-table > thead :is(span,small,b){color:#fffafc!important;text-align:center}
.patients-home .minimal-stage-panel[data-progress]{background:var(--stage-segments,var(--theme-surface,#20232a))}
.patients-home .minimal-surgery-date{width:100%;min-height:36px;font-family:inherit;cursor:pointer;border:1px solid transparent;background:transparent;border-radius:3px}
.patients-home .minimal-surgery-date[data-known=true]{font-weight:650;color:var(--theme-action,var(--theme-text,#f3eef6));border-color:color-mix(in srgb,var(--theme-action,#ae8dbd) 35%,transparent);background:color-mix(in srgb,var(--theme-action-tint,#493260) 55%,var(--theme-surface,#20232a))}
.patients-home .minimal-surgery-line{white-space:normal}
.patients-home .minimal-surgery-line time{white-space:nowrap}
@media(pointer:coarse){.patients-home .minimal-surgery-date{min-height:44px}}
@media(pointer:coarse){.patients-home .worklist-table{width:79rem;min-width:79rem}.patients-home .worklist-table .minimal-stage-postop{width:12rem}}
/* Compact unified worklist toolbar; referral remains a route beside dashboard tabs. */
.patients-home .dashboard-navigation{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;flex-shrink:0;margin:.25rem 0 .5rem;padding-bottom:.25rem;border-bottom:1px solid var(--theme-border,#71695f)}
.patients-home .dashboard-navigation .dashboard-tabs{margin:0;padding:0;border-bottom:0}
.patients-home .dashboard-navigation > .referral-entry{min-height:44px;margin:0;padding:.5rem .7rem;border:1px solid transparent;border-radius:.4rem;font:600 .8125rem/1.3 Nunito,system-ui,sans-serif;text-decoration:none;color:var(--theme-text,#f5f5f5)}
.patients-home .dashboard-navigation > .referral-entry:hover{background:var(--theme-surface-hover,#303741)}
.patients-home .dashboard-navigation > .referral-entry:focus-visible{outline:2px solid var(--theme-action,var(--theme-link,#c8bdb2));outline-offset:2px}
.patients-home .worklist-toolbar{align-items:flex-end;gap:.4rem .5rem}
.patients-home .worklist-toolbar .filters{flex:0 1 auto;gap:.4rem .5rem}
.patients-home .worklist-toolbar .practice-picker{flex:0 1 180px;width:180px}
.patients-home .worklist-toolbar .filters > label{flex:0 1 220px;width:220px;max-width:100%}
.patients-home .worklist-toolbar .patient-view-nav{flex:0 1 auto;margin:0;gap:.15rem;padding:.15rem;border-radius:.55rem}
.patients-home .worklist-toolbar .patient-view-nav > button[data-patient-view]{gap:.3rem;padding:.4rem .45rem;font-size:.78rem}
.patients-home .worklist-toolbar .patient-view-nav > button > small{min-width:1.4rem;padding:.12rem .3rem;font-size:.7rem}
.patients-home .worklist-toolbar .patients-actions{display:flex;flex:0 1 auto;flex-wrap:wrap;gap:.4rem;margin:0;justify-content:flex-start}
.patients-home .worklist-toolbar .patients-actions > button{padding:.5rem .65rem;font-size:.8rem}
.patients-home .worklist-toolbar .patients-actions #patients-refresh{padding:10px}
@media(max-width:600px){.patients-home .worklist-toolbar .filters{flex:1 1 100%}.patients-home .worklist-toolbar .practice-picker{flex:1 1 100%;width:100%}.patients-home .worklist-toolbar .filters > label{flex:0 1 220px;width:220px}.patients-home .worklist-toolbar .patient-view-nav{display:flex;flex-wrap:wrap;width:auto;max-width:100%;flex:1 1 100%}.patients-home .worklist-toolbar .patient-view-nav > button{flex:1 1 auto}.patients-home .worklist-toolbar .patients-actions{display:flex;flex-wrap:wrap;width:100%;flex:1 1 100%}.patients-home .worklist-toolbar #patients-count{flex:1 1 100%}}

/* Compact filter group precedes search; totals remain screen-reader feedback only. */
.patients-home .worklist-toolbar .patient-view-nav{gap:0;padding:2px;border-radius:.5rem;background:var(--theme-surface-raised,#252c35);border:1px solid var(--theme-border,#5b5361)}
.patients-home .worklist-toolbar .patient-view-nav > button[data-patient-view]{padding:.3rem .35rem;gap:.25rem;font-size:.75rem;border-radius:.35rem}
.patients-home .worklist-toolbar .patient-view-nav > button > small{min-width:1.25rem;padding:.1rem .25rem;font-size:.6875rem}
.patients-home .worklist-toolbar #patients-count{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;flex:none}

/* Actions occupy the right edge while filters and search retain source order. */
.patients-home .worklist-toolbar .patients-actions{margin-left:auto}
.patients-home .worklist-reload-mark{display:block;width:20px;height:20px;object-fit:contain;filter:brightness(0) invert(1)}
:root[data-theme="light"] .patients-home .worklist-reload-mark{filter:none}
@media(max-width:600px){.patients-home .worklist-toolbar .patients-actions{justify-content:flex-end;margin-left:0}}

/* Worklist header needs no bottom rule; other surface separators stay intact. */
.patients-home .site-header{border-bottom:0}
