.wf-state {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  color: #7f8ca1;
  background: #f1f4f8;
  border: 1px solid #e5eaf2;
}
.wf-state-in_progress {
  color: #3e73c4;
  background: #edf4ff;
  border-color: #dce8fa;
}
.wf-state-waiting_results {
  color: #a9762b;
  background: #fff8eb;
  border-color: #f3e6c7;
}
.wf-state-ready {
  color: #5d69ba;
  background: #f1f1ff;
  border-color: #e1e1fa;
}
.wf-state-completed {
  color: #398675;
  background: #edf8f3;
  border-color: #d2ecdf;
}
.wf-state-cancelled {
  color: #9a7a82;
  background: #faf2f4;
  border-color: #ecdfe4;
}
.wf-sidebar-filter {
  margin: 0 0 12px;
  min-height: 34px;
  font-size: 0.75rem;
  flex-shrink: 0;
  background: #fbfcff;
}
.wf-patient-details {
  flex: 1;
  min-width: 0;
}
.wf-patient-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 8px;
  color: #9ca6b7;
  font-size: 0.6875rem;
}
.wf-patient-state .wf-state {
  font-size: 0.6875rem;
  padding: 2px 5px;
}
.patient-item {
  align-items: flex-start;
}
.patient-item > .avatar {
  margin-top: 3px;
}
.patient-list {
  margin-bottom: 10px;
}
.sidebar-settings {
  padding-top: 14px;
}
.wf-visit-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 22px;
  border: 1px solid #e0e8f4;
  border-radius: 10px;
  padding: 16px 18px;
  background: #fff;
  margin-bottom: 14px;
}
.wf-visit-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.wf-visit-symbol {
  width: 36px;
  height: 36px;
  background: #edf3fc;
  color: #6086c2;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.wf-visit-title label {
  display: block;
  font-size: 0.6875rem;
  color: #8b9cb4;
  margin-bottom: 3px;
}
.wf-visit-title select {
  border: 0;
  background: transparent;
  padding: 0 24px 0 0;
  min-height: 25px;
  font-size: 0.8125rem;
  color: #536b8d;
  max-width: 390px;
  box-shadow: none;
}
.wf-visit-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #8a9bb1;
}
.wf-visit-meta > span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.wf-visit-meta .icon {
  width: 14px;
  height: 14px;
}
.wf-visit-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.wf-workspace-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 19px;
  min-width: 0;
}
.wf-workspace-tabs > button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  font-size: 0.8125rem;
  color: #8392aa;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.wf-workspace-tabs > button.active {
  color: var(--blue);
  font-weight: 600;
  border-bottom-color: var(--blue);
}
.wf-workspace-tabs > button:hover {
  background: #f1f5fc;
}
.wf-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}
.wf-tools .btn {
  font-size: 0.75rem;
  padding: 4px 7px;
}
.wf-workspace-tabs .count {
  font-size: 0.6875rem;
  min-width: 18px;
  padding: 1px 4px;
}
.tabs {
  margin-bottom: 18px;
}
.wf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.wf-section-head h3 {
  font-size: 1rem;
  font-weight: 600;
}
.wf-closure-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
}
.wf-requirements {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.wf-requirements label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #667c9b;
}
.wf-field-gap {
  margin-top: 19px;
}
.wf-diagnosis-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: #94a1b4;
}
.wf-diagnosis-summary strong {
  color: #5b708f;
  font-weight: 500;
  flex: 1;
}
.wf-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wf-check-list > button {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 11px 12px;
  border: 1px solid #eee4d1;
  background: #fffaf1;
  border-radius: 7px;
  color: #9c7d44;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.wf-check-list > button > .icon {
  margin-left: auto;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.wf-check-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cea45c;
  flex-shrink: 0;
}
.wf-ready {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #458d77;
  background: #f1faf5;
  padding: 15px;
  border: 1px solid #d7eddf;
  border-radius: 7px;
  font-size: 0.875rem;
}
.wf-ready > .icon {
  width: 18px;
  height: 18px;
}
.wf-meta-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 20px;
  font-size: 0.875rem;
}
.wf-meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.wf-meta-list dt {
  color: #91a0b4;
  flex-shrink: 0;
}
.wf-meta-list dd {
  margin: 0;
  color: #5d718e;
  overflow-wrap: anywhere;
  text-align: right;
}
.wf-attestation {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 14px;
  border: 1px solid #dfe8f8;
  background: #f5f8ff;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #60799c;
}
.wf-attestation input {
  margin-top: 4px;
}
.wf-version-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.wf-version-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e3eaf5;
  border-radius: 7px;
  padding: 11px 12px;
  font-size: 0.8125rem;
  color: #8c9db4;
  text-align: left;
}
.wf-version-list strong {
  color: #6285bc;
}
.wf-version-list .icon {
  margin-left: auto;
  width: 14px;
  height: 14px;
}
.wf-event-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.wf-event-list > div {
  border: 1px solid #e4eaf4;
  border-radius: 8px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #92a0b5;
}
.wf-event-list strong {
  color: #617796;
  font-weight: 550;
}
.wf-event-list time {
  margin-left: auto;
}
.wf-event-list p {
  width: 100%;
  color: #7d90ab;
  font-size: 0.8125rem;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: anywhere;
}
.wf-cancel-reason {
  font-size: 0.875rem;
  line-height: 1.8;
  color: #917d87;
}
.wf-lock-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  margin-bottom: 16px;
  border: 1px solid #e2e7f0;
  background: #f7f9fc;
  color: #8a97aa;
  font-size: 0.8125rem;
  border-radius: 8px;
}
#clinical-flow-host:empty {
  display: none;
}
input:read-only,
textarea:read-only {
  background: #f7f9fc;
  color: #7f8da3;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
@media (max-width: 1300px) {
  .wf-visit-meta {
    order: 3;
    width: 100%;
    padding-left: 46px;
  }
  .wf-visit-title select {
    max-width: 310px;
  }
  .wf-tools .btn .icon {
    display: none;
  }
  .wf-closure-grid {
    grid-template-columns: minmax(0, 1fr) minmax(290px, 0.8fr);
  }
}
@media (max-width: 1000px) {
  .wf-closure-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .wf-workspace-tabs {
    flex-wrap: wrap;
  }
  .wf-tools {
    margin-left: auto;
  }
  .wf-visit-actions .btn {
    font-size: 0.75rem;
  }
}
@media (max-width: 760px) {
  .wf-visit-bar {
    padding: 13px 12px;
    gap: 11px;
    margin-bottom: 10px;
  }
  .wf-visit-title {
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }
  .wf-visit-title > div {
    flex: 1;
    min-width: 0;
  }
  .wf-visit-title select {
    max-width: 100%;
    width: 100%;
    font-size: 0.75rem;
  }
  .wf-visit-symbol {
    width: 32px;
    height: 32px;
  }
  .wf-visit-meta {
    padding: 0;
    gap: 8px;
    font-size: 0.6875rem;
    order: 2;
  }
  .wf-visit-actions {
    width: 100%;
    margin: 0;
    order: 3;
    justify-content: space-between;
  }
  .wf-visit-actions .btn {
    padding: 5px 6px;
    gap: 4px;
  }
  .wf-visit-actions .btn > .icon {
    width: 13px;
    height: 13px;
  }
  .wf-workspace-tabs {
    gap: 0;
    margin-bottom: 15px;
  }
  .wf-workspace-tabs > button {
    padding: 10px 9px;
    font-size: 0.75rem;
    flex: 1;
    justify-content: center;
  }
  .wf-tools {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid #e9edf5;
    padding: 4px 0;
    gap: 7px;
  }
  .wf-tools .btn {
    padding: 3px 6px;
  }
  .wf-requirements {
    gap: 13px;
  }
  .wf-requirements label {
    font-size: 0.8125rem;
  }
  .wf-check-list > button {
    padding: 10px;
    font-size: 0.75rem;
  }
  .wf-closure-grid {
    gap: 15px;
  }
  .wf-meta-list {
    font-size: 0.8125rem;
  }
  .wf-event-list time {
    margin-left: 0;
  }
  .wf-event-list > div {
    gap: 7px 10px;
  }
  .bottom-bar .actions {
    gap: 5px;
  }
  .bottom-bar .btn {
    font-size: 0.75rem;
    padding: 7px 8px;
  }
  .bottom-bar .btn .icon {
    width: 14px;
    height: 14px;
  }
  .wf-patient-state {
    font-size: 0.6875rem;
  }
}
.tabs[hidden] {
  display: none;
}
@media (max-width: 760px) {
  .patient-banner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
  }
  .patient-banner > .avatar {
    grid-row: 1;
    grid-column: 1;
    width: 44px;
    height: 44px;
  }
  .patient-banner > div:nth-child(2) {
    grid-column: 2;
    min-width: 0;
  }
  .patient-banner-title {
    flex-wrap: wrap;
    gap: 6px;
  }
  .patient-banner-title h3 {
    white-space: nowrap;
  }
  .patient-banner-meta {
    gap: 7px;
    font-size: 0.75rem;
  }
  .banner-field {
    grid-column: 1/-1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 0.75rem;
  }
  .banner-field > div:first-child {
    min-width: 55px;
    margin: 0;
    font-size: 0.6875rem;
    flex-shrink: 0;
  }
  .banner-field > div:last-child {
    min-width: 0;
  }
  .banner-actions {
    grid-column: 1/-1;
    justify-self: end;
    margin: 0;
  }
}
@media print {
  .wf-visit-bar,
  .wf-workspace-tabs,
  .wf-tools {
    display: none !important;
  }
}
