/* Specbook dashboard palette. Clinical status colours remain local to each status. */
:root {
  --ws-navy: #0b1f3a;
  --ws-blue: #1d4ed8;
  --ws-on-blue: #fff;
  --ws-page: #f3f6fb;
  --ws-card: #fff;
  --ws-ink: #102039;
  --ws-muted: #52657d;
  --ws-line: #d6e1ef;
  --ws-soft: #eaf1ff;
  --ws-link: #1847c6;
  --ws-focus: #2162e4;
  --ws-ice: #c7ddff;
  --ws-secondary: #17375c;
  --ws-edge: #738fb3;
  --ws-display: 'Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  --ws-banner: linear-gradient(112deg,var(--ws-navy) 8%,#112e54 65%,#214777);
  --ws-contours: repeating-radial-gradient(ellipse 68% 185% at 109% 155%,transparent 0 19px,#a7ccff24 20px,transparent 21px 39px);
}
html[data-theme="dark"] {
  --ws-page: #0c1628;
  --ws-card: #15243b;
  --ws-ink: #eff4ff;
  --ws-muted: #b6c6db;
  --ws-line: #364a66;
  --ws-soft: #203555;
  --ws-link: #accaff;
  --ws-focus: #95bdff;
}

/* These views are mounted inside the home page after sign-in. */
html body #view-spec.pg-pro #pgDash,
html body.sb-split section#view-admin .pagehead,
#dashboard #professionalBanner,
#dashboard #dashboardCareers .practice-welcome {
  box-sizing: border-box; position: relative; isolation: isolate;
  background: var(--ws-contours), var(--ws-banner);
  border: 1px solid #315581; border-radius: 18px;
  color: white; box-shadow: 0 4px 16px #0b1f3a12;
}
html body #view-spec.pg-pro #pgDash,
html body.sb-split section#view-admin .pagehead,
#dashboard #professionalBanner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 14px 22px; padding: clamp(18px,3vw,36px) !important;
  margin: 0 0 14px !important; min-width: 0;
}
html body #view-spec.pg-pro #pgDash .pagehead:not([hidden]) { margin: 0 !important; padding: 0 !important; background: transparent; }
html body #view-spec.pg-pro #pgDash .pagehead :is(h1,h2),
html body.sb-split section#view-admin .pagehead h1,
#dashboard #professionalBanner h2,
#dashboard #dashboardCareers .practice-welcome h2 {
  color: #fff !important; font: 500 clamp(30px,3.6vw,46px)/1.12 var(--ws-display) !important;
  letter-spacing: -.035em; margin: 0 !important; overflow-wrap: anywhere;
}
html body #view-spec.pg-pro #pgDash :is(.pg-hello,.eyebrow),
html body.sb-split section#view-admin .pagehead .eyebrow,
#dashboard #professionalBanner > div > span {
  display: block; color: var(--ws-ice) !important; background: transparent !important; border: 0;
  font: 600 .85rem/1.4 Figtree,system-ui,sans-serif; margin-block: 0 5px;
}
#dashboard #professionalBanner nav { display: flex; gap: 8px; flex-wrap: wrap; }
#dashboard #professionalBanner nav a,
html body #view-spec.pg-pro #pgDash .pg-act {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; min-width: 0; padding: 10px 14px; border-radius: 10px;
  background: var(--ws-secondary) !important; border: 1px solid var(--ws-edge) !important;
  font: 650 .93rem/1.25 Figtree,system-ui,sans-serif; text-decoration: none; color: #fff !important;
}
#dashboard #professionalBanner nav .pro-primary, html body #view-spec.pg-pro #pgDash .pg-act.pri,
#dashboard #dashboardCareers .practice-welcome .button:not(.secondary) {
  background: var(--ws-blue) !important; border-color: #7199ff !important; color: #fff !important;
}
html body #view-spec.pg-pro #pgDash [hidden]{display:none !important}
html body #view-spec.pg-pro #pgDash .pg-actions { margin: 0; }
html body #view-spec.pg-pro #provSeg:not([hidden]) {
  background: var(--ws-card); border: 1px solid var(--ws-line);
}
html body #view-spec.pg-pro #provSeg [data-pv][aria-selected="true"],
html body #view-admin .seg button[aria-selected="true"],
html body #view-admin .g-tags button[aria-pressed="true"],
html body.px-body .px-seg [aria-selected="true"] {
  background: var(--ws-blue) !important; color: #fff !important;
}
html body #view-spec.pg-pro #provSeg [data-pv][aria-selected="true"] .pg-i { color: inherit; }
html body .sb-staffshell-host { --ss-bg: var(--ws-card); --ss-ink: var(--ws-ink); --ss-mute: var(--ws-muted);
  --ss-line: var(--ws-line); --ss-pill: var(--ws-blue); --ss-soft: var(--ws-soft); }
html body .sb-staffshell .ss-home { font-family: var(--ws-display); }
html body section#view-admin .panel h3 { font-family: var(--ws-display); font-weight: 500; }
#dashboard #professionalBanner a:focus-visible, #view-spec #pgDash .pg-act:focus-visible {
  outline: 3px solid var(--ws-ice); outline-offset: 3px;
}
@media(max-width:760px){
  html body #view-spec.pg-pro #pgDash { align-items: stretch; flex-direction: column; }
  html body #view-spec.pg-pro #pgDash .pg-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  html body #view-spec.pg-pro #pgDash .pg-act { padding: 9px 6px; white-space: normal; }
  html body #view-spec.pg-pro #provSeg { max-width: 100%; min-width: 0; }
  html body #view-spec.pg-pro #provSeg [data-pv] { min-height: 44px; }
  #dashboard #professionalBanner { flex-direction: column; align-items: flex-start; }
}

/* Keep the shared navigation in step with the active dashboard, including during role changes. */
html body:is(.care-page,:has(#dashboard:not([hidden]),#view-admin:not([hidden]),#view-spec.pg-pro:not([hidden]))) > header {
  background: var(--ws-navy) !important; border-color: #244467 !important;
}
html body:is(.care-page,:has(#dashboard:not([hidden]),#view-admin:not([hidden]),#view-spec.pg-pro:not([hidden]))) .sb-mobile-nav {
  background: var(--ws-card) !important; border-color: var(--ws-line) !important;
}
html body:is(.care-page,:has(#dashboard:not([hidden]),#view-admin:not([hidden]),#view-spec.pg-pro:not([hidden]))) .sb-mobile-nav > :is(button,a) {
  color: var(--ws-muted) !important;
}
html body:is(.care-page,:has(#dashboard:not([hidden]),#view-admin:not([hidden]),#view-spec.pg-pro:not([hidden]))) :is(.sb-mobile-nav,.sb-desktop-nav,header nav) [aria-current="page"] {
  background: var(--ws-blue) !important; color: var(--ws-on-blue) !important; box-shadow: inset 0 -2px #84b4ff !important;
}
