.dia-shell {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  min-height: calc(100dvh - 28px);
}

body[data-workspace] { display: block; }
.dia-shell, .dia-shell button, .dia-shell input, .dia-shell select { font-family: "DM Sans", sans-serif; }
body[data-workspace] > .pilot-strip {
  min-height: 28px;
  padding: 7px 14px;
  background: #0b3456;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-align: center;
}
.dia-shell > main { min-width: 0; width: auto; margin-left: 0; }
.dia-sidebar {
  position: sticky;
  top: 0;
  height: calc(100dvh - 28px);
  padding: 25px 15px 16px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: #082b4a;
  overflow-y: auto;
  z-index: 20;
}

.dia-brand, .dia-account {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  color: inherit;
  text-decoration: none;
}
.dia-brand > span, .dia-account > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #f28c28;
  color: #162334;
  font: 800 17px Manrope, sans-serif;
}
.dia-brand strong { display: block; font: 800 20px Manrope, sans-serif; }
.dia-brand small, .dia-account small { display: block; margin-top: 3px; color: #bfd1df; font-size: 11px; }
.dia-sidebar .dia-nav { display: grid; gap: 4px; margin: 30px 0; overflow: visible; }
.dia-sidebar .dia-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 9px;
  border-radius: 9px;
  color: #d6e5ef;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
}
.dia-sidebar .dia-nav-item:hover { color: #fff; background: #123f63; }
.dia-sidebar .dia-nav-item.active { color: #fff; background: #155785; box-shadow: inset 3px 0 #f28c28; }
.dia-sidebar .dia-nav-item.active::after { display: none; }
.dia-sidebar .dia-nav-item > span { display: inline; width: auto; font-size: inherit; }
.dia-sidebar .dia-nav-item .dia-nav-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border: 1px solid #7898b1;
  border-radius: 6px;
  font-size: 9px;
}
.dia-nav-item > :is(small,b) { margin-left: auto; font-size: 10px; font-weight: 700; }
.dia-account { margin-top: auto; padding: 14px 7px 0; border-top: 1px solid #54728a; }
.dia-account > span { width: 32px; height: 32px; border-radius: 50%; background: #eff7fc; font-size: 11px; }
.dia-account strong { display: block; font-size: 12px; }
.dia-account[href]:hover strong { text-decoration: underline; }
.dia-mobile, .dia-nav-close, .dia-nav-backdrop { display: none; }

.workspace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.workspace-actions :is(a, button), .workspace-help button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #b6cddf;
  border-radius: 8px;
  background: #fff;
  color: #0a568d;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.workspace-help { margin-top: 14px; color: #214a69; }
.workspace-help summary, .review-navigation summary { padding: 8px 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.workspace-help > div { display: flex; flex-wrap: wrap; gap: 6px; }
.review-navigation { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-top: 14px; }
.review-navigation nav, .review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.review-navigation nav a { display: inline-flex; padding: 8px; border-radius: 6px; color: #24516f; text-decoration: none; }
.review-navigation nav a.active { background: #e0eff9; color: #084f83; font-weight: 700; }
.review-navigation nav a.active::after { display: none; }
.review-actions { margin-left: auto; font-size: 11px; }
.dia-shell .topbar > div > p:last-child,
.dia-shell .workspace-head p,
.dia-shell .page-heading p:not(.eyebrow),
.dia-shell .metric-grid span,
.dia-shell .overview-label { font-size: 12px; line-height: 1.4; }
.dia-shell .metric-grid small, .dia-shell .overview-card > small { font-size: 11px; }
.dia-shell :is(.local-cell, .patient-row) strong,
.dia-shell .local-cell b { font-size: 12px; }
.dia-shell :is(.local-cell, .patient-row) small { font-size: 11px; }

@media (max-width: 1050px) { .dia-shell { grid-template-columns: 200px minmax(0, 1fr); } }
@media (max-width: 760px) {
  .dia-shell { display: block; }
  .dia-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(290px, 86vw);
    height: 100dvh;
    visibility: hidden;
  }
  .drawer-open .dia-sidebar { visibility: visible; }
  .dia-nav-close, .dia-mobile > button {
    display: grid;
    place-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #8da9be;
    border-radius: 8px;
    color: #fff;
    background: #103b5d;
  }
  .dia-nav-close { position: absolute; top: 18px; right: 14px; font-size: 24px; }
  .drawer-open .dia-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    background: #061d30a6;
    z-index: 19;
  }
  .dia-mobile {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: #082b4a;
    color: #fff;
  }
  .main > .dia-mobile { margin-inline: -14px; }
  .dia-mobile > button { gap: 4px; }
  .dia-mobile > button > span { width: 18px; height: 2px; background: #fff; }
  .review-actions { margin-left: 0; }
  .dia-shell .workspace-head { flex-wrap: wrap; gap: 8px; }
}
