/* ClinicOS V4 — Workspace Shell V2（Presentation Phase 2B）
 *
 * 與 Card Grid／Module Tabs 同一套作法：顏色、圓角、字級全部取自既有 design-tokens.css
 * 的 --cos-* token，不新增 token、不建立第二套 Design System。選擇器一律以
 * .nav-ws-shell-v1 起頭，不碰任何既有 class，也不重建任何已拆除的舊 class。 */

#navWorkspaceShellHostV1[hidden] { display: none; }

.nav-ws-shell-v1__breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cos-text-subtle, #667085);
}

.nav-ws-shell-v1__sep { color: var(--cos-text-muted, #8a94a6); }

.nav-ws-shell-v1__crumb.is-current {
  color: var(--cos-text, #1f2430);
  font-weight: 600;
}

.nav-ws-shell-v1__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 12px;
}

.nav-ws-shell-v1__heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-ws-shell-v1__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cos-text, #1f2430);
}

.nav-ws-shell-v1__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--cos-text-subtle, #667085);
  overflow-wrap: anywhere;
}

.nav-ws-shell-v1__return { flex: 0 0 auto; }

.nav-ws-shell-v1__return-btn {
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  color: var(--cos-accent, #0f6cbd);
  background: var(--cos-surface, #fff);
  border: 1px solid var(--cos-border, #e5e7eb);
  border-radius: var(--cos-radius-sm, 8px);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.nav-ws-shell-v1__return-btn:hover {
  border-color: var(--cos-accent, #0f6cbd);
  background: var(--cos-accent-soft, #eef6fe);
}

.nav-ws-shell-v1__return-btn:focus-visible {
  outline: 2px solid var(--cos-accent, #0f6cbd);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .nav-ws-shell-v1__header { flex-direction: column; align-items: stretch; }
  .nav-ws-shell-v1__return-btn { width: 100%; }
}

/* PHASE2B-D：原本掛在 .cos-page-header__actions 上的操作列。Page Header 收歸 Shell 之後
 * 這些按鈕留在內容區，只需要一個中性的排列容器，不再帶任何 Page Header 語意。 */
.cos-page-actions-v2b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* PHASE2C：#pageTitle 保留 DOM 但不再寫入功能名稱，空的時候不佔版面高度。
 * 同列的日期／診所／角色群組／使用者資訊不受影響。 */
#pageTitle:empty { display: none; }
