/* Doctor Journey — VexaCare doctor-patient layout (navbar + command nav) */
.dj-page,
.dj-drawer {
  --dj-line: hsl(var(--surface-border, 210 15% 88%));
  --dj-ink: hsl(var(--foreground));
  /* Palette medico: testi e stati almeno 4.5:1 (WCAG AA); #34B2AC resta per logo e superfici. */
  --dj-muted: #5B6B7A;
  --dj-done: #2E7D32;
  --dj-attention: #A56218;
  --dj-wait: #5B6B7A;
  --dj-teal: #247B76;
  --dj-mint: hsl(var(--primary) / 0.08);
}
.dj-page {
  color: var(--dj-ink);
}

.dj-page a:focus-visible,
.dj-page button:focus-visible,
.dj-page summary:focus-visible {
  outline: 2px solid var(--dj-teal, #247B76);
  outline-offset: 2px;
}

.dj-icon-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--dj-line);
  background: hsl(var(--card));
  cursor: pointer;
}

.dj-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--dj-muted);
}
.dj-crumb a { color: inherit; text-decoration: none; }
.dj-crumb a:hover { color: var(--dj-teal); }
.dj-crumb strong { color: var(--dj-ink); font-weight: 600; }

.dj-header-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  align-items: center;
  margin-bottom: 1.1rem;
}
.dj-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}
.dj-quote {
  margin: 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--dj-teal);
  text-align: right;
  max-width: 14rem;
}
.dj-chip-status {
  margin-left: 0.35rem;
  background: #EAF5EA;
  border-color: #DCE0E5;
  color: var(--dj-done);
}
.dj-identity { display: flex; gap: 1rem; min-width: 0; align-items: flex-start; }
.dj-identity .doctor-avatar-ring { height: fit-content; }
.dj-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  object-fit: cover;
  background: hsl(var(--card));
}
.dj-avatar-fallback {
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--dj-teal);
  background: #EDF4F4;
}
.dj-name {
  margin: 0.2rem 0 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.dj-meta { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--dj-muted); }
.dj-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.7rem; }
.dj-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
  font-size: 0.75rem;
  border: 1px solid hsl(var(--primary) / 0.15);
  background: hsl(var(--card));
}
.dj-chip i { color: var(--dj-teal); font-size: 0.7rem; }

.dj-quick { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.dj-quick a, .dj-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.2rem;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.18);
  background: hsl(var(--card));
  color: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.dj-quick a:hover, .dj-btn:hover { border-color: hsl(var(--primary) / 0.45); color: var(--dj-teal); }
.dj-btn-primary {
  background: var(--dj-teal, hsl(var(--primary)));
  border-color: var(--dj-teal, hsl(var(--primary)));
  color: #fff;
}
.dj-btn-primary:hover { color: #fff; filter: brightness(1.05); }
.dj-text-link {
  background: none;
  border: 0;
  color: var(--dj-teal);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.dj-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}
@media (min-width: 1280px) {
  .dj-body {
    grid-template-columns: minmax(0, 1fr) 18.5rem;
  }
}

.dj-flow {
  background: linear-gradient(180deg, #F9FAFB 0%, #EAF5EA 100%);
  border: 1px solid #C8DEDD;
  border-radius: 1.25rem;
  padding: 1.05rem 1.15rem 0.85rem;
  position: relative;
  overflow: hidden;
}
.dj-flow-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}
.dj-flow-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dj-flow-head p { margin: 0.2rem 0 0; font-size: 0.88rem; color: var(--dj-muted); }
.dj-flow-quote {
  font-family: "DM Serif Display", serif;
  font-style: italic;
  color: rgb(91 107 122 / 0.7);
  text-align: right;
  font-size: 1.05rem;
  line-height: 1.2;
}

.dj-bpf {
  --dj-stage-count: 9;
  display: grid;
  grid-template-columns: repeat(var(--dj-stage-count), minmax(4.35rem, 1fr));
  align-items: start;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0 0.55rem;
  scrollbar-width: thin;
  position: relative;
}
.dj-helix {
  position: absolute;
  left: 0;
  right: 0;
  top: 0.12rem;
  width: 100%;
  height: 3.15rem;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.dj-helix svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.dj-helix-ghosts path {
  fill: none;
  stroke: rgb(52 178 172 / 0.08);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dj-helix-strand {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dj-helix-strand-a {
  stroke: rgb(36 123 118 / 0.18);
  stroke-width: 1.6;
}
.dj-helix-strand-b {
  stroke: rgb(52 178 172 / 0.12);
  stroke-width: 1.4;
}
.dj-bpf-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 4.35rem;
  grid-row: 1;
  z-index: 1;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0.15rem 0.4rem;
  border-radius: 0.9rem;
  transition: background 180ms ease, transform 180ms ease;
}
.dj-bpf-step[data-selected="true"] { background: hsl(0 0% 100% / 0.45); }
.dj-node {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: var(--dj-teal);
  position: relative;
  z-index: 2;
  font-size: 1.55rem;
  box-shadow: none;
}
.dj-node i {
  filter: drop-shadow(0 0 2px #F9FAFB);
}
.dj-bpf-step[data-tone="done"] .dj-node {
  background: transparent;
  border: none;
  color: var(--dj-done);
}
.dj-bpf-step[data-tone="waiting"] .dj-node {
  background: transparent;
  border: none;
  color: var(--dj-teal);
}
.dj-bpf-step[data-tone="current"] .dj-node,
.dj-bpf-step[data-current="true"]:not([data-tone="attention"]) .dj-node {
  background: transparent;
  box-shadow: none;
  animation: dj-pulse 1.8s ease-in-out infinite;
}
.dj-bpf-step[data-tone="attention"] .dj-node {
  background: transparent;
  border: none;
  color: #A56218;
  box-shadow: none;
  animation: dj-pulse-amber 1.8s ease-in-out infinite;
}
.dj-node-check {
  position: absolute;
  right: -0.2rem;
  bottom: -0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #fff;
  color: var(--dj-done);
  display: grid;
  place-items: center;
  font-size: 0.5rem;
  border: 1px solid var(--dj-done);
}
.dj-node-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.2rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: var(--dj-attention);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.dj-bpf-kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.28rem;
  margin-top: 0.35rem;
  text-align: center;
  line-height: 1.2;
}
.dj-bpf-code {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--dj-teal);
  letter-spacing: 0.06em;
  margin: 0;
}
.dj-bpf-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dj-ink);
}
.dj-bpf-caption {
  font-size: 0.72rem;
  font-weight: 500;
  color: hsl(var(--foreground) / 0.62);
  text-align: center;
  line-height: 1.25;
}
.dj-bpf-step[data-tone="attention"] .dj-bpf-caption { color: var(--dj-attention); font-weight: 650; }
.dj-bpf-step[data-tone="done"] .dj-bpf-caption { color: var(--dj-done); }

@keyframes dj-helix-breathe {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}
.dj-helix-strands {
  animation: dj-helix-breathe 4.8s ease-in-out infinite;
}
@keyframes dj-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.88; }
}
@keyframes dj-pulse-amber {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.88; }
}

@media (prefers-reduced-motion: reduce) {
  .dj-helix-strands, .dj-bpf-step[data-tone="current"] .dj-node,
  .dj-bpf-step[data-current="true"] .dj-node,
  .dj-bpf-step[data-tone="attention"] .dj-node,
  .dj-workspace { animation: none !important; }
}

.dj-workspace-pane[hidden] {
  display: none !important;
}

.dj-workspace {
  background: #fff;
  border: 1px solid var(--dj-line);
  border-radius: 1.15rem;
  padding: 1.25rem 1.35rem 1.4rem;
  min-height: 16rem;
  animation: dj-in 180ms ease;
}
@keyframes dj-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
.dj-workspace-title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dj-workspace-head { display: flex; gap: 0.85rem; align-items: flex-start; }
.dj-viewing { margin: 0 0 0.75rem; font-size: 0.78rem; }
.dj-viewing a { color: var(--dj-teal); text-decoration: none; }
.dj-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dj-teal);
}
.dj-lead { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--dj-muted); max-width: 42rem; line-height: 1.45; }
.dj-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  border: 1px solid var(--dj-line);
  color: var(--dj-muted);
  background: #fff;
}
.dj-pill[data-tone="done"] { color: var(--dj-done); border-color: #DCE0E5; background: #eaf5ea; }
.dj-pill[data-tone="attention"] { color: var(--dj-attention); border-color: #A56218; background: #fff8ee; }
.dj-pill[data-tone="active"] { color: var(--dj-teal); border-color: hsl(var(--primary) / 0.3); }

.dj-tabs {
  display: flex;
  gap: 1.1rem;
  margin: 1.1rem 0 0.2rem;
  border-bottom: 1px solid var(--dj-line);
  overflow-x: auto;
}
.dj-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0.45rem 0;
  font-size: 0.82rem;
  color: var(--dj-muted);
  cursor: pointer;
  white-space: nowrap;
}
.dj-tabs button.is-active { color: var(--dj-teal); border-bottom-color: var(--dj-teal); font-weight: 600; }

.dj-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.05rem;
}
.dj-plan-tile, .dj-stat {
  border: 1px solid var(--dj-line);
  border-radius: 1rem;
  padding: 0.9rem 0.95rem;
  background: #fff;
}
.dj-assess-tiles .dj-stat {
  background: #F9FAFB;
  min-height: 7.5rem;
}
.dj-stat[data-tone="attention"] {
  background: #fff8ee;
  border-color: #A56218;
}
.dj-plan-ico {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--dj-mint);
  color: var(--dj-teal);
  margin-bottom: 0.55rem;
}
.dj-plan-value, .dj-stat b {
  display: block;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.dj-plan-name { margin: 0.1rem 0 0; font-size: 0.82rem; font-weight: 600; }
.dj-stat span, .dj-empty { color: var(--dj-muted); font-size: 0.78rem; }
.dj-empty { margin: 0.35rem 0 0; }
.dj-goal {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--dj-line);
  border-radius: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.dj-goal .dj-plan-ico { margin: 0; }
.dj-plan-cta { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; margin-top: 1.05rem; }

.dj-progress-bar {
  margin-top: 0.55rem;
  height: 0.28rem;
  border-radius: 99px;
  background: #EAEDF0;
  overflow: hidden;
}
.dj-progress-bar span { display: block; height: 100%; background: var(--dj-teal); }
.dj-section-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.dj-section-list li { display: flex; gap: 0.55rem; font-size: 0.88rem; }
.dj-section-list li span { color: var(--dj-teal); width: 1rem; }
.dj-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 0.75rem;
  margin-top: 1.15rem;
}
.dj-assess-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dj-stat-ico {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--dj-mint);
  color: var(--dj-teal);
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
}
.dj-stat[data-tone="attention"] .dj-stat-ico {
  background: #FFF8EE;
  color: var(--dj-attention);
}
.dj-assess-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.dj-assess-card {
  border: 1px solid var(--dj-line);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  background: #fff;
}
.dj-assess-card-mint { background: #F9FAFB; border-color: #C8DEDD; }
.dj-attention-list, .dj-quick-tools {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.dj-attention-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.82rem;
}
.dj-attention-list i { margin-top: 0.35rem; flex-shrink: 0; }
.dj-quick-tools a, .dj-quick-tools button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}
.dj-quick-tools i { color: var(--dj-teal); width: 1rem; text-align: center; }

.dj-nba-strip, .dj-workspace, .dj-flow {
  scroll-margin-top: 6.5rem;
}
.dj-nba-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  border: 1px solid #A56218;
  background: #fff8ee;
  border-radius: 1rem;
  padding: 0.95rem 1.1rem;
}
.dj-nba-strip[data-priority="High"] { border-color: #A56218; }
.dj-nba-strip-title { margin: 0.25rem 0 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.02em; }
.dj-nba-cta .dj-btn-primary { background: var(--dj-teal); }
.dj-request-list { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; gap: 0.55rem; }
.dj-request-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid var(--dj-line);
  padding: 0.55rem 0;
  font-size: 0.88rem;
}
.dj-visit-when { margin: 1.1rem 0 0; font-size: 1.05rem; font-weight: 600; }
.dj-outcome { border-top: 1px solid var(--dj-line); padding-top: 0.9rem; margin-top: 1rem; }
.dj-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.dj-side { display: grid; gap: 0.85rem; }
.dj-card {
  background: #fff;
  border: 1px solid var(--dj-line);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
}
.dj-card-mint { background: #F9FAFB; border-color: #C8DEDD; }
.dj-side-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dj-side-title i { color: var(--dj-teal); }
.dj-side-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.dj-side-head a { font-size: 0.75rem; color: var(--dj-teal); text-decoration: none; }
.dj-visit-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }
.dj-overview { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: center; }
.dj-ring {
  --p: 0;
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 999px;
  background: conic-gradient(var(--dj-teal) calc(var(--p) * 1%), #EAEDF0 0);
  display: grid;
  place-items: center;
}
.dj-ring span {
  width: 3.85rem;
  height: 3.85rem;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.1;
}
.dj-ring b { font-size: 0.95rem; }
.dj-ring small { display: block; font-size: 0.52rem; color: var(--dj-muted); font-weight: 500; }
.dj-legend { display: grid; gap: 0.28rem; font-size: 0.78rem; }
.dj-legend i { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 999px; margin-right: 0.35rem; }
.dj-legend b { float: right; font-weight: 650; }
.dj-dot-done { background: var(--dj-done); }
.dj-dot-todo { background: #8A96A3; }
.dj-dot-wait { background: var(--dj-wait); }
.dj-dot-alert { background: var(--dj-attention); }

.dj-activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.dj-activity li { display: grid; grid-template-columns: 0.7rem 1fr; gap: 0.7rem; }
.dj-activity i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--dj-teal);
  margin-top: 0.25rem;
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}
.dj-activity li:nth-child(2) i { background: var(--dj-attention); box-shadow: 0 0 0 3px rgb(165 98 24 / 0.12); }
.dj-activity li:nth-child(3) i { background: var(--dj-wait); box-shadow: none; }
.dj-activity time { display: block; font-size: 0.7rem; color: var(--dj-muted); }
.dj-activity p { margin: 0.1rem 0 0; font-size: 0.82rem; font-weight: 600; }
.dj-activity span { display: block; font-size: 0.75rem; color: var(--dj-muted); font-weight: 400; }

.dj-more { position: relative; }
.dj-more summary { list-style: none; display: grid; place-items: center; }
.dj-more summary::-webkit-details-marker { display: none; }
.dj-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  background: #fff;
  border: 1px solid var(--dj-line);
  border-radius: 0.75rem;
  min-width: 9rem;
  padding: 0.35rem;
  z-index: 5;
}
.dj-more-menu a { display: block; padding: 0.4rem 0.6rem; border: 0; border-radius: 0.5rem; }

.dj-drawer { position: fixed; inset: 0; z-index: 1100; display: none; }
.dj-drawer.is-open { display: block; }
body.dj-schedule-open { overflow: hidden; }
.dj-drawer-backdrop { position: absolute; inset: 0; background: hsl(200 20% 10% / 0.28); }
.dj-drawer-panel {
  position: absolute;
  top: 0; right: 0; height: 100%;
  width: min(28rem, 100%);
  background: #fff;
  overflow: auto;
  padding: 1.5rem 1.4rem 2rem;
  box-shadow: -8px 0 32px hsl(210 20% 10% / 0.08);
}
#dj-schedule-drawer .dj-drawer-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  height: 100%;
  max-height: 100dvh;
  z-index: 1;
}
#dj-schedule-host {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}
.dj-schedule,
.dj-schedule-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.dj-schedule fieldset {
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.dj-schedule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--dj-line);
}
.dj-schedule-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.15rem 1.4rem 1.25rem;
  display: grid;
  gap: 1.15rem;
  align-content: start;
}
.dj-schedule-foot {
  flex-shrink: 0;
  padding: 0.9rem 1.4rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--dj-line);
  background: #fff;
}
.dj-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.dj-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.dj-choice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.18);
  background: hsl(var(--card));
  color: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}
.dj-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  z-index: 1;
}
.dj-choice span {
  position: relative;
  z-index: 0;
  pointer-events: none;
}
.dj-choice:hover { border-color: hsl(var(--primary) / 0.45); color: var(--dj-teal); }
.dj-choice:has(input:checked),
.dj-choice.is-on {
  background: var(--dj-teal, hsl(var(--primary)));
  border-color: var(--dj-teal, hsl(var(--primary)));
  color: #fff;
}
.dj-choice:has(input:checked):hover,
.dj-choice.is-on:hover { color: #fff; }
.dj-tools-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.dj-tools-head h2 { margin: 0.15rem 0 0; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
#dj-tools-drawer .doctor-patient-nav {
  border: 0;
  background: transparent;
  position: static !important;
  top: auto !important;
  box-shadow: none;
  border-radius: 0;
}
#dj-tools-drawer summary { display: none; }
#dj-tools-drawer .doctor-patient-nav-panel {
  display: block !important;
  border: 0;
  padding: 0;
}
#dj-tools-drawer .doctor-patient-nav-panel > p { display: none; }
#dj-tools-drawer .menu a {
  border-radius: 0.75rem;
  font-weight: 500;
}
.dj-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.dj-mode label {
  position: relative;
  border: 1px solid var(--dj-line);
  border-radius: 0.85rem;
  padding: 0.85rem 0.75rem;
  cursor: pointer;
  text-align: center;
  font-size: 0.88rem;
  user-select: none;
}
.dj-mode input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
  z-index: 1;
}
.dj-mode label:has(input:checked),
.dj-mode label.is-on {
  border-color: var(--dj-teal, #247B76);
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}
.dj-worklist table { width: 100%; border-collapse: collapse; }
.wl-priority-icon { margin-right: 0.4rem; font-size: 0.85rem; }
.wl-priority-icon-high { color: #8C1717; }
.wl-priority-icon-normal { color: var(--dj-teal, #247B76); }
.wl-priority-icon-waiting { color: #5B6B7A; }
.dj-worklist tr.is-unread { background: hsl(var(--primary) / 0.1); }
.wl-priority {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}
.wl-priority-high { background: #FDE7E7; color: #8C1717; }
.wl-priority-normal { background: hsl(var(--primary) / 0.16); color: #247B76; }
.wl-priority-waiting { background: #EAEDF0; color: #172126; }
.wl-due-overdue { color: #8C1717; font-weight: 700; }
.wl-due-today { color: #A56218; font-weight: 700; }
.wl-patient { color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 0.15rem; }
.wl-actions { white-space: nowrap; }
.wl-actions .dj-btn { min-height: 2.75rem; }
.dj-worklist th, .dj-worklist td {
  text-align: left;
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid var(--dj-line);
  font-size: 0.86rem;
}
.dj-skel {
  height: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(var(--muted)) 0%, #fff 50%, hsl(var(--muted)) 100%);
  background-size: 200% 100%;
  animation: dj-shimmer 1.4s linear infinite;
}
@keyframes dj-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 1023px) {
  .dj-plan-grid, .dj-assess-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dj-assess-grid { grid-template-columns: 1fr; }
  .dj-quote { text-align: left; max-width: none; }
}
@media (max-width: 639px) {
  .dj-name { font-size: 1.55rem; }
  .dj-plan-grid, .dj-assess-tiles { grid-template-columns: 1fr; }
}

/* Patient 360 sidebar — same chrome as the doctor workspace nav */
.homepage-body .doctor-patient-nav,
.doctor-patient-nav {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: hsl(var(--foreground));
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

.doctor-patient-nav__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dj-teal, #247B76);
  list-style: none;
  cursor: pointer;
}

.doctor-patient-nav-panel {
  border: 0;
  padding: 4px 0 0;
}

.homepage-body .doctor-patient-nav .menu,
.doctor-patient-nav .menu {
  gap: 4px;
  padding: 0;
  background: transparent;
}

.homepage-body .doctor-patient-nav .menu li :is(a, button),
.doctor-patient-nav .menu li :is(a, button) {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: hsl(var(--foreground));
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  white-space: normal;
}

.homepage-body .doctor-patient-nav .menu li :is(a, button) i,
.doctor-patient-nav .menu li :is(a, button) i {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  color: var(--dj-muted, #5B6B7A);
  opacity: 1;
}

.homepage-body .doctor-patient-nav .menu li :is(a, button):hover,
.doctor-patient-nav .menu li :is(a, button):hover {
  background: hsl(var(--primary) / 0.06);
  color: hsl(var(--foreground));
}

.homepage-body .doctor-patient-nav .menu li a.active,
.homepage-body .doctor-patient-nav .menu li a.active:hover,
.doctor-patient-nav .menu li a.active,
.doctor-patient-nav .menu li a.active:hover {
  background: hsl(var(--primary) / 0.12);
  color: var(--dj-teal, #247B76);
  font-weight: 650;
}

.homepage-body .doctor-patient-nav .menu li a.active i,
.homepage-body .doctor-patient-nav .menu li a.active:hover i,
.doctor-patient-nav .menu li a.active i {
  color: var(--dj-teal, #247B76);
}

.homepage-body .doctor-patient-nav .menu li :is(a, button):focus-visible,
.doctor-patient-nav .menu li :is(a, button):focus-visible {
  outline: 2px solid var(--dj-teal, #247B76);
  outline-offset: 2px;
}

.homepage-body .doctor-patient-nav .doctor-patient-nav__label,
.homepage-body .doctor-patient-nav .menu li.menu-title.doctor-patient-nav__label,
.doctor-patient-nav__label {
  margin: 16px 0 4px;
  padding: 0 12px;
  background: transparent;
  color: var(--dj-muted, #5B6B7A);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
  opacity: 1;
}

.doctor-patient-nav__label--lead {
  display: none;
  margin-top: 0;
  margin-bottom: 8px;
}

.doctor-patient-nav-footer {
  margin-top: 18px;
  border: 1px solid hsl(var(--surface-border));
  border-radius: 18px;
  padding: 18px 16px 16px;
  background: #fff;
  color: var(--dj-teal, #247B76);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
}

.doctor-patient-nav-footer::after {
  content: "";
  width: 56px;
  height: 2px;
  border-radius: 99px;
  background: hsl(var(--primary));
}

.doctor-patient-nav-footer p {
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 22px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.25;
  color: var(--dj-teal, #247B76);
}

#dj-tools-drawer .doctor-patient-nav-footer { display: none; }

@media (min-width: 1024px) {
  aside:has(> .doctor-patient-nav) {
    width: 248px;
    flex: 0 0 248px;
  }

  .doctor-patient-nav__label--lead { display: block; }
}

@media (max-width: 1023px) {
  .doctor-patient-nav {
    border: 1px solid hsl(var(--surface-border));
    border-radius: 16px;
    background: hsl(var(--card));
  }

  .doctor-patient-nav-panel {
    padding: 4px 10px 12px;
  }
}

.p360-page-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: flex-start;
}
.p360-quote {
  margin: 0;
  max-width: 14rem;
  text-align: right;
  color: var(--dj-teal, #247B76);
  z-index: 1;
}
.p360-quote p {
  margin: 0;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.35;
}
.p360-quote figcaption {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.p360-leaf-deco {
  position: absolute;
  right: 0;
  top: -0.5rem;
  width: 13rem;
  height: 6.5rem;
  color: var(--dj-teal, #247B76);
  pointer-events: none;
  z-index: 0;
}
.p360-side-stack { display: grid; gap: 0.85rem; align-content: start; }
.p360-step-list, .p360-activity-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.p360-step-list a, .p360-step-list > li > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.15rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid hsl(var(--primary) / 0.08);
}
.p360-step-list li:last-child a,
.p360-step-list li:last-child > div { border-bottom: 0; }
.p360-step-ico {
  width: 2rem;
  height: 2rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: hsl(var(--primary) / 0.1);
  color: var(--dj-teal, #247B76);
  flex-shrink: 0;
  font-size: 0.78rem;
}
.p360-step-date { display: block; font-size: 0.72rem; color: hsl(var(--foreground) / 0.5); }
.p360-step-label { display: block; font-size: 0.84rem; font-weight: 600; line-height: 1.3; }
.p360-step-chevron { margin-left: auto; font-size: 0.65rem; color: hsl(var(--foreground) / 0.35); }
.p360-activity-list li {
  display: grid;
  grid-template-columns: 0.65rem 1fr;
  gap: 0.7rem;
  padding: 0.45rem 0;
}
.p360-activity-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--dj-teal, #247B76);
  margin-top: 0.35rem;
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.12);
}
.p360-activity-title { margin: 0; font-size: 0.86rem; font-weight: 650; }
.patient360-empty { margin: 0.35rem 0 0; font-size: 0.82rem; color: hsl(var(--foreground) / 0.55); }

.p360-exec-milestones {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  position: relative;
}
.p360-exec-milestones::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0.7rem;
  height: 2px;
  background: hsl(var(--primary) / 0.18);
}
.p360-exec-milestones li { text-align: center; position: relative; z-index: 1; }
.p360-exec-dot {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0 auto 0.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid hsl(var(--primary) / 0.28);
  color: #fff;
  font-size: 0.55rem;
}
.p360-exec-milestones li.is-done .p360-exec-dot {
  background: var(--dj-teal, #247B76);
  border-color: var(--dj-teal, #247B76);
}
.p360-exec-milestones li.is-open .p360-exec-dot {
  border-color: var(--dj-teal, #247B76);
  background: hsl(var(--primary) / 0.12);
}
.patient360-summary-status .patient360-status-pill {
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  border-radius: 0.85rem;
  text-align: left;
}
.p360-exec-mile-title { margin: 0; font-size: 0.82rem; font-weight: 650; }
.p360-exec-mile-meta, .p360-exec-mile-state {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: hsl(var(--foreground) / 0.55);
}
.p360-exec-mile-state { color: var(--dj-teal, #247B76); font-weight: 600; }
.p360-exec-caption {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 1.1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.9rem;
  background: hsl(var(--primary) / 0.06);
  font-size: 0.82rem;
  font-weight: 600;
  color: hsl(var(--foreground) / 0.78);
}
.p360-exec-caption i { color: var(--dj-teal, #247B76); margin-top: 0.15rem; }
.p360-exec-more summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dj-teal, #247B76);
}
@media (min-width: 1200px) {
  .patient360-overview .patient360-summary-grid,
  .patient360-overview .patient360-summary-grid.is-facts-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2.5rem;
    row-gap: 1.75rem;
    align-items: start;
  }
  .patient360-overview .patient360-summary-grid.is-facts-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .patient360-overview .patient360-summary-grid.is-facts-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .patient360-overview .patient360-summary-identity {
    grid-column: 1 / -1;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--primary) / 0.1);
  }
  .patient360-overview .patient360-summary-strip .patient360-patient-name {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  .patient360-overview .patient360-summary-identity + .patient360-summary-fact {
    padding-left: 0;
  }
  .patient360-overview .patient360-summary-identity + .patient360-summary-fact::before {
    content: none;
  }
}
