:root {
  --patient-card-default-background: #fff;
  --patient-card-emias-background: #e7f5ea;
  --clinical-ui-ink: #102844;
  --clinical-ui-muted: #607084;
  --clinical-ui-line: #d6dee8;
  --clinical-ui-surface: #fff;
  --clinical-ui-soft: #f4f7fa;
  --clinical-ui-touch: 44px;
  --occupied-slot-height: 80px;
  --empty-slot-height: 52px;
  --patient-diagnosis-lines: 1;
  --patient-operation-lines: 2;
  --room-gap: 6px;
  --day-gap: 8px;
}

.unified-header {
  position: relative;
  z-index: 80;
  display: grid;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  color: var(--clinical-ui-ink);
  background: color-mix(in srgb, var(--clinical-ui-surface) 96%, transparent);
  border-bottom: 1px solid var(--clinical-ui-line);
  box-shadow: 0 4px 14px rgba(16, 40, 68, .08);
  backdrop-filter: blur(16px);
}

.unified-header-brand,
.unified-header-controls,
.unified-calendar-controls,
.unified-header-actions {
  display: flex;
  align-items: center;
  min-width: 0;
}

.unified-header-brand {
  justify-content: space-between;
  gap: 16px;
}

.unified-header-brand h1 {
  margin: 0;
  font-size: clamp(18px, 2.3vw, 26px);
  line-height: 1.15;
}

.unified-header-brand p {
  margin: 2px 0 0;
  color: var(--clinical-ui-muted);
  font-size: 12px;
}

.unified-header button,
.calendar-level button,
.calendar-back,
.calendar-five-week-context button {
  min-height: var(--clinical-ui-touch);
  min-width: var(--clinical-ui-touch);
}

.unified-header-account {
  max-width: min(42vw, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-header-controls {
  flex-wrap: wrap;
  gap: 8px;
}

.unified-calendar-controls {
  display: grid;
  grid-template-columns: var(--clinical-ui-touch) minmax(190px, 1fr) var(--clinical-ui-touch);
  flex: 1 1 360px;
  gap: 6px;
}

#appHeaderCalendarButton {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-header-actions {
  gap: 6px;
  margin-left: auto;
}

.unified-header-session {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.unified-brand-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.unified-brand-title h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.unified-brand-lines {
  display: grid;
  gap: 1px;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.02;
}

.unified-brand-lines span {
  overflow-wrap: anywhere;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.operations-clock-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 188px;
  position: relative;
  padding: 0;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.operations-clock-copy {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.operations-clock-time {
  font-size: 16px;
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  text-align: center;
  letter-spacing: .035em;
}

.operations-clock-date,
.operations-clock-department {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-clock-date {
  margin-top: 3px;
  font-weight: 650;
}

.operations-clock-department {
  margin-top: 2px;
  color: #a7e7be;
  opacity: 1;
}

.operations-clock-anatomy {
  display: block;
  width: 58px;
  height: 48px;
  overflow: visible;
}

.operations-clock-colon-track,
.operations-clock-colon-inner,
.operations-clock-colon-orb {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
}

.operations-clock-colon-track {
  stroke: rgb(255 255 255 / 54%);
  filter: none;
}

.operations-clock-colon-inner {
  fill: none;
  stroke: rgb(255 255 255 / 30%);
  stroke-width: 3.8;
}

.operations-clock-colon-orb {
  fill: #a4e3bc;
  stroke: #d5f5e3;
  stroke-width: 1.2;
  filter: none;
  vector-effect: non-scaling-stroke;
}

.operations-clock-colon-route {
  fill: none;
  stroke: none;
  stroke-width: 0;
}

.unified-filter-chips {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.unified-filter-chips:empty {
  display: none;
}

.unified-filter-chips span {
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  color: var(--clinical-ui-muted);
  background: var(--clinical-ui-soft);
  border: 1px solid var(--clinical-ui-line);
  border-radius: 999px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-auth-adapter {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.calendar-level {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.calendar-level[data-calendar-level="week"] {
  grid-template-columns: 1fr;
}

.calendar-level[data-calendar-level="week"] button {
  display: grid;
  gap: 2px;
  justify-items: start;
  text-align: left;
}

.calendar-level button[aria-current="date"],
.calendar-five-week-context button[aria-current="date"] {
  color: #fff;
  background: var(--accent, #195a96);
  border-color: var(--accent, #195a96);
}

.calendar-back {
  margin-bottom: 10px;
}

.calendar-five-week-context {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
}

.calendar-five-week-context button {
  padding-inline: 4px;
}

.calendar-five-week-context button:disabled {
  visibility: hidden;
}

.clinical-sheet-identity {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--clinical-ui-soft);
  border: 1px solid var(--clinical-ui-line);
  border-radius: 12px;
}

.clinical-sheet-identity span {
  color: var(--clinical-ui-muted);
  font-size: 12px;
}

.clinical-sheet-version {
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--clinical-ui-line) 72%, transparent);
  background: color-mix(in srgb, var(--clinical-ui-soft) 84%, transparent);
  color: var(--clinical-ui-ink);
  font-size: 12px;
  font-weight: 750;
}

.clinical-route-placeholder {
  display: grid;
  gap: 12px;
}

.staff-directory {
  display: grid;
  gap: 12px;
}

.staff-directory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.staff-directory-record {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--clinical-ui-surface);
  border: 1px solid var(--clinical-ui-line);
  border-radius: 10px;
}

.staff-directory-record span {
  color: var(--clinical-ui-muted);
  font-size: 12px;
}

.clinical-primary-nav button > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-card,
.patient-card.ready-ready,
.patient-card.ready-pending,
.patient-card.warn,
.patient-card.conflict {
  background: var(--patient-card-default-background) !important;
}

.patient-card.emias-submitted,
.patient-card.emias-submitted.ready-ready,
.patient-card.emias-submitted.ready-pending,
.patient-card.emias-submitted.warn,
.patient-card.emias-submitted.conflict {
  background: var(--patient-card-emias-background) !important;
}

.patient-card .patient-card-warnings {
  background: transparent;
  color: #6b4e16;
}

.slot-row {
  min-height: var(--occupied-slot-height) !important;
}

.slot-row.empty,
.day-slot-row.empty {
  min-height: var(--empty-slot-height) !important;
}

.day-slot-row:not(.empty) {
  min-height: var(--occupied-slot-height) !important;
}

.vertical-rooms,
.board-day-rooms {
  gap: var(--room-gap) !important;
}

.week-vertical,
.ops-board {
  gap: var(--day-gap) !important;
}

.patient-card .board-diagnosis {
  -webkit-line-clamp: var(--patient-diagnosis-lines) !important;
}

.patient-card .board-operation {
  -webkit-line-clamp: var(--patient-operation-lines) !important;
}

.settings-history {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.settings-history-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 10px;
  background: var(--clinical-ui-soft);
  border: 1px solid var(--clinical-ui-line);
  border-radius: 9px;
}

.settings-history-record span {
  color: var(--clinical-ui-muted);
  font-size: 12px;
}

.settings-history-record button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: var(--clinical-ui-touch);
}

.unified-header :focus-visible,
.workspace-sheet :focus-visible,
.clinical-primary-nav :focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, #195a96) 68%, #fff);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  /* MOBILE_SAFARI_TEXT_CONTROLS_START */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .room-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .room-actions button {
    width: 100%;
    min-width: 40px;
    min-height: var(--clinical-ui-touch);
    padding-right: 2px;
    padding-left: 2px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  /* MOBILE_SAFARI_TEXT_CONTROLS_END */
}

@media (max-width: 1180px) {
  .operations-clock-panel {
    min-width: 0;
    padding-inline: 9px 7px;
  }

  .operations-clock-time {
    font-size: 14px;
    width: 44px;
  }

  .operations-clock-anatomy {
    width: 44px;
    height: 40px;
  }
}

@media (max-width: 760px) {
  .unified-header-brand {
    align-items: flex-start;
  }

  .unified-header-session {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .operations-clock-panel {
    order: -1;
    min-width: 146px;
    padding-block: 5px;
  }

  .operations-clock-time {
    font-size: 18px;
    width: auto;
    right: auto;
    top: auto;
    transform: none;
    position: static;
    text-align: start;
  }

  .operations-clock-date,
  .operations-clock-department {
    font-size: 10px;
  }

  .operations-clock-anatomy {
    width: 38px;
    height: 36px;
  }
}

@media (max-width: 520px) {
  .operations-clock-panel {
    min-width: 112px;
  }

  .operations-clock-anatomy {
    width: 44px;
    height: 42px;
  }
}

@media (max-width: 700px) {
  /* MOBILE_SAFARI_GEOMETRY_CORRECTIONS_START */
  .modal {
    align-items: flex-end;
    z-index: 1100;
    min-width: 0;
    min-height: 100dvh;
    padding: calc(8px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .modal > .modal-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .modal > .modal-card > .modal-body,
  .modal > .modal-card > .form-grid {
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal > .modal-card > .modal-head,
  .modal > .modal-card > .modal-foot {
    z-index: 2;
    flex: 0 0 auto;
    background: var(--clinical-ui-surface);
  }

  .modal > .modal-card > .modal-foot {
    position: sticky;
    bottom: 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  body.workspace-rc-mobile-schedule .vertical-day,
  body.workspace-rc-mobile-schedule .vertical-rooms,
  body.workspace-rc-mobile-schedule .vertical-rooms > .board-room,
  body.workspace-rc-mobile-schedule .board-room-head,
  body.workspace-rc-mobile-schedule .board-room-body,
  body.workspace-rc-mobile-schedule .room-slots,
  body.workspace-rc-mobile-schedule .slot-row,
  body.workspace-rc-mobile-schedule .slot-content {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.workspace-rc-mobile-schedule .vertical-rooms {
    width: 100%;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room {
    width: 100%;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .board-room-head {
    grid-template-columns: 28px minmax(0, 1fr) max-content;
    gap: 3px;
    padding-right: 4px;
    padding-left: 4px;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .board-room-head > b,
  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .board-room-head > span {
    min-width: 0;
    max-width: 100%;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .room-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.workspace-rc-mobile-schedule .workspace-rc-filled-many > .workspace-rc-two-column-room .room-actions button {
    width: 100%;
    min-width: 0;
    padding-right: 2px;
    padding-left: 2px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  /* MOBILE_SAFARI_GEOMETRY_CORRECTIONS_END */

  .unified-header {
    gap: 6px;
    padding-top: calc(8px + env(safe-area-inset-top));
    padding-right: max(10px, env(safe-area-inset-right));
    padding-left: max(10px, env(safe-area-inset-left));
  }

  .unified-header-brand p {
    display: none;
  }

  .unified-header-controls,
  .unified-calendar-controls {
    width: 100%;
  }

  .unified-calendar-controls {
    flex-basis: 100%;
    grid-template-columns: var(--clinical-ui-touch) minmax(0, 1fr) var(--clinical-ui-touch);
  }

  .unified-header-actions {
    width: 100%;
    margin-left: 0;
  }

  .unified-header-actions button {
    flex: 1 1 0;
  }

  .workspace-sheet {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .unified-header *,
  .workspace-sheet * {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Persistent operations-contour shell. */
body {
  padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  background: #f2f7f4;
}

.unified-vector-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.unified-header {
  display: block;
  padding: 0;
  overflow: visible;
  color: #142b24;
  background: #f7faf8;
  border-bottom: 1px solid #cbdad1;
  box-shadow: 0 3px 14px rgb(7 59 46 / 10%);
  backdrop-filter: none;
}

.unified-header-brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 174px;
  padding: calc(14px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 14px max(24px, env(safe-area-inset-left));
  color: #fff;
  background: linear-gradient(135deg, #043f34 0%, #075344 58%, #034b3e 100%);
}

.unified-brand-identity,
.unified-brand-title,
.unified-header-session,
.unified-period-summary,
.unified-route-context {
  display: flex;
  align-items: center;
  min-width: 0;
}

.unified-brand-identity {
  gap: 20px;
}

.unified-moscow-mark {
  width: 118px;
  height: 112px;
  flex: 0 0 118px;
  filter: url("#moscowMedicineWhiteContour");
  object-fit: contain;
}

.unified-mknc-mark {
  display: block;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  overflow: hidden;
}

.unified-mknc-logo {
  display: block;
  width: 266px;
  max-width: none;
  height: 112px;
  object-fit: contain;
  object-position: left center;
}

.unified-brand-divider {
  width: 1px;
  height: 104px;
  flex: 0 0 1px;
  background: rgb(255 255 255 / 42%);
}

.unified-brand-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.unified-header-brand h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.unified-brand-lines {
  display: grid;
  gap: 2px;
  color: #fff;
  font-size: clamp(23px, 1.55vw, 30px);
  font-weight: 820;
  letter-spacing: .005em;
  line-height: 1.08;
  text-align: left;
}

.unified-brand-lines span {
  overflow-wrap: anywhere;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: left;
}

.unified-version {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.unified-header-session {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, auto) auto auto;
  justify-content: flex-end;
  gap: 12px;
}

.operations-clock-panel {
  grid-column: 1;
  grid-row: 1;
}

.unified-header-account {
  grid-column: 2;
  grid-row: 1;
}

.unified-header-menu {
  grid-column: 3;
  grid-row: 1;
}

.operations-clock-panel {
  display: grid;
  grid-template-columns: minmax(175px, 220px) 190px;
  gap: 16px;
  min-width: 390px;
}

.operations-clock-copy {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

.operations-clock-date {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 1.55vw, 31px);
  font-weight: 820;
  line-height: 1.08;
}

.operations-clock-department {
  margin-top: 9px;
  color: #80e4aa;
  font-size: clamp(20px, 1.35vw, 27px);
  font-weight: 820;
  line-height: 1.08;
}

.operations-clock-figure {
  position: relative;
  width: 190px;
  height: 190px;
  flex: 0 0 190px;
}

.operations-clock-anatomy {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.operations-clock-time {
  position: absolute;
  z-index: 1;
  top: 43%;
  right: auto;
  left: 50%;
  width: auto;
  min-width: 88px;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: clamp(30px, 1.65vw, 33px);
  font-variant-numeric: tabular-nums;
  font-weight: 790;
  letter-spacing: .015em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 8px rgb(0 31 26 / 52%);
}

.operations-clock-colon-track,
.operations-clock-colon-haustra,
.operations-clock-colon-lumen,
.operations-clock-colon-inner,
.operations-clock-colon-segment,
.operations-clock-colon-folds {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.operations-clock-colon-sketch {
  fill: #cfead8;
  opacity: .8;
  filter: none;
}

.operations-clock-colon-outline,
.operations-clock-colon-lumen,
.operations-clock-colon-folds {
  opacity: 0;
}

.operations-clock-colon-track {
  stroke: #a9d7b9;
  stroke-width: 54;
  opacity: .62;
  filter: none;
}

.operations-clock-colon-haustra {
  stroke: #c5e6d0;
  stroke-width: 68;
  stroke-dasharray: 1 36 1 42 1 34 1 39 1 45 1 37 1 41 1 33;
  opacity: .68;
}

.operations-clock-colon-lumen {
  stroke: transparent;
  stroke-width: 46;
}

.operations-clock-colon-inner {
  stroke: #e8faed;
  stroke-width: 2;
  opacity: .16;
}

.operations-clock-colon-segment {
  stroke: #e8faed;
  stroke-width: 2.2;
  opacity: 0;
}

.operations-clock-colon-folds {
  stroke: #c9e8d3;
  stroke-width: 2.4;
  opacity: 0;
}

.operations-clock-colon-route {
  fill: none;
  stroke: none;
  stroke-width: 0;
}

.operations-clock-colon-orb {
  fill: #55e39b;
  stroke: #f1fff6;
  stroke-width: 2.5;
  filter: none;
  vector-effect: non-scaling-stroke;
}

.unified-save-status {
  z-index: 1;
  grid-column: 2 / 4;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  transform: translateY(45px);
  color: #d8f2e5;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.unified-save-status::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #79d5a7;
  content: "";
}

.unified-save-status[data-state="pending"]::before {
  background: #f4c96b;
}

.unified-save-status[data-state="error"]::before {
  background: #ff9aa5;
}

.unified-header-account,
.unified-header-menu {
  min-height: 44px;
  padding: 8px 16px;
  color: #fff;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 10px;
  font-weight: 700;
}

.unified-header-controls {
  min-height: 64px;
  padding: 9px max(24px, env(safe-area-inset-right)) 9px max(24px, env(safe-area-inset-left));
  gap: 10px;
  background: #f7faf8;
}

.unified-calendar-controls {
  grid-template-columns: 44px minmax(210px, auto) 44px;
  flex: 0 1 auto;
}

.unified-calendar-controls > button,
.unified-header-actions > button {
  min-height: 42px;
  border-color: #c9d8cf;
  background: #fff;
  color: #173f34;
  font-weight: 750;
}

.unified-period-summary {
  display: grid;
  grid-template-columns: minmax(0, auto) auto;
  align-items: baseline;
  gap: 2px 10px;
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid #c9d8cf;
  border-radius: 9px;
  background: #fff;
}

.unified-period-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.unified-period-summary span {
  color: #5a6f66;
  font-size: 12px;
}

.unified-period-summary .unified-week-freshness {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #52645c;
  font-size: 10px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unified-mobile-period {
  display: none;
}

.unified-week-freshness[data-state="review"] {
  color: #765000;
}

.unified-week-freshness[data-state="published"] {
  color: #0f6844;
}

.unified-week-freshness[data-state="archived"] {
  color: #536174;
}

.unified-route-context {
  min-height: 42px;
  padding: 7px 14px;
  color: #173f34;
}

.unified-header-controls .day-board-plan-switcher {
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  border-color: #c1d4c8;
  background: #edf4ef;
}

.unified-header-controls .day-board-plan-switcher button {
  min-height: 36px;
}

.unified-filter-chips {
  order: 10;
}

.workspace-bottom-nav {
  position: fixed;
  z-index: 900;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-height: calc(62px + env(safe-area-inset-bottom));
  padding: 6px max(24px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  border-top: 1px solid rgb(255 255 255 / 14%);
  background: #125744;
  box-shadow: 0 -5px 18px rgb(7 59 46 / 18%);
}

.workspace-bottom-nav button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 48px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #e9f5ef;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.workspace-bottom-nav .workspace-nav-icon,
.workspace-bottom-nav .workspace-nav-icon svg {
  width: 18px;
  height: 18px;
}

.workspace-bottom-nav .workspace-nav-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.workspace-bottom-nav button.is-active {
  color: #fff;
  background: rgb(255 255 255 / 17%);
  border-color: rgb(255 255 255 / 22%);
}

.workspace-bottom-nav button.is-active::after {
  display: none;
}

.layout,
.content,
.panel,
#content {
  min-width: 0;
  max-width: 100%;
}

#appLayout,
#appLayout.filters-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

#appLayout > .sidebar,
.content-tools {
  display: none !important;
}

#content {
  padding-bottom: 12px;
}

.workspace-additions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  padding: 12px;
}

.workspace-additions button {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 18px;
  border: 1px solid #c9d8cf;
  border-radius: 12px;
  color: #173f34;
  background: #fff;
  text-align: left;
}

.workspace-additions button b {
  font-size: 17px;
}

.workspace-additions button span {
  color: #5a6f66;
  font-size: 13px;
}

@media (min-width: 1401px) {
  .unified-header-brand {
    min-height: 148px;
    padding:
      calc(12px + env(safe-area-inset-top))
      max(24px, env(safe-area-inset-right))
      12px
      max(24px, env(safe-area-inset-left));
  }

  .unified-brand-identity {
    gap: 17px;
  }

  .unified-moscow-mark {
    width: 100px;
    height: 95px;
    flex-basis: 100px;
  }

  .unified-mknc-mark {
    width: 95px;
    height: 95px;
    flex-basis: 95px;
  }

  .unified-mknc-logo {
    width: 226px;
    height: 95px;
  }

  .unified-brand-divider {
    height: 88px;
  }

  .unified-brand-lines {
    font-size: clamp(20px, 1.32vw, 26px);
  }

  .unified-header-session {
    grid-template-columns: minmax(306px, auto) auto auto;
    gap: 10px;
  }

  .operations-clock-panel {
    grid-template-columns: minmax(149px, 187px) 162px;
    gap: 14px;
    min-width: 332px;
  }

  .operations-clock-date {
    font-size: clamp(20px, 1.32vw, 26px);
  }

  .operations-clock-department {
    margin-top: 8px;
    font-size: clamp(17px, 1.15vw, 23px);
  }

  .operations-clock-figure {
    width: 162px;
    height: 162px;
    flex-basis: 162px;
  }

  .operations-clock-time {
    min-width: 75px;
    font-size: clamp(26px, 1.4vw, 28px);
  }

  .unified-save-status {
    transform: translateY(38px);
    font-size: 12px;
  }

  .unified-header-controls {
    min-height: 56px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

@media (min-width: 781px) and (max-width: 1400px) {
  .unified-header-brand {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 128px;
    padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
  }

  .unified-brand-identity {
    gap: 10px;
  }

  .unified-moscow-mark {
    width: 60px;
    height: 66px;
    flex-basis: 60px;
  }

  .unified-mknc-mark {
    width: 64px;
    height: 68px;
    flex-basis: 64px;
  }

  .unified-mknc-logo {
    width: 161px;
    height: 68px;
  }

  .unified-brand-divider {
    height: 62px;
  }

  .unified-brand-lines {
    font-size: clamp(11px, 1.45vw, 19px);
  }

  .unified-header-session {
    grid-template-columns: minmax(250px, auto) auto auto;
    gap: 7px;
  }

  .operations-clock-panel {
    grid-template-columns: minmax(130px, 145px) 112px;
    gap: 8px;
    min-width: 250px;
  }

  .operations-clock-date {
    font-size: clamp(14px, 1.45vw, 20px);
  }

  .operations-clock-department {
    margin-top: 5px;
    font-size: clamp(12px, 1.25vw, 17px);
  }

  .operations-clock-figure {
    width: 112px;
    height: 112px;
    flex-basis: 112px;
  }

  .operations-clock-time {
    min-width: 54px;
    font-size: 19px;
  }

  .unified-save-status {
    font-size: 11px;
    transform: translateY(38px);
  }

  .unified-header-account,
  .unified-header-menu {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 12px;
  }
}

@media (max-width: 780px) {
  .unified-header-brand {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    min-height: 0;
    padding: calc(5px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 5px max(8px, env(safe-area-inset-left));
  }

  .unified-brand-identity {
    display: flex;
    gap: clamp(4px, 1.4vw, 7px);
    width: auto;
  }

  .unified-moscow-mark {
    display: block;
    width: 46px;
    height: 50px;
    flex-basis: 46px;
  }

  .unified-mknc-mark {
    display: block;
    width: 50px;
    height: 52px;
    flex-basis: 50px;
  }

  .unified-mknc-logo {
    display: block;
    width: 123px;
    height: 52px;
  }

  .unified-brand-divider {
    display: block;
    height: 46px;
  }

  .unified-brand-lines {
    gap: 1px;
    font-size: clamp(9px, 2.55vw, 11px);
  }

  .unified-header-session {
    grid-template-columns: 92px auto auto;
    grid-template-rows: 1fr auto 8px auto 1fr;
    column-gap: 4px;
    row-gap: 0;
    align-items: center;
    width: auto;
  }

  .operations-clock-panel {
    display: block;
    grid-column: 1;
    grid-row: 1 / 6;
    width: 92px;
    min-width: 0;
  }

  .operations-clock-copy {
    display: none;
  }

  .operations-clock-figure {
    width: 92px;
    height: 92px;
    flex-basis: 92px;
    background: transparent;
    transform: translateX(-5px);
  }

  .operations-clock-time {
    min-width: 46px;
    font-size: 16px;
  }

  .unified-save-status {
    display: inline-flex;
    grid-column: 2 / 4;
    grid-row: 4;
    align-items: center;
    align-self: center;
    justify-self: center;
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    transform: none;
  }

  .unified-save-status::before {
    width: 6px;
    height: 6px;
    margin-right: 4px;
  }

  .unified-header-account {
    grid-column: 2;
    grid-row: 2;
  }

  .unified-header-menu {
    grid-column: 3;
    grid-row: 2;
  }

  .unified-header-account,
  .unified-header-menu {
    min-height: 34px;
    padding: 4px 7px;
    border-radius: 8px;
    font-size: 10px;
  }

  .unified-header-controls {
    padding-right: 8px;
    padding-left: 8px;
  }

  .unified-header-actions > button {
    min-width: 0;
    padding-right: clamp(4px, 1.4vw, 7px);
    padding-left: clamp(4px, 1.4vw, 7px);
    overflow: hidden;
    font-size: clamp(11px, 2.8vw, 14px);
    line-height: 1.15;
    text-overflow: clip;
    white-space: nowrap;
  }

  #appHeaderCalendarButton {
    text-overflow: clip;
  }

  .unified-calendar-controls {
    flex: 1 1 100%;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  #appHeaderPeriodLabel,
  #appHeaderWeekNumber {
    display: none;
  }

  .unified-period-summary {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    min-height: 42px;
    padding: 4px 8px;
  }

  .unified-period-summary .unified-week-freshness {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .unified-period-summary .unified-mobile-period {
    display: grid;
    place-items: center;
    gap: 0;
    color: #173f34;
    line-height: 1.05;
    text-align: center;
  }

  .unified-mobile-period strong {
    color: #173f34;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }

  .unified-mobile-period span {
    color: #5a6f66;
    font-size: 11px;
    white-space: nowrap;
  }

  .unified-header-controls .day-board-plan-switcher {
    width: 100%;
    margin-left: 0;
  }

  .unified-header-controls .day-board-plan-switcher button {
    flex: 1 1 0;
  }

  .workspace-bottom-nav {
    gap: 2px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .workspace-bottom-nav button {
    display: grid;
    grid-template-rows: 18px minmax(16px, 1fr);
    gap: 2px;
    padding: 3px 2px;
    font-size: 10px;
  }
}

@media (max-width: 390px) {
  .unified-header-brand {
    gap: 3px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .unified-brand-identity {
    gap: 4px;
  }

  .unified-moscow-mark {
    width: 40px;
    height: 44px;
    flex-basis: 40px;
  }

  .unified-mknc-mark {
    width: 44px;
    height: 46px;
    flex-basis: 44px;
  }

  .unified-mknc-logo {
    width: 109px;
    height: 46px;
  }

  .unified-brand-divider {
    height: 40px;
  }

  .unified-brand-lines {
    font-size: 9px;
  }

  .unified-header-session {
    grid-template-columns: 78px auto auto;
    gap: 2px 3px;
  }

  .operations-clock-panel,
  .operations-clock-figure {
    width: 78px;
  }

  .operations-clock-figure {
    height: 78px;
    flex-basis: 78px;
  }

  .operations-clock-time {
    min-width: 42px;
    font-size: 14px;
  }

  .unified-header-account,
  .unified-header-menu {
    padding-right: 5px;
    padding-left: 5px;
    font-size: 9px;
  }
}

@media print {
  .unified-header,
  .clinical-primary-nav,
  .workspace-sheet-root,
  .layout > .sidebar,
  .tabs,
  .content-tools {
    display: none !important;
  }

  .layout,
  .content,
  .panel,
  #content {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .patient-card,
  .board-room,
  .vertical-day {
    break-inside: avoid;
  }
}
