/* Desktop workbench B. Loaded after app.css and workbench.css. */
.header-navigation { display: flex; align-items: center; gap: 8px; min-width: 0; margin-right: auto; }
.header-navigation a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; color: #59758f; font-size: 14px; font-weight: 550; white-space: nowrap; }
.header-navigation a:hover { background: #edf5fc; color: #286fa4; }
.header-navigation a.active,
.header-navigation a[aria-current="page"] { background: #e4f1fd; border-color: #d5e7f6; color: #236a9f; }

body.desktop-workbench {
  --ink: #192f4b;
  --muted: #637b98;
  --line: #dde8f2;
  --desktop-blue: #247dbb;
  --desktop-panel: #ffffffed;
  color: var(--ink);
  background: #edf5fa;
  background-image: radial-gradient(ellipse at 48% 100%, #d9edf777, transparent 65%);
}

.desktop-workbench .app-header {
  height: 68px;
  min-height: 68px;
  padding: 0 clamp(18px, 1.7vw, 34px);
  gap: 24px;
  border-bottom: 1px solid #dce9f2;
  background: #f8fcffef;
  backdrop-filter: blur(16px);
}
.desktop-workbench .brand { gap: 18px; min-width: 0; }
.desktop-workbench .brand .brand-logo {
  display: block;
  flex: 0 0 140px;
  width: 140px;
  height: 44px;
  max-width: none;
  object-fit: contain;
  object-position: center;
  filter: none;
}
.desktop-workbench .brand-rule { height: 28px; flex: 0 0 1px; background: #d9e5ef; }
.desktop-workbench .brand-rule + .brand-rule { display: none; }
.desktop-workbench .brand-product { color: #375576; font-size: 17px; font-weight: 500; letter-spacing: 0; }
.desktop-workbench .brand-product small { display: none; }
.desktop-workbench .header-navigation { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.desktop-workbench .header-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #3e5877;
  font-size: 16px;
  font-weight: 550;
  white-space: nowrap;
}
.desktop-workbench .header-navigation a.active,
.desktop-workbench .header-navigation a[aria-current="page"] { color: #145b94; background: #d7ebfc; border-color: #c5e1f7; }
.desktop-workbench .header-navigation a:hover { background: #e4f0fa; }
.desktop-workbench .header-actions { gap: 12px; flex-shrink: 0; }
.desktop-workbench .connection-pill { min-height: 36px; padding: 6px 10px; font-size: 12px; background: #e9f6f1; }
.desktop-workbench #clock { color: #617b94; font-size: 14px; font-variant-numeric: tabular-nums; }
.desktop-workbench .header-actions .icon-button { color: #527394; min-width: 40px; width: 40px; height: 40px; }

.desktop-workbench #main { padding: 0; min-width: 0; }
.desktop-workbench .visit-page {
  height: calc(100dvh - 68px);
  min-height: 580px;
  max-width: 2100px;
  margin: 0 auto;
  padding: 0 clamp(14px, 1.1vw, 24px);
  display: flex;
  flex-direction: column;
}
.desktop-workbench .patient-bar { min-height: 54px; gap: 12px; padding: 4px 4px; flex-wrap: wrap; }
.desktop-workbench .patient-bar > .icon-button { width: 32px; min-width: 32px; height: 40px; margin-left: -8px; }
.desktop-workbench .patient-summary { display: flex; align-items: center; gap: 14px; min-width: 0; }
.desktop-workbench .patient-summary h1 { max-width: none; color: #2b4866; font-size: 15px; gap: 10px; }
.desktop-workbench .patient-summary p { margin: 0; color: #6d8198; font-size: 12px; }
.desktop-workbench .patient-bar > .button { margin-left: 0; min-height: 36px; padding: 5px 8px; font-size: 12px; color: #557492; }
.desktop-workbench .mode-badge { padding: 3px 7px; font-size: 10px; border-radius: 5px; }
.desktop-workbench .save-indicator { font-size: 11px; color: #718697; }
.desktop-workbench .patient-priority {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid #f0dba5;
  border-radius: 999px;
  background: #fff2d6;
  color: #785319;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.desktop-workbench .patient-priority .icon { width: 16px; height: 16px; color: #c99024; flex: none; }
.desktop-workbench .voice-status { margin: 0 0 10px; padding: 7px 12px; font-size: 12px; }
.desktop-workbench .workspace {
  display: grid;
  grid-template-columns: minmax(0, 28fr) minmax(0, 33fr) minmax(0, 39fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
  min-width: 0;
  align-items: stretch;
}
.desktop-workbench .workspace > .card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  position: relative;
  border: 1px solid #dce9f3;
  border-radius: 15px;
  background: var(--desktop-panel);
  box-shadow: 0 4px 18px #3c78a406;
}
.desktop-workbench .workspace > .conversation { background: linear-gradient(150deg, #ffffff 0%, #f5fbff 100%); }
.desktop-workbench .panel-heading {
  min-height: 73px;
  padding: 14px 20px;
  margin: 0;
  gap: 10px;
  border-bottom: 1px solid #e6edf5;
  flex-wrap: wrap;
}
.desktop-workbench .panel-heading h2 { font-size: clamp(17px, 1.17vw, 22px); font-weight: 650; color: #172e4b; gap: 8px; }
.desktop-workbench .panel-heading h2 > .icon { display: none; }
.desktop-workbench .count { color: #6888a5; background: #edf5fb; border-radius: 6px; font-size: 11px; }
.desktop-workbench .conversation-tools { gap: 2px; }
.desktop-workbench .conversation-tools .button { min-height: 36px; padding: 5px 6px; color: #66839e; font-size: 11px; }
.desktop-workbench .conversation-tools .icon { width: 16px; height: 16px; }
.desktop-workbench .conversation-feed {
  padding: 16px 16px 20px;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7d9e8 transparent;
}
.desktop-workbench .turn,
.desktop-workbench .turn.patient {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  min-height: 0;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.desktop-workbench .turn.selected,
.desktop-workbench .turn.source-highlight,
.desktop-workbench .turn[data-highlighted="true"] { background: #e3f2fe; border-color: #d3e9fa; }
.desktop-workbench .speaker-avatar,
.desktop-workbench .speaker-avatar.avatar-portrait {
  position: relative;
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid #d8e7f2;
  background: #edf5fc;
  object-fit: cover;
  box-shadow: none;
}
.desktop-workbench .patient .speaker-avatar.avatar-portrait { background: #e7f4f7; border-color: #d4e7ec; }
.desktop-workbench .speaker-avatar.avatar-portrait img {
  position: static;
  display: block;
  width: 44px;
  height: 44px;
  max-width: none;
  left: auto;
  top: auto;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  transform: none;
}
.desktop-workbench .avatar-placeholder { display: grid; place-items: center; font-size: 16px; }
.desktop-workbench .turn-bubble,
.desktop-workbench .patient .turn-bubble {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 54px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.desktop-workbench .turn-top { position: static; display: flex; align-items: center; min-height: 29px; gap: 10px; }
.desktop-workbench .turn-top > span,
.desktop-workbench .patient .turn-top > span { color: #29425f; font-size: 13px; font-weight: 650; letter-spacing: 0; }
.desktop-workbench .turn-top time { color: #6b819b; font-size: 12px; }
.desktop-workbench .turn-edit { min-width: 30px; width: 30px; min-height: 28px; height: 28px; margin: 0 0 0 auto; border-radius: 6px; opacity: .6; }
.desktop-workbench .turn-edit:hover,
.desktop-workbench .turn-edit:focus-visible { opacity: 1; }
.desktop-workbench .turn p {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 3px 0 0;
  padding: 10px 13px;
  border-radius: 5px 12px 12px 12px;
  color: #213750;
  background: #edf4f9;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.desktop-workbench .turn.selected p,
.desktop-workbench .turn.source-highlight p { background: #d4eafb; }
.desktop-workbench .conversation-empty { min-height: 200px; padding: 24px 12px; }
.desktop-workbench .conversation-empty h3 { color: #63829c; font-size: 18px; }
.desktop-workbench .conversation-empty p { color: #8499ae; font-size: 13px; max-width: 290px; }
.desktop-workbench .interim { flex: none; font-size: 15px; margin: 0 16px 12px; border-radius: 8px; }
.desktop-workbench .conversation-composer,
.desktop-workbench .manual-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 16px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid #dce7f1;
  border-radius: 12px;
  background: #fff;
  color: #8097ae;
  flex: none;
}
.desktop-workbench .conversation-composer input,
.desktop-workbench .manual-composer input { width: 100%; border: 0; background: transparent; font-size: 14px; }
.desktop-workbench .new-speech { bottom: 78px; font-size: 12px; z-index: 2; }
.desktop-workbench .advice-peek { display: none; }

.desktop-workbench .facts-content,
.desktop-workbench .assistant-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px 20px;
  scrollbar-gutter: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7d9e8 transparent;
}
.desktop-workbench .fact-section-title { margin: 0 0 15px; color: #233c59; font-size: 15px; font-weight: 650; }
.desktop-workbench .fact-section-title small { margin-left: 8px; color: #7c90a5; font-size: 11px; font-weight: 400; }
.desktop-workbench .fact-section-title:not(:first-child) { border-top: 1px solid #e6edf4; margin-top: 22px; padding-top: 20px; }
.desktop-workbench .facts-tabs { display: flex; gap: 8px; }
.desktop-workbench .facts-tabs button { min-height: 36px; padding: 5px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #68809a; font-size: 12px; }
.desktop-workbench .facts-tabs button.active,
.desktop-workbench .facts-tabs button[aria-pressed="true"],
.desktop-workbench .facts-tabs button[aria-selected="true"] { border-color: #d9e8f4; background: #f7fbff; color: #1f72af; }
.desktop-workbench .clinical-timeline { margin: 3px 0 26px; padding: 0; list-style: none; }
.desktop-workbench .timeline-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 24px; position: relative; width: 100%; min-height: 52px; align-items: start; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: inherit; font: inherit; text-align: left; }
.desktop-workbench button.timeline-item:hover { background: #f2f8fd; }
.desktop-workbench button.timeline-item:active { transform: none; box-shadow: none; }
.desktop-workbench .timeline-item::before { content: ""; position: absolute; top: 13px; bottom: -13px; left: 82px; border-left: 2px solid #cee4fb; }
.desktop-workbench .timeline-item:last-child::before { display: none; }
.desktop-workbench .timeline-item::after { content: ""; position: absolute; left: 78px; top: 8px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #75b4f4; background: #e8f3ff; }
.desktop-workbench .timeline-item:last-child::after { background: #348edf; border-color: #348edf; box-shadow: 0 0 0 4px #e9f4fd; }
.desktop-workbench .timeline-label { text-align: right; padding-top: 0; color: #617b96; font-size: 14px; line-height: 1.8; }
.desktop-workbench .timeline-text { color: #243d5b; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.desktop-workbench .timeline-text small { display: inline-block; margin-left: 12px; color: #7b90a8; font-size: 12px; }
.desktop-workbench .evidence-row {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  padding: 14px 13px;
  min-height: 58px;
  border: 1px solid #dfe9f2;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  color: #243e5b;
  line-height: 1.6;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.desktop-workbench .evidence-row:hover { border-color: #a6cce9; background: #f8fcff; }
.desktop-workbench .evidence-row.selected { border-color: #b3d6f3; background: #eaf5ff; box-shadow: inset 0 0 0 2px #d9edfe; }
.desktop-workbench .fact-label { font-size: 14px; font-weight: 550; }
.desktop-workbench .fact-value { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.desktop-workbench .fact-value .status-dot { display: inline-block; background: #dfa329; margin-right: 6px; }
.desktop-workbench .fact-source { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; color: #6d89a3; font-size: 11px; white-space: nowrap; }
.desktop-workbench .fact-source .icon { width: 14px; height: 14px; color: #388cd0; }
.desktop-workbench .vitals-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 2px 0 4px; }
.desktop-workbench .vital { min-width: 0; padding: 3px 16px; border: 0; border-right: 1px solid #e0eaf2; border-radius: 0; background: transparent; color: inherit; font: inherit; text-align: left; box-shadow: none; }
.desktop-workbench button.vital:hover { background: #f3f9fe; }
.desktop-workbench .vital:first-child { padding-left: 10px; }
.desktop-workbench .vital:last-child { border: 0; }
.desktop-workbench .vital > span,
.desktop-workbench .vital > small { display: block; color: #7288a1; font-size: 12px; }
.desktop-workbench .vital strong { display: block; margin: 7px 0; color: #294260; font-size: 16px; font-weight: 550; }
.desktop-workbench .facts-note { margin-top: 18px; color: #8093a6; font-size: 11px; line-height: 1.7; }

.desktop-workbench .assistant-title { gap: 8px; min-width: 0; }
.desktop-workbench .assistant-title > .icon { display: none; }
.desktop-workbench .assistant-title > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.desktop-workbench .assistant-title small { font-size: 11px; color: #7790a9; max-width: none; }
.desktop-workbench .assistant-tools { gap: 0; }
.desktop-workbench .assistant-tools .button { min-height: 36px; padding: 5px 7px; font-size: 11px; }
.desktop-workbench .assistant-tools .icon-button { min-width: 34px; width: 34px; height: 36px; }
.desktop-workbench .assistant-tabs { display: flex; justify-content: flex-start; gap: 6px; padding: 8px 18px; margin: 0; border-bottom: 1px solid #e8eef5; }
.desktop-workbench .assistant-tabs::after { display: none; }
.desktop-workbench .assistant-tabs button { flex: 1; min-height: 36px; padding: 6px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 13px; color: #68819b; }
.desktop-workbench .assistant-tabs button[aria-selected="true"] { border-color: #d6e7f5; background: #edf6fd; color: #216eac; font-weight: 600; }
.desktop-workbench .assistant-content { padding: 16px; }
/* The legacy toast renderer remains mounted; clinical advice lives in the panel. */
.desktop-workbench .assistant-panel > #advice-slot,
.desktop-workbench .assistant-panel > #advice-stage,
.desktop-workbench .recording-dock > #advice-slot { display: none; }
.desktop-workbench .guidance-card { margin: 0 0 16px; padding: 18px; border: 1px solid #dce7f1; border-radius: 11px; background: #fff; }
.desktop-workbench .guidance-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.desktop-workbench .guidance-card h3 { margin: 12px 0 17px; color: #203856; font-size: clamp(18px, 1.3vw, 23px); line-height: 1.45; font-weight: 650; }
.desktop-workbench .guidance-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; color: #7b561c; background: #fff1d0; font-size: 12px; font-weight: 600; }
.desktop-workbench .guidance-tag .icon { width: 15px; height: 15px; }
.desktop-workbench .guidance-source { margin: 14px 0 18px; padding: 15px 16px; border: 0; border-radius: 8px; background: #f0f7fc; color: #355671; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.desktop-workbench .guidance-source small { display: block; margin-top: 8px; color: #6385a6; font-size: 11px; }
.desktop-workbench .guidance-source button { border: 0; padding: 0; color: #3a81b7; background: transparent; font-size: 12px; }
.desktop-workbench button.guidance-source { display: block; position: relative; width: 100%; text-align: left; padding-right: 36px; font: inherit; font-size: 15px; line-height: 1.8; }
.desktop-workbench button.guidance-source:hover { background: #e8f3fc; }
.desktop-workbench button.guidance-source small { margin: 0 0 7px; padding-right: 8px; }
.desktop-workbench button.guidance-source > span { display: block; color: #355671; }
.desktop-workbench button.guidance-source > .icon { position: absolute; top: 17px; right: 13px; width: 16px; height: 16px; color: #4d8fbf; }
.desktop-workbench .guidance-source button { display: block; width: 100%; text-align: left; }
.desktop-workbench .guidance-summary { margin: 14px 0 22px; color: #415d77; font-size: 14px; line-height: 1.85; }
.desktop-workbench .guidance-fields { display: grid; gap: 12px; margin: 22px 0; }
.desktop-workbench .guidance-fields > span { color: #304b66; font-size: 13px; font-weight: 600; }
.desktop-workbench .guidance-fields > p { margin: -5px 0 0; color: #698298; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.desktop-workbench .guidance-fields label { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; gap: 14px; color: #29415f; font-size: 14px; }
.desktop-workbench .guidance-fields input,
.desktop-workbench .guidance-fields textarea,
.desktop-workbench .guidance-fields button,
.desktop-workbench .guidance-fields .field-value { width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid #d4e1ed; border-radius: 7px; background: #fcfdff; color: #294461; font-size: 14px; }
.desktop-workbench .guidance-fields button { text-align: left; }
.desktop-workbench .guidance-fields button:hover { border-color: #9bc4e2; background: #f2f9ff; }
.desktop-workbench .guidance-fields input::placeholder,
.desktop-workbench .guidance-fields textarea::placeholder { color: #869bb0; }
.desktop-workbench .guidance-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.desktop-workbench .guidance-actions .button { min-height: 44px; padding: 10px 17px; font-size: 14px; border-radius: 8px; }
.desktop-workbench .guidance-actions .primary { border: 1px solid #267daf; background: #2c82b9; box-shadow: 0 3px 8px #307baa0e; }
.desktop-workbench .guidance-actions .secondary { border-color: #d7e6f2; background: #f8fcff; color: #2676b1; }
.desktop-workbench .guidance-card details { margin-top: 16px; }
.desktop-workbench .guidance-card summary { min-height: 44px; cursor: pointer; color: #486680; font-size: 13px; padding: 11px 0; }
.desktop-workbench .guidance-pending { margin: 10px 0; border: 1px solid #e1eaf2; border-radius: 8px; overflow: hidden; background: #f2f7fb; }
.desktop-workbench .guidance-pending > summary { display: list-item; min-height: 48px; margin: 0; padding: 13px 16px; color: #385570; font-size: 14px; line-height: 1.65; cursor: pointer; overflow-wrap: anywhere; }
.desktop-workbench .guidance-pending > summary::marker { color: #819bb3; font-size: 11px; }
.desktop-workbench .guidance-pending > summary:hover { background: #eaf3fa; }
.desktop-workbench .guidance-pending[open] { background: #fff; }
.desktop-workbench .guidance-pending[open] > summary { border-bottom: 1px solid #e6eef4; }
.desktop-workbench .guidance-pending > .advice-item { margin: 0; border: 0; border-radius: 0; padding: 14px 16px; background: #fff; box-shadow: none; }
.desktop-workbench .guidance-pending summary:focus-visible { outline: 3px solid #76b4df; outline-offset: -3px; }
.desktop-workbench .clinical-focus { border-left: 2px solid #4895c7; border-radius: 8px; background: #eff7fc; padding: 13px 15px; font-size: 14px; line-height: 1.7; }
.desktop-workbench .clinical-section-title { margin: 22px 0 12px; font-size: 15px; }
.desktop-workbench .clinical-card { border-color: #dfe8f1; border-radius: 10px; box-shadow: none; padding: 16px; }
.desktop-workbench .clinical-card header strong { color: #29435e; font-size: 16px; }
.desktop-workbench .clinical-card p,
.desktop-workbench .clinical-risk p { font-size: 14px; line-height: 1.8; }
.desktop-workbench .clinical-label { font-size: 11px; padding: 3px 7px; }
.desktop-workbench .clinical-missing { font-size: 13px; line-height: 1.8; }
.desktop-workbench .clinical-peek { margin-top: 16px; padding: 12px 14px; border: 0; background: #f0f5f9; border-radius: 7px; font-size: 14px; }
.desktop-workbench .assistant-disclaimer { min-height: 32px; padding: 7px 14px; border-top: 1px solid #edf2f6; color: #8596a8; font-size: 10px; flex: none; }
.desktop-workbench .draft-fields textarea { border-color: #dbe7f1; font-size: 14px; border-radius: 7px; line-height: 1.8; }

.desktop-workbench .recording-dock {
  display: grid;
  grid-template-columns: minmax(0, 28fr) minmax(0, 33fr) minmax(0, 39fr);
  align-items: center;
  gap: 14px;
  min-height: 94px;
  flex: none;
  margin: 0;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: transparent;
  border: 0;
  box-shadow: none;
}
.desktop-workbench .recording-console {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  min-height: 64px;
  padding: 8px 12px 8px 17px;
  border: 1px solid #538499;
  border-radius: 22px;
  background: linear-gradient(120deg, #284b5e, #254a5d);
  box-shadow: 0 7px 18px #224b6923, inset 0 1px 0 #ffffff22;
  color: #eef9ff;
}
.desktop-workbench .recording-state { display: flex; align-items: center; gap: 10px; min-width: 0; width: auto; flex: 0 1 auto; }
.desktop-workbench .recording-state .wave,
.desktop-workbench .recording-state .wave.live { width: 56px; height: 38px; flex: 0 0 56px; grid-column: auto; background: transparent; }
.desktop-workbench .recording-state strong { font-size: 13px; font-weight: 500; color: #f0f8fc; white-space: nowrap; }
.desktop-workbench .recording-state small { display: none; }
.desktop-workbench .recording-state time { display: block; margin: 0; padding: 0; color: #bed3df; font-size: 12px; letter-spacing: .3px; white-space: nowrap; }
.desktop-workbench .recording-actions { display: flex; flex-wrap: wrap; width: auto; gap: 7px; max-width: 100%; justify-content: center; flex: none; }
.desktop-workbench .recording-actions > .button { min-width: 0; min-height: 42px; padding: 8px 12px; border-radius: 15px; font-size: 12px; font-weight: 500; white-space: nowrap; box-shadow: none; }
.desktop-workbench .recording-actions > .primary,
.desktop-workbench .recording-dock[data-phase="recording"] .record-button { border: 1px solid #749bac66; background: #ffffff13; color: #fff; }
.desktop-workbench .recording-actions > .secondary { border-color: #91acba55; background: transparent; color: #d7e8f2; }
.desktop-workbench .recording-actions > .button .icon { width: 18px; height: 18px; }
.desktop-workbench .manual-roles { padding: 2px; background: #173c4c; border: 1px solid #6c90a15e; border-radius: 10px; }
.desktop-workbench .manual-roles button { min-width: 40px; min-height: 34px; padding: 5px 7px; font-size: 11px; color: #cce1ec; }
.desktop-workbench .manual-roles button[aria-pressed="true"] { background: #e6f5fc; color: #285b77; }
.desktop-workbench .recording-console:has(.manual-roles),
.desktop-workbench .recording-console:has(.recording-actions > .button:nth-child(2)) { flex-wrap: wrap; gap: 4px 10px; }
.desktop-workbench .report-dock {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
  width: min(100%, 480px);
  min-width: 0;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid #e0eaf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 15px #3769940e;
}
.desktop-workbench .report-dock-copy { min-width: 0; flex: 1; color: #233e5d; font-size: 13px; }
.desktop-workbench .report-dock-copy strong { font-size: 14px; font-weight: 600; }
.desktop-workbench .report-dock-copy small { display: block; margin-top: 2px; color: #7c91a6; font-size: 10px; line-height: 1.6; }
.desktop-workbench .report-progress { display: flex; align-items: center; position: relative; gap: 5px; min-height: 4px; margin-top: 7px; }
.desktop-workbench .report-progress span { display: block; position: relative; flex: 1; min-width: 0; padding-top: 5px; color: #8b9eaf; font-size: 9px; line-height: 1.5; }
.desktop-workbench .report-progress span::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px; background: #dce6ee; }
.desktop-workbench .report-progress i { display: block; flex: 1; height: 4px; border-radius: 3px; background: #dce6ee; }
.desktop-workbench .report-progress .done,
.desktop-workbench .report-progress .complete,
.desktop-workbench .report-progress .active,
.desktop-workbench .report-progress [data-complete="true"] { color: #3985b7; }
.desktop-workbench .report-progress .done::before,
.desktop-workbench .report-progress .complete::before,
.desktop-workbench .report-progress .active::before,
.desktop-workbench .report-progress [data-complete="true"]::before { background: #4597c7; }
.desktop-workbench .report-progress[data-busy="true"]:empty::after { content: ""; display: block; height: 4px; width: 28%; background: #4995c9; border-radius: 3px; animation: desktop-report-working 1.8s ease-in-out infinite; }
.desktop-workbench .report-dock-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.desktop-workbench .report-dock-actions .button { min-height: 40px; padding: 8px 12px; border-radius: 8px; font-size: 12px; }
.desktop-workbench .report-dock-actions .primary { background: #2c82b9; box-shadow: none; }
.desktop-workbench .dock-note { grid-column: 1; grid-row: 1; color: #849bb0; font-size: 11px; padding-left: 8px; }
.desktop-workbench .phone-workspace-tabs { display: none; }

.desktop-workbench #dialog.report-dialog { width: min(1080px, 92vw); max-height: calc(100dvh - 48px); border: 1px solid #d4e1eb; border-radius: 16px; padding: 0; background: #f0f4f8; box-shadow: 0 25px 100px #142e5040; }
.desktop-workbench #dialog.report-dialog::backdrop { background: #172b4266; backdrop-filter: blur(3px); }
.desktop-workbench .report-dialog .dialog-header { position: sticky; top: 0; z-index: 1; padding: 18px 24px; background: #fff; border-bottom: 1px solid #dae5ee; }
.desktop-workbench .report-dialog .dialog-header h2 { font-size: 20px; }
.desktop-workbench .report-dialog .dialog-body { padding: 26px; }
.desktop-workbench .report-paper { width: min(100%, 794px); min-height: 850px; margin: 0 auto; padding: 48px 56px; border: 1px solid #dde5ec; background: #fff; box-shadow: 0 4px 17px #294b6510; color: #27384a; }
.desktop-workbench .report-paper > header { margin: 0 0 28px; text-align: center; }
.desktop-workbench .report-paper > header > h1 { margin: 9px 0 16px; color: #23384d; font-size: 26px; font-weight: 650; letter-spacing: 2px; }
.desktop-workbench .report-paper > header > p:first-child { color: #8493a0; font-size: 11px; letter-spacing: 2px; }
.desktop-workbench .report-paper > header > p:last-child { max-width: 540px; margin: 13px auto 0; color: #7b8b98; font-size: 11px; line-height: 1.8; }
.desktop-workbench .report-meta { display: block; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid #bbcbd8; font-size: 13px; line-height: 1.8; }
.desktop-workbench .report-meta > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 28px; margin: 0; }
.desktop-workbench .report-meta > dl > div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; min-width: 0; }
.desktop-workbench .report-meta > dl > div:last-child { grid-column: 1 / -1; }
.desktop-workbench .report-meta dt { color: #6c7f90; font-weight: 400; }
.desktop-workbench .report-meta dd { min-width: 0; margin: 0; color: #31475b; overflow-wrap: anywhere; }
.desktop-workbench .report-section { margin: 0 0 26px; padding-top: 22px; border-top: 1px solid #dbe4ec; font-size: 14px; line-height: 1.95; }
.desktop-workbench .report-section.report-record { padding-top: 0; border-top: 0; }
.desktop-workbench .report-section > h2 { margin: 0 0 15px; color: #253d54; font-size: 17px; font-weight: 650; letter-spacing: .5px; }
.desktop-workbench .report-section > h2 > small { display: inline-block; margin-left: 8px; color: #8191a0; font-size: 11px; font-weight: 400; letter-spacing: 0; }
.desktop-workbench .report-section h3 { font-size: 15px; margin: 22px 0 7px; color: #2c4055; }
.desktop-workbench .report-section h4 { font-size: 14px; margin: 14px 0 5px; color: #41586d; font-weight: 600; }
.desktop-workbench .report-section p { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.desktop-workbench .report-section > dl { margin: 0; }
.desktop-workbench .report-section > dl > div { display: grid; grid-template-columns: 102px minmax(0, 1fr); gap: 17px; padding: 13px 0; border-bottom: 1px solid #e6edf2; }
.desktop-workbench .report-section > dl > div:last-child { border-bottom: 0; }
.desktop-workbench .report-section dt { color: #4c6275; font-weight: 600; }
.desktop-workbench .report-section dt small { display: block; color: #8b9aa8; font-size: 10px; font-weight: 400; }
.desktop-workbench .report-section dd { min-width: 0; margin: 0; color: #293e51; white-space: pre-wrap; overflow-wrap: anywhere; }
.desktop-workbench .report-section ul { margin: 8px 0; padding-left: 20px; color: #52677a; }
.desktop-workbench .report-section li { padding-left: 2px; margin: 3px 0; overflow-wrap: anywhere; }
.desktop-workbench .report-ai > article { padding: 3px 0 17px; margin: 14px 0; border-bottom: 1px solid #e5ecf2; }
.desktop-workbench .report-evidence { margin: 12px 0; font-size: 12px; line-height: 1.8; white-space: normal; }
.desktop-workbench .report-evidence blockquote { margin: 9px 0; padding: 9px 13px; border-left: 2px solid #c3d9e9; border-radius: 0 5px 5px 0; background: #f6f9fc; color: #61798d; }
.desktop-workbench .report-evidence small { display: block; color: #8294a4; font-size: 10px; }
.desktop-workbench .report-evidence p { margin: 5px 0 0; }
.desktop-workbench .report-sources { margin-top: 24px; padding-top: 3px; border-top: 1px solid #dce6ee; color: #697f91; font-size: 12px; }
.desktop-workbench .report-paper a { color: #347eae; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.desktop-workbench .report-section textarea { width: 100%; min-height: 85px; padding: 10px 12px; border: 1px solid #d5e1ea; border-radius: 6px; background: #fbfdff; font-size: 14px; line-height: 1.8; }
.desktop-workbench .report-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; color: #846020; background: #fff2d8; font-size: 12px; }
.desktop-workbench .report-section .report-status { display: block; margin: 12px 0; padding: 9px 12px; color: #52718b; background: #edf4f9; font-size: 12px; line-height: 1.8; }
.desktop-workbench .report-section .report-status.is-stale { color: #846020; background: #fff2d8; }
.desktop-workbench .report-dialog .dialog-footer { position: sticky; bottom: 0; z-index: 1; padding: 15px 24px; background: #fff; border-top: 1px solid #dbe5ee; flex-wrap: wrap; }
.desktop-workbench .report-dialog .dialog-footer .button { min-height: 42px; border-radius: 7px; font-size: 14px; }

@keyframes desktop-report-working { 0%, 100% { transform: translateX(0); opacity: .6; } 50% { transform: translateX(200%); opacity: 1; } }

@media (min-width: 1100px) {
  .desktop-workbench .workspace[data-phone-tab] > .card { display: flex; }
}
@media (min-width: 1100px) and (max-width: 1399px) {
  .desktop-workbench .app-header { gap: 18px; }
  .desktop-workbench .brand { gap: 12px; }
  .desktop-workbench .brand-product { font-size: 15px; }
  .desktop-workbench .header-navigation a { padding: 0 15px; font-size: 14px; }
  .desktop-workbench .workspace { gap: 12px; }
  .desktop-workbench .panel-heading { padding: 12px 15px; gap: 6px; min-height: 72px; }
  .desktop-workbench .facts-content { padding: 16px 15px; }
  .desktop-workbench .conversation-feed { padding: 13px 9px 18px; }
  .desktop-workbench .turn, .desktop-workbench .turn.patient { gap: 8px; padding: 4px; }
  .desktop-workbench .turn-bubble { max-width: calc(100% - 52px); }
  .desktop-workbench .turn p { font-size: 15px; padding: 9px 11px; }
  .desktop-workbench .evidence-row { grid-template-columns: 48px minmax(0, 1fr); gap: 4px 9px; padding: 11px 12px; }
  .desktop-workbench .fact-source { grid-column: 2; justify-content: flex-start; }
  .desktop-workbench .timeline-text small { display: block; margin-left: 0; }
  .desktop-workbench .timeline-item { min-height: 63px; }
  .desktop-workbench .guidance-card { padding: 16px; }
  .desktop-workbench .guidance-fields label { grid-template-columns: 70px minmax(0, 1fr); gap: 10px; font-size: 13px; }
  .desktop-workbench .recording-state .wave { width: 42px; flex-basis: 42px; }
  .desktop-workbench .recording-console { gap: 8px; padding: 8px 10px; }
  .desktop-workbench .recording-state { gap: 7px; }
  .desktop-workbench .recording-actions > .button { padding: 8px 9px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .desktop-workbench .app-header { gap: 12px; padding: 0 18px; }
  .desktop-workbench .brand-product, .desktop-workbench .brand-rule { display: none; }
  .desktop-workbench .header-navigation a { padding: 0 15px; font-size: 14px; }
  .desktop-workbench .patient-summary { gap: 10px; }
  .desktop-workbench .visit-page { height: auto; min-height: calc(100dvh - 68px); }
  .desktop-workbench .workspace { grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); flex: none; }
  .desktop-workbench .workspace[data-phone-tab] > .card { display: flex; min-height: 560px; }
  .desktop-workbench .workspace > .assistant-panel { grid-column: 1 / -1; min-height: 420px; }
  .desktop-workbench .conversation-feed, .desktop-workbench .facts-content { max-height: 640px; }
  .desktop-workbench .assistant-content { max-height: none; }
  .desktop-workbench .guidance-card { max-width: none; }
  .desktop-workbench .recording-dock { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-height: 92px; }
  .desktop-workbench .recording-console { grid-column: 1; }
  .desktop-workbench .report-dock { grid-column: 2; }
  .desktop-workbench .dock-note { display: none; }
}
@media (max-width: 899px) {
  body:not(.desktop-workbench) .app-header { height: auto; min-height: 72px; flex-wrap: wrap; row-gap: 4px; padding-top: 10px; padding-bottom: 8px; }
  body:not(.desktop-workbench) .header-navigation { order: 3; flex-basis: 100%; margin: 0; justify-content: center; }
  body:not(.desktop-workbench) .header-navigation a { min-height: 40px; padding: 0 24px; font-size: 13px; }
  .desktop-workbench .app-header { height: 62px; min-height: 62px; padding: 0 16px; gap: 12px; }
  .desktop-workbench .brand-product, .desktop-workbench .brand-rule { display: none; }
  .desktop-workbench .header-navigation { gap: 4px; }
  .desktop-workbench .header-navigation a { min-height: 40px; padding: 0 11px; font-size: 13px; }
  .desktop-workbench .header-actions { gap: 4px; }
  .desktop-workbench #clock { display: none; }
  .desktop-workbench .visit-page { height: auto; min-height: calc(100dvh - 62px); padding: 0 12px; }
  .desktop-workbench .patient-bar { min-height: 64px; padding: 8px 0; gap: 5px 9px; }
  .desktop-workbench .patient-summary { display: block; flex: 1; }
  .desktop-workbench .patient-summary h1 { font-size: 14px; white-space: normal; }
  .desktop-workbench .patient-summary p { margin-top: 3px; font-size: 11px; }
  .desktop-workbench .patient-priority { font-size: 11px; min-height: 28px; padding: 3px 9px; }
  .desktop-workbench .save-indicator { display: none; }
  .desktop-workbench .workspace { display: flex; flex-direction: column; gap: 12px; flex: none; min-height: 460px; }
  .desktop-workbench .workspace > .card { min-height: 460px; height: auto; }
  .desktop-workbench .workspace[data-phone-tab="chat"] > .conversation,
  .desktop-workbench .workspace[data-phone-tab="facts"] > .facts-panel,
  .desktop-workbench .workspace[data-phone-tab="assistant"] > .assistant-panel { display: flex; }
  .desktop-workbench .workspace[data-phone-tab="chat"] > .facts-panel,
  .desktop-workbench .workspace[data-phone-tab="chat"] > .assistant-panel,
  .desktop-workbench .workspace[data-phone-tab="facts"] > .conversation,
  .desktop-workbench .workspace[data-phone-tab="facts"] > .assistant-panel,
  .desktop-workbench .workspace[data-phone-tab="assistant"] > .conversation,
  .desktop-workbench .workspace[data-phone-tab="assistant"] > .facts-panel { display: none; }
  .desktop-workbench .panel-heading { min-height: 68px; padding: 12px 17px; }
  .desktop-workbench .panel-heading h2 { font-size: 19px; }
  .desktop-workbench .conversation-feed { min-height: 360px; max-height: 65dvh; padding: 16px; }
  .desktop-workbench .facts-content, .desktop-workbench .assistant-content { max-height: none; overflow: visible; }
  .desktop-workbench .turn-edit { min-width: 44px; width: 44px; min-height: 32px; }
  .desktop-workbench .phone-workspace-tabs { display: flex; gap: 6px; padding: 8px 0; margin: 0; border: 0; background: transparent; }
  .desktop-workbench .phone-workspace-tabs button { flex: 1; min-height: 44px; padding: 8px 10px; border: 1px solid #dce8f1; border-radius: 8px; color: #61819d; background: #ffffffa6; font-size: 13px; }
  .desktop-workbench .phone-workspace-tabs button[aria-pressed="true"] { border-color: #acd1ee; background: #dceefd; color: #1b67a0; }
  .desktop-workbench .recording-dock { grid-template-columns: minmax(0, 1fr); gap: 10px; min-height: 0; padding-top: 2px; }
  .desktop-workbench .recording-console { grid-column: 1; width: auto; max-width: 100%; }
  .desktop-workbench .report-dock { grid-column: 1; width: 100%; justify-self: stretch; border-radius: 11px; min-height: 60px; }
  .desktop-workbench .dock-note { display: none; }
  .desktop-workbench .recording-actions:has(.manual-roles) { flex-wrap: wrap; width: auto; }
  .desktop-workbench .recording-state .wave { width: 56px; height: 36px; flex-basis: 56px; }
  .desktop-workbench .report-paper { min-height: 0; padding: 30px; }
  .desktop-workbench .report-dialog .dialog-body { padding: 14px; }
}
@media (max-width: 599px) {
  .desktop-workbench .app-header { gap: 8px; padding: 0 12px; }
  .desktop-workbench .brand .brand-logo { flex-basis: 112px; width: 112px; height: 36px; }
  .desktop-workbench .header-navigation { margin-left: auto; margin-right: 0; }
  .desktop-workbench .header-navigation a { padding: 0 8px; font-size: 12px; }
  .desktop-workbench .header-actions .connection-pill { padding: 0; min-width: 20px; background: transparent; }
  .desktop-workbench .header-actions .connection-pill span:last-child { display: none; }
  .desktop-workbench .header-actions .icon-button { min-width: 30px; width: 30px; }
  .desktop-workbench .patient-bar > .icon-button { display: none; }
  .desktop-workbench .patient-summary h1 { display: flex; flex-wrap: wrap; gap: 5px; }
  .desktop-workbench .patient-summary p span { display: none; }
  .desktop-workbench .patient-bar > .button { min-height: 36px; padding: 5px; }
  .desktop-workbench .patient-priority { margin-left: auto; }
  .desktop-workbench .panel-heading { padding: 12px 14px; }
  .desktop-workbench .panel-heading h2 { font-size: 18px; }
  .desktop-workbench .conversation-tools .button { min-height: 40px; }
  .desktop-workbench .conversation-feed { padding: 14px 9px; }
  .desktop-workbench .turn p { font-size: 15px; }
  .desktop-workbench .facts-content, .desktop-workbench .assistant-content { padding: 15px 13px; }
  .desktop-workbench .evidence-row { grid-template-columns: 52px minmax(0, 1fr); gap: 4px 8px; }
  .desktop-workbench .fact-source { grid-column: 2; justify-content: flex-start; }
  .desktop-workbench .guidance-card { padding: 15px; }
  .desktop-workbench .guidance-fields label { grid-template-columns: 66px minmax(0, 1fr); gap: 8px; font-size: 13px; }
  .desktop-workbench .guidance-source { padding: 12px; font-size: 14px; }
  .desktop-workbench .recording-console { gap: 8px; padding: 8px 10px; min-height: 62px; border-radius: 18px; flex-wrap: wrap; }
  .desktop-workbench .recording-state { gap: 8px; }
  .desktop-workbench .recording-state .wave { width: 42px; flex-basis: 42px; }
  .desktop-workbench .recording-state strong { font-size: 12px; }
  .desktop-workbench .recording-state time { font-size: 11px; }
  .desktop-workbench .recording-actions > .button { min-height: 42px; padding: 8px 10px; font-size: 12px; }
  .desktop-workbench .report-dock { gap: 8px; padding: 10px 12px; }
  .desktop-workbench .report-dock-actions .button { padding: 8px 9px; }
  .desktop-workbench #dialog.report-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 12px; }
  .desktop-workbench .report-dialog .dialog-header { padding: 14px 16px; }
  .desktop-workbench .report-dialog .dialog-header h2 { font-size: 17px; }
  .desktop-workbench .report-dialog .dialog-body { padding: 9px; }
  .desktop-workbench .report-paper { padding: 24px 18px; }
  .desktop-workbench .report-paper > header > h1 { font-size: 22px; letter-spacing: 1px; }
  .desktop-workbench .report-meta > dl { grid-template-columns: 1fr; gap: 8px; }
  .desktop-workbench .report-section > dl > div { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
  .desktop-workbench .report-section > h2 { font-size: 16px; }
  .desktop-workbench .report-section > h2 > small { display: block; margin: 5px 0 0; }
  .desktop-workbench .report-dialog .dialog-footer { padding: 12px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-workbench .turn, .desktop-workbench .evidence-row { transition: none; }
  .desktop-workbench .report-progress[data-busy="true"]::after { animation: none; }
}

@keyframes desktop-step-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.desktop-workbench .report-progress span.active::before { animation: desktop-step-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .desktop-workbench .report-progress span.active::before { animation: none; } }
