:root {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #172d49;
  background: #f4f7fa;
  --blue: #2876d5;
  --teal: #148f99;
  --muted: #74859b;
  --line: #e4eaf1;
  --green: #388b70;
  --orange: #b87d29;
  --red: #bd5658;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #98c4ed;
  outline-offset: 2px;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  background: #fcfdff;
  border-right: 1px solid var(--line);
  padding: 30px 14px 23px;
  display: flex;
  flex-direction: column;
}
.menu-caption {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #8191a6;
  padding: 4px 11px 26px;
}
nav {
  display: grid;
  gap: 7px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  color: #415671;
  border-radius: 9px;
  font-size: 14px;
}
nav a.active {
  background: #e7f0fd;
  color: #226bc4;
  font-weight: 600;
}
nav a:hover {
  background: #edf3fb;
}
.role-note {
  display: grid;
  gap: 12px;
  margin: 30px 12px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}
.role-note > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: #8a98a9;
}
.role-note strong {
  font-size: 12px;
  line-height: 1.9;
  font-weight: 500;
  color: #526981;
}
.role-note small {
  font-size: 10px;
  line-height: 1.6;
  color: #8c99aa;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 22px 11px 0;
}
.sidebar-bottom strong {
  font-size: 12px;
}
.sidebar-bottom span,
.sidebar-bottom a {
  font-size: 10px;
  color: #77889d;
}
.sidebar-bottom i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #53a98a;
  margin-right: 5px;
}
.sidebar-bottom small {
  font-size: 10px;
  line-height: 1.7;
  color: #8b9aad;
}
.workspace {
  margin-left: 224px;
}
.topbar {
  height: 73px;
  display: flex;
  align-items: center;
  gap: 27px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 27px;
}
.topbar > strong {
  font-size: 13px;
  white-space: nowrap;
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 430px;
}
.search-wrap > span {
  position: absolute;
  left: 12px;
  top: 12px;
  color: #8395ad;
}
.search-wrap svg {
  width: 16px;
  height: 16px;
}
.search-wrap input {
  width: 100%;
  padding: 12px 12px 12px 37px;
  border: 1px solid #eaf0f5;
  border-radius: 8px;
  background: #f7f9fc;
  color: #293f5d;
  font-size: 12px;
}
.search-wrap input::placeholder {
  color: #8a98aa;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}
.icon-button {
  position: relative;
  padding: 5px;
  color: #4d688b;
}
.counter {
  position: absolute;
  right: -3px;
  top: -5px;
  min-width: 16px;
  height: 16px;
  border-radius: 10px;
  border: 2px solid #fff;
  background: #e78560;
  color: #fff;
  font-size: 9px;
  display: grid;
  place-items: center;
}
.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.primary {
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
}
.primary:hover {
  background: #2167b9;
}
.secondary {
  background: #fff;
  border: 1px solid #dfe7ef;
  color: #4a6485;
}
.secondary:hover {
  background: #f3f7fc;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 12px;
}
.avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: #edf3fa;
  border-radius: 50%;
  color: #536f94;
}
.profile > svg {
  width: 12px;
  height: 12px;
  color: #8295ad;
}
main {
  padding: 20px 27px 16px;
  max-width: 1700px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 17px;
}
h1 {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.date {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
}
.date .demo-clock {
  color: #a0abb9;
}
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-filter {
  font-size: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #718298;
}
.profile-filter b {
  font-weight: 500;
  color: #3b5776;
}
.periods {
  display: flex;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 3px;
}
.periods button {
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 11px;
  color: #7f8da0;
}
.periods .active {
  background: #eaf2ff;
  color: #286dc3;
  font-weight: 600;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 16px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.kpi {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 19px;
  min-height: 98px;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #edf4ff;
  color: #397cd1;
}
.kpi-icon.teal {
  background: #e9f7f6;
  color: #258f98;
}
.kpi-icon.orange {
  background: #fff6e8;
  color: #bd853b;
}
.kpi-icon.red {
  background: #fdf0ed;
  color: #c67763;
}
.kpi-label {
  font-size: 12px;
  color: #56708e;
  font-weight: 500;
}
.kpi-value {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-top: 5px;
}
.kpi-value.time {
  font-size: 24px;
}
.kpi-note {
  font-size: 10px;
  color: #8b99aa;
  margin-top: 5px;
}
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.74fr) minmax(375px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.calendar-card {
  padding: 17px 19px 12px;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}
.card-heading h2,
.card-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-heading svg,
.card-title svg {
  color: #547398;
  width: 18px;
  height: 18px;
}
.small-muted {
  font-size: 10px;
  color: #8d9bad;
}
.day-pill {
  font-size: 10px;
  background: #edf4fd;
  color: #6284b3;
  padding: 5px 8px;
  border-radius: 5px;
}
.calendar-scroll {
  max-height: 367px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d8e2ed transparent;
  padding-right: 4px;
}
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 47px 1fr;
  grid-template-rows: repeat(36, 17px);
}
.tick {
  grid-column: 1;
  font-size: 10px;
  color: #8b9aae;
  align-self: start;
  padding-right: 11px;
  transform: translateY(-5px);
  text-align: right;
}
.tick.hour {
  font-weight: 600;
  color: #586e89;
}
.slot-line {
  grid-column: 2;
  border-top: 1px solid #eff3f8;
  position: relative;
}
.slot-line.hour {
  border-color: #e2e9f1;
}
.slot-add {
  position: absolute;
  right: 7px;
  top: 0px;
  width: 24px;
  height: 17px;
  padding: 0;
  color: #8da9c7;
  font-size: 15px;
  line-height: 16px;
  border-radius: 3px;
}
.slot-add:hover {
  background: #e6f1ff;
  color: #236fc5;
}
.session {
  grid-column: 2;
  z-index: 2;
  margin: 2px 38px 3px 4px;
  border-left: 3px solid #6399dc;
  background: #edf4ff;
  border-radius: 6px;
  padding: 6px 11px;
  text-align: left;
  overflow: hidden;
  min-height: 0;
  align-content: center;
}
.session:hover {
  filter: brightness(0.98);
}
.session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #3b638e;
}
.session-top strong {
  font-weight: 600;
}
.session-body {
  font-size: 12px;
  color: #29486d;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.session-body span {
  font-size: 10px;
  color: #6f86a1;
}
.session.teal {
  background: #eaf7f7;
  border-left-color: #42a7ac;
}
.session.teal .session-top {
  color: #368a91;
}
.session.green {
  background: #edf7f1;
  border-left-color: #75b197;
}
.session.red {
  background: #fff0ee;
  border-left-color: #ca7974;
}
.session.red .session-top {
  color: #b75b56;
}
.session.green .session-top {
  color: #51896f;
}
.session.amber {
  background: #fff8eb;
  border-left-color: #dbb26c;
}
.session.amber .session-top {
  color: #b08544;
}
.session.purple {
  background: #f0f0fc;
  border-left-color: #8d8dd6;
}
.session.short {
  padding: 2px 9px;
}
.session.short .session-body {
  margin-top: 1px;
  font-size: 11px;
}
.badge {
  font-size: 9px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 3px 5px;
  background: #fff9;
  color: inherit;
  white-space: nowrap;
}
.calendar-footer {
  border-top: 1px solid var(--line);
  padding-top: 11px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.text-link {
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
}
.text-link svg {
  width: 13px;
  height: 13px;
}
.calendar-legend {
  font-size: 10px;
  color: #8798ad;
}
.calendar-legend i {
  display: inline-block;
  background: #38a0a5;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
}
.right-stack {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto 1fr;
}
.next-card {
  padding: 16px 18px;
  background: linear-gradient(115deg, #fff, #f3f9fd);
  border-color: #dce8f2;
}
.next-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #68939f;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.next-eyebrow span {
  color: #408f91;
  background: #e3f4f1;
  padding: 4px 6px;
  border-radius: 5px;
  letter-spacing: 0;
}
.next-time {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.4px;
}
.next-person {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 11px 0;
}
.initials {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #dff0f1;
  color: #518f98;
  font-size: 12px;
}
.next-person strong {
  font-size: 13px;
  font-weight: 600;
}
.next-person p {
  font-size: 11px;
  color: #798da5;
  margin-top: 5px;
}
.next-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.next-actions .primary,
.next-actions .secondary {
  font-size: 11px;
  padding: 8px 11px;
}
.recommend-button {
  margin-left: auto;
  padding: 5px;
  color: #7b98b4;
}
.recommend-button svg {
  width: 17px;
  height: 17px;
}
.room-note {
  margin-top: 10px;
  color: #63988b;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.room-note svg {
  width: 12px;
  height: 12px;
}
.attention-card,
.rooms-card {
  padding: 14px 18px 12px;
}
.attention-card .card-title,
.rooms-card .card-title {
  margin-bottom: 8px;
  font-size: 13px;
}
.attention-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  border-top: 1px solid #f0f3f7;
  font-size: 11px;
  color: #506781;
  padding: 7px 0;
}
.attention-item i {
  width: 5px;
  height: 5px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #d9aa5f;
}
.attention-item svg {
  margin-left: auto;
  width: 10px;
  height: 10px;
  color: #92a5ba;
}
.attention-card > .text-link,
.rooms-card > .text-link {
  margin-top: 7px;
  font-size: 10px;
}
.rooms-card .card-title span {
  font-size: 10px;
  color: #4d9a82;
  font-weight: 500;
  margin-left: auto;
}
.room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  font-size: 11px;
  margin-top: 8px;
}
.room-row small {
  color: #70a18f;
  font-size: 10px;
}
.room-row button {
  font-size: 10px;
  color: #4781b6;
  background: #f0f6fc;
  border-radius: 4px;
  padding: 5px 7px;
}
.programs {
  margin-top: 16px;
  padding: 15px 18px 7px;
}
.programs .card-heading {
  margin-bottom: 10px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  white-space: nowrap;
  text-align: left;
}
th {
  font-weight: 500;
  color: #8a99ad;
  font-size: 10px;
  padding: 8px 10px;
  background: #f7f9fc;
}
td {
  padding: 10px;
  border-bottom: 1px solid #edf1f6;
  color: #657c95;
}
tbody tr:last-child td {
  border-bottom: 0;
}
td:first-child {
  font-weight: 600;
  color: #385576;
}
tr.highlight td {
  background: #f0f8fb;
}
.status {
  display: inline-block;
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #eaf6ef;
  color: #5b947b;
}
.status.finished {
  background: #edf1f5;
  color: #8392a3;
}
.status.paused {
  background: #fff5e4;
  color: #b79354;
}
.table-link {
  color: #4281bf;
  font-size: 11px;
}
.table-link svg {
  width: 11px;
  height: 11px;
  vertical-align: middle;
}
.page-foot {
  font-size: 9px;
  color: #9aa7b7;
  margin-top: 9px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.detail-page {
  padding: 23px;
  min-height: 400px;
}
.detail-page h2 {
  font-size: 20px;
  margin-bottom: 15px;
}
.detail-page p {
  line-height: 1.7;
  color: #7b8da2;
  font-size: 13px;
}
.detail-page table {
  font-size: 13px;
  margin-top: 15px;
}
.detail-page th {
  font-size: 12px;
}
.detail-page td {
  padding: 14px 10px;
}
.detail-page .attention-item {
  font-size: 14px;
  padding: 15px 0;
}
.detail-page .task-item {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.task-item strong {
  font-size: 13px;
}
.task-item p {
  font-size: 11px;
  margin-top: 6px;
}
.notice {
  border-radius: 7px;
  background: #edf6fc;
  color: #5c829e;
  padding: 12px 14px;
  font-size: 12px;
  margin: 13px 0;
  line-height: 1.6;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pill {
  background: #eff5fc;
  border-radius: 5px;
  padding: 6px 9px;
  color: #6a86a5;
  font-size: 11px;
}
.empty {
  padding: 18px;
  color: #8a98ac;
  font-size: 12px;
}
dialog {
  position: fixed;
  inset: 14px 14px 14px auto;
  margin: 0;
  width: 418px;
  max-width: calc(100vw - 28px);
  height: calc(100dvh - 28px);
  max-height: none;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #fff;
  color: #193351;
  padding: 0;
  box-shadow: -10px 5px 45px #182e501c;
  overflow: auto;
}
dialog::backdrop {
  background: #13294320;
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px 23px 17px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 {
  font-size: 21px;
  font-weight: 600;
}
.close {
  font-size: 25px;
  color: #8a9db2;
  padding: 0 3px;
}
.drawer-body {
  padding: 18px 23px;
}
.form-caption {
  display: flex;
  gap: 6px;
  align-items: center;
  color: #7893ad;
  font-size: 10px;
  margin-bottom: 18px;
}
.form-caption i {
  width: 5px;
  height: 5px;
  background: #72b3a2;
  border-radius: 50%;
}
.field {
  display: block;
  font-size: 12px;
  color: #506a85;
  margin-bottom: 15px;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  padding: 10px 11px;
  margin-top: 7px;
  background: #fff;
  color: #2c4665;
  font-size: 12px;
}
.field textarea {
  resize: vertical;
  min-height: 71px;
  line-height: 1.5;
}
.field small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: #91a0b2;
  line-height: 1.5;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-row .field {
  min-width: 0;
}
.format-options {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}
.format-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  font-size: 11px;
  flex: 1;
  color: #5c7390;
}
.format-options input {
  margin: 0;
  accent-color: var(--blue);
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 15px;
}
legend {
  font-size: 12px;
  color: #506a85;
  margin-bottom: 3px;
}
.participants {
  background: #f6f9fc;
  border: 1px solid #e5edf4;
  border-radius: 7px;
  padding: 10px;
  margin-top: 10px;
}
.participants label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px;
  color: #46617e;
}
.participants input {
  accent-color: var(--blue);
}
.participants p {
  font-size: 10px;
  color: #91a0b2;
  margin: 4px 6px;
}
.form-summary {
  font-size: 11px;
  color: #57917f;
  line-height: 1.6;
  background: #f0f8f5;
  padding: 9px 11px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.form-errors {
  background: #fff1ef;
  border: 1px solid #f2d4cf;
  color: #b45f55;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.7;
  margin: 0 0 14px;
}
.form-errors:empty {
  display: none;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 4px;
}
.mock-note {
  font-size: 10px;
  line-height: 1.6;
  color: #91a0b2;
  margin-top: 13px;
}
.resident-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.resident-summary .initials {
  width: 45px;
  height: 45px;
  font-size: 16px;
}
.resident-summary h3 {
  font-size: 18px;
  margin-bottom: 5px;
}
.resident-summary p {
  font-size: 12px;
  color: #8194ac;
}
.summary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 12px;
  margin-bottom: 20px;
}
.summary-list dt {
  color: #94a2b3;
  font-size: 10px;
  margin-bottom: 6px;
}
.summary-list dd {
  margin: 0;
  color: #49617f;
}
.drawer-body .secondary,
.drawer-body .primary {
  font-size: 12px;
}
.drawer-body h3 {
  font-size: 14px;
  margin-bottom: 12px;
}
.drawer-body > p {
  font-size: 12px;
  line-height: 1.7;
  color: #7e8fa4;
  margin-bottom: 14px;
}
.action-grid {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}
.action-grid button {
  white-space: normal;
}
.outcome-person {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.outcome-person h3 {
  font-size: 13px;
}
.outcome-person .field:last-child {
  margin-bottom: 0;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  border-radius: 8px;
  background: #284260;
  color: #fff;
  padding: 12px 18px;
  font-size: 12px;
  z-index: 20;
}
#search-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  z-index: 8;
  box-shadow: 0 10px 25px #2440600d;
}
#search-results button {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12px;
  padding: 11px;
  border-radius: 5px;
}
#search-results button:hover {
  background: #eff6fc;
}
#search-results p {
  padding: 12px;
  font-size: 12px;
  color: #899ab0;
}
.hidden,
[hidden] {
  display: none !important;
}
@media (min-width: 1450px) {
  dialog.compact {
    inset: 145px 20px auto auto;
    height: auto;
    max-height: calc(100dvh - 165px);
    width: 390px;
  }
  .timeline {
    grid-template-rows: repeat(36, 13px);
  }
  .session {
    padding: 3px 10px;
    margin-top: 1px;
    margin-bottom: 2px;
  }
  .session-body {
    margin-top: 2px;
    font-size: 11px;
  }
  .session-top {
    font-size: 10px;
  }
  .session .badge {
    padding: 1px 4px;
  }
  .session.short {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 9px;
  }
  .session.short .badge {
    display: none;
  }
  .session.short .session-body {
    margin: 0;
    font-size: 10px;
  }
  .tick {
    font-size: 9px;
    transform: none;
  }
  .slot-add {
    height: 13px;
    line-height: 12px;
  }
  .calendar-scroll {
    max-height: 350px;
  }
  .next-card {
    padding: 11px 17px;
  }
  .next-eyebrow {
    margin-bottom: 5px;
  }
  .next-actions .primary,
  .next-actions .secondary {
    padding: 6px 10px;
  }
  .next-time {
    font-size: 19px;
  }
  .next-person {
    margin: 7px 0;
  }
  .room-note {
    margin-top: 6px;
  }
  .right-stack {
    gap: 9px;
  }
  .attention-card,
  .rooms-card {
    padding: 10px 17px 8px;
  }
  .attention-card .card-title,
  .rooms-card .card-title {
    margin-bottom: 5px;
  }
  .attention-item {
    padding: 4px 0;
  }
  .room-row {
    margin-top: 4px;
  }
  .room-row button {
    padding: 4px 6px;
  }
  .programs td {
    padding: 6px 10px;
  }
  .kpi {
    min-height: 96px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(380px, 1fr);
  }
}
@media (max-width: 1449px) {
  .topbar > strong {
    display: none;
  }
  .sidebar {
    width: 207px;
  }
  .workspace {
    margin-left: 207px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .controls {
    width: 100%;
    justify-content: space-between;
  }
  .kpi {
    padding: 15px;
    gap: 10px;
  }
  .kpi-icon {
    width: 34px;
    height: 34px;
  }
  .kpi-value.time {
    font-size: 20px;
  }
  .work-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 1fr);
  }
  .calendar-scroll {
    max-height: 410px;
  }
  .calendar-legend {
    display: none;
  }
}
@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .right-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .next-card {
    grid-row: span 2;
  }
  .header-actions {
    gap: 10px;
  }
  .profile > span:not(.avatar) {
    display: none;
  }
  .topbar {
    padding: 0 20px;
    gap: 15px;
  }
  .profile-filter {
    font-size: 10px;
  }
  .calendar-scroll {
    max-height: 430px;
  }
}
@media (max-width: 740px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 10px;
  }
  .menu-caption,
  .role-note,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  nav a {
    white-space: nowrap;
    padding: 10px;
    font-size: 12px;
  }
  nav a svg {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: auto;
    padding: 12px 15px;
    flex-wrap: wrap;
  }
  .search-wrap {
    flex-basis: 100%;
    max-width: none;
    order: 2;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
  main {
    padding: 17px;
  }
  .controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  .profile-filter {
    font-size: 10px;
  }
  h1 {
    font-size: 24px;
  }
  .kpis {
    gap: 10px;
  }
  .kpi {
    padding: 12px;
  }
  .kpi-icon {
    display: none;
  }
  .kpi-label {
    font-size: 11px;
  }
  .kpi-value {
    font-size: 24px;
  }
  .kpi-note {
    font-size: 9px;
  }
  .work-grid {
    gap: 12px;
  }
  .right-stack {
    grid-template-columns: 1fr;
  }
  .next-card {
    grid-row: auto;
  }
  .calendar-card {
    padding: 15px 12px;
  }
  .session {
    margin-right: 27px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .session-body {
    font-size: 11px;
  }
  .session-body span {
    font-size: 9px;
  }
  .session-top {
    font-size: 10px;
  }
  .calendar-footer .small-muted {
    display: none;
  }
  .page-foot {
    flex-direction: column;
  }
  .programs {
    padding: 14px 10px 5px;
  }
  dialog {
    inset: 7px 7px 7px auto;
    width: calc(100vw - 14px);
    max-width: none;
    height: calc(100dvh - 14px);
  }
  .drawer-head {
    padding: 18px;
  }
  .drawer-body {
    padding: 18px;
  }
  .kpi-value.time {
    font-size: 22px;
  }
}
.pos-1 {
  grid-row-start: 1;
}
.pos-2 {
  grid-row-start: 2;
}
.pos-3 {
  grid-row-start: 3;
}
.pos-4 {
  grid-row-start: 4;
}
.pos-5 {
  grid-row-start: 5;
}
.pos-6 {
  grid-row-start: 6;
}
.pos-7 {
  grid-row-start: 7;
}
.pos-8 {
  grid-row-start: 8;
}
.pos-9 {
  grid-row-start: 9;
}
.pos-10 {
  grid-row-start: 10;
}
.pos-11 {
  grid-row-start: 11;
}
.pos-12 {
  grid-row-start: 12;
}
.pos-13 {
  grid-row-start: 13;
}
.pos-14 {
  grid-row-start: 14;
}
.pos-15 {
  grid-row-start: 15;
}
.pos-16 {
  grid-row-start: 16;
}
.pos-17 {
  grid-row-start: 17;
}
.pos-18 {
  grid-row-start: 18;
}
.pos-19 {
  grid-row-start: 19;
}
.pos-20 {
  grid-row-start: 20;
}
.pos-21 {
  grid-row-start: 21;
}
.pos-22 {
  grid-row-start: 22;
}
.pos-23 {
  grid-row-start: 23;
}
.pos-24 {
  grid-row-start: 24;
}
.pos-25 {
  grid-row-start: 25;
}
.pos-26 {
  grid-row-start: 26;
}
.pos-27 {
  grid-row-start: 27;
}
.pos-28 {
  grid-row-start: 28;
}
.pos-29 {
  grid-row-start: 29;
}
.pos-30 {
  grid-row-start: 30;
}
.pos-31 {
  grid-row-start: 31;
}
.pos-32 {
  grid-row-start: 32;
}
.pos-33 {
  grid-row-start: 33;
}
.pos-34 {
  grid-row-start: 34;
}
.pos-35 {
  grid-row-start: 35;
}
.pos-36 {
  grid-row-start: 36;
}
.span-1 {
  grid-row-end: span 1;
}
.span-2 {
  grid-row-end: span 2;
}
.span-3 {
  grid-row-end: span 3;
}
.span-4 {
  grid-row-end: span 4;
}
.span-5 {
  grid-row-end: span 5;
}
.span-6 {
  grid-row-end: span 6;
}
.span-7 {
  grid-row-end: span 7;
}
.span-8 {
  grid-row-end: span 8;
}
.span-9 {
  grid-row-end: span 9;
}
.span-10 {
  grid-row-end: span 10;
}
.span-11 {
  grid-row-end: span 11;
}
.span-12 {
  grid-row-end: span 12;
}
.schedule-card {
  overflow: hidden;
}
.schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.schedule-periods,
.schedule-views {
  display: flex;
  padding: 3px;
  background: #f3f6fa;
  border: 1px solid #e5ebf2;
  border-radius: 8px;
}
.schedule-periods button,
.schedule-views button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 17px;
  font-size: 12px;
  color: #768ba3;
  border-radius: 5px;
}
.schedule-views svg {
  width: 15px;
  height: 15px;
}
.schedule-periods .selected,
.schedule-views .selected {
  background: white;
  color: #266fc5;
  box-shadow: 0 1px 3px #243e5510;
  font-weight: 600;
}
.schedule-toolbar > .primary {
  margin-left: auto;
}
.schedule-datebar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 19px 20px 13px;
  flex-wrap: wrap;
}
.schedule-datebar h2 {
  font-size: 20px;
  font-weight: 600;
  text-transform: capitalize;
}
.calendar-arrows {
  display: flex;
  align-items: center;
  gap: 7px;
}
.calendar-arrows button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 6px 11px;
  font-size: 12px;
  color: #66809c;
}
.calendar-arrows button[data-cal-shift] {
  font-size: 22px;
  line-height: 20px;
  width: 32px;
  padding: 3px;
}
.schedule-datebar label {
  margin-left: auto;
  font-size: 11px;
  color: #8798ac;
}
.schedule-datebar input {
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12px;
  color: #526d8c;
}
.schedule-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 15px;
  color: #8a9cb1;
  font-size: 11px;
}
.week-scroll {
  max-height: 650px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccd9e8 #f7f9fc;
  border-top: 1px solid var(--line);
}
.week-grid {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(130px, 1fr));
  grid-template-rows: 53px;
  grid-auto-rows: 23px;
  min-width: 1000px;
  position: relative;
}
.week-grid.one-day {
  grid-template-columns: 65px minmax(200px, 1fr);
  min-width: 0;
}
.week-corner,
.week-head {
  grid-row: 1;
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f8fafc;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.week-corner {
  grid-column: 1;
  font-size: 10px;
  color: #97a6b7;
  display: grid;
  place-items: center;
  left: 0;
  z-index: 7;
}
.week-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.week-head span {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 9px;
  color: #95a4b7;
}
.week-head strong {
  font-size: 12px;
  font-weight: 600;
  color: #527093;
}
.week-head.cal-today {
  background: #edf5ff;
}
.week-head.cal-today strong {
  color: #2673c9;
}
.week-time {
  grid-column: 1;
  font-size: 9px;
  color: #a8b4c3;
  text-align: center;
  border-bottom: 1px solid #f1f4f8;
  background: white;
  position: sticky;
  left: 0;
  z-index: 5;
  padding-top: 5px;
}
.week-time.hour {
  color: #5d7696;
  font-weight: 600;
  border-top: 1px solid #e4ebf3;
}
.week-slot {
  border-right: 1px solid #e5ebf3;
  border-bottom: 1px solid #f0f3f8;
  padding: 0;
  text-align: right;
  min-width: 0;
}
.week-slot.hour {
  border-top: 1px solid #e4ebf3;
}
.week-slot.today-slot {
  background: #fbfdff;
}
.week-slot span {
  display: none;
  font-size: 15px;
  color: #4e8cca;
  margin-right: 8px;
}
.week-slot:hover {
  background: #edf5ff;
}
.week-slot:hover span,
.week-slot:focus-visible span {
  display: inline;
}
.cal-event {
  background: #edf4fe;
  border-left: 3px solid #6f9cd4;
  border-radius: 5px;
  padding: 5px 7px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: #3c6592;
}
.week-grid > .cal-event {
  margin: 2px 4px 2px 3px;
  z-index: 3;
}
.cal-event:hover {
  filter: brightness(0.975);
  box-shadow: 0 1px 5px #28476c15;
}
.cal-event strong {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.cal-event > span {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-event small {
  font-size: 9px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event.cal-compact {
  gap: 3px;
  padding-top: 3px;
  padding-bottom: 3px;
}
.cal-compact small {
  display: none;
}
.cal-span-1 {
  flex-direction: row;
  gap: 5px !important;
}
.cal-span-1 > span {
  font-size: 10px;
}
.cal-green {
  background: #edf7f0;
  border-color: #76b499;
  color: #497e67;
}
.cal-teal {
  background: #e9f7f6;
  border-color: #58a4ac;
  color: #3d8189;
}
.cal-purple {
  background: #f1effb;
  border-color: #9a8ace;
  color: #716390;
}
.cal-red {
  background: #fff0ee;
  border-color: #c97971;
  color: #b05f56;
}
.cal-amber {
  background: #fff7e8;
  border-color: #d4ab6a;
  color: #a88043;
}
.schedule-foot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #8c9caf;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 12px;
  margin-right: 4px;
}
.dot:first-child {
  margin-left: 0;
}
.dot.blue {
  background: #729ed5;
}
.dot.green {
  background: #77b697;
}
.dot.red {
  background: #c97772;
}
.month-scroll {
  overflow: auto;
  border-top: 1px solid var(--line);
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  min-width: 1000px;
}
.month-weekday {
  padding: 13px 10px;
  background: #f8fafc;
  color: #7e92aa;
  font-size: 11px;
  text-align: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.month-cell {
  min-height: 134px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px 7px;
  background: white;
}
.month-cell.outside {
  background: #fafbfd;
}
.month-cell.outside .month-day-head > button:first-child {
  color: #b1bdcc;
}
.month-cell.cal-today {
  background: #f8fbff;
}
.month-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 9px;
}
.month-day-head > button:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5e7795;
  padding: 3px 5px;
}
.month-day-head span {
  font-size: 9px;
  font-weight: 500;
  color: #4a8cd0;
}
.month-add {
  color: #8ca8c8;
  font-size: 17px;
  padding: 0 5px;
}
.month-events {
  display: grid;
  gap: 5px;
}
.month-events .cal-event {
  padding: 5px;
  gap: 3px;
}
.month-events .cal-event strong {
  font-size: 9px;
}
.month-events .cal-event > span {
  font-size: 10px;
}
.month-events .cal-event small {
  display: none;
}
.cal-more {
  font-size: 10px;
  color: #5389bd;
  text-align: left;
  padding: 5px 2px;
}
.schedule-list {
  font-size: 12px;
}
.schedule-list th {
  font-size: 11px;
  padding: 13px 18px;
}
.schedule-list td {
  padding: 13px 18px;
}
.schedule-list td:first-child strong {
  font-size: 11px;
  font-weight: 500;
  color: #587696;
}
.schedule-list td:first-child span {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  color: #8d9db0;
}
.cal-status {
  padding: 5px 8px;
  font-size: 10px;
  border-radius: 5px;
  display: inline-block;
}
.cal-empty {
  text-align: center;
  padding: 90px 20px;
  font-size: 16px;
  color: #6b829d;
}
.cal-empty span {
  display: block;
  font-size: 12px;
  color: #93a3b6;
  margin-top: 10px;
}
@media (max-width: 740px) {
  .schedule-toolbar {
    padding: 13px;
    gap: 9px;
  }
  .schedule-toolbar > .primary {
    margin-left: 0;
    width: 100%;
  }
  .schedule-datebar {
    padding: 14px;
    gap: 12px;
  }
  .schedule-datebar h2 {
    font-size: 17px;
  }
  .schedule-datebar label {
    margin-left: 0;
  }
  .schedule-meta {
    padding: 0 14px 12px;
    flex-direction: column;
  }
  .schedule-periods button,
  .schedule-views button {
    padding: 7px 10px;
  }
  .schedule-foot {
    padding: 12px 14px;
  }
}
.cal-row-1 {
  grid-row-start: 1;
}
.cal-row-2 {
  grid-row-start: 2;
}
.cal-row-3 {
  grid-row-start: 3;
}
.cal-row-4 {
  grid-row-start: 4;
}
.cal-row-5 {
  grid-row-start: 5;
}
.cal-row-6 {
  grid-row-start: 6;
}
.cal-row-7 {
  grid-row-start: 7;
}
.cal-row-8 {
  grid-row-start: 8;
}
.cal-row-9 {
  grid-row-start: 9;
}
.cal-row-10 {
  grid-row-start: 10;
}
.cal-row-11 {
  grid-row-start: 11;
}
.cal-row-12 {
  grid-row-start: 12;
}
.cal-row-13 {
  grid-row-start: 13;
}
.cal-row-14 {
  grid-row-start: 14;
}
.cal-row-15 {
  grid-row-start: 15;
}
.cal-row-16 {
  grid-row-start: 16;
}
.cal-row-17 {
  grid-row-start: 17;
}
.cal-row-18 {
  grid-row-start: 18;
}
.cal-row-19 {
  grid-row-start: 19;
}
.cal-row-20 {
  grid-row-start: 20;
}
.cal-row-21 {
  grid-row-start: 21;
}
.cal-row-22 {
  grid-row-start: 22;
}
.cal-row-23 {
  grid-row-start: 23;
}
.cal-row-24 {
  grid-row-start: 24;
}
.cal-row-25 {
  grid-row-start: 25;
}
.cal-row-26 {
  grid-row-start: 26;
}
.cal-row-27 {
  grid-row-start: 27;
}
.cal-row-28 {
  grid-row-start: 28;
}
.cal-row-29 {
  grid-row-start: 29;
}
.cal-row-30 {
  grid-row-start: 30;
}
.cal-row-31 {
  grid-row-start: 31;
}
.cal-row-32 {
  grid-row-start: 32;
}
.cal-row-33 {
  grid-row-start: 33;
}
.cal-row-34 {
  grid-row-start: 34;
}
.cal-row-35 {
  grid-row-start: 35;
}
.cal-row-36 {
  grid-row-start: 36;
}
.cal-row-37 {
  grid-row-start: 37;
}
.cal-row-38 {
  grid-row-start: 38;
}
.cal-row-39 {
  grid-row-start: 39;
}
.cal-row-40 {
  grid-row-start: 40;
}
.cal-row-41 {
  grid-row-start: 41;
}
.cal-row-42 {
  grid-row-start: 42;
}
.cal-row-43 {
  grid-row-start: 43;
}
.cal-row-44 {
  grid-row-start: 44;
}
.cal-row-45 {
  grid-row-start: 45;
}
.cal-row-46 {
  grid-row-start: 46;
}
.cal-row-47 {
  grid-row-start: 47;
}
.cal-row-48 {
  grid-row-start: 48;
}
.cal-row-49 {
  grid-row-start: 49;
}
.cal-row-50 {
  grid-row-start: 50;
}
.cal-row-51 {
  grid-row-start: 51;
}
.cal-row-52 {
  grid-row-start: 52;
}
.cal-row-53 {
  grid-row-start: 53;
}
.cal-row-54 {
  grid-row-start: 54;
}
.cal-row-55 {
  grid-row-start: 55;
}
.cal-row-56 {
  grid-row-start: 56;
}
.cal-row-57 {
  grid-row-start: 57;
}
.cal-row-58 {
  grid-row-start: 58;
}
.cal-row-59 {
  grid-row-start: 59;
}
.cal-row-60 {
  grid-row-start: 60;
}
.cal-row-61 {
  grid-row-start: 61;
}
.cal-row-62 {
  grid-row-start: 62;
}
.cal-row-63 {
  grid-row-start: 63;
}
.cal-row-64 {
  grid-row-start: 64;
}
.cal-row-65 {
  grid-row-start: 65;
}
.cal-row-66 {
  grid-row-start: 66;
}
.cal-row-67 {
  grid-row-start: 67;
}
.cal-row-68 {
  grid-row-start: 68;
}
.cal-row-69 {
  grid-row-start: 69;
}
.cal-row-70 {
  grid-row-start: 70;
}
.cal-row-71 {
  grid-row-start: 71;
}
.cal-row-72 {
  grid-row-start: 72;
}
.cal-row-73 {
  grid-row-start: 73;
}
.cal-row-74 {
  grid-row-start: 74;
}
.cal-row-75 {
  grid-row-start: 75;
}
.cal-row-76 {
  grid-row-start: 76;
}
.cal-row-77 {
  grid-row-start: 77;
}
.cal-row-78 {
  grid-row-start: 78;
}
.cal-row-79 {
  grid-row-start: 79;
}
.cal-row-80 {
  grid-row-start: 80;
}
.cal-row-81 {
  grid-row-start: 81;
}
.cal-row-82 {
  grid-row-start: 82;
}
.cal-row-83 {
  grid-row-start: 83;
}
.cal-row-84 {
  grid-row-start: 84;
}
.cal-row-85 {
  grid-row-start: 85;
}
.cal-row-86 {
  grid-row-start: 86;
}
.cal-row-87 {
  grid-row-start: 87;
}
.cal-row-88 {
  grid-row-start: 88;
}
.cal-row-89 {
  grid-row-start: 89;
}
.cal-row-90 {
  grid-row-start: 90;
}
.cal-row-91 {
  grid-row-start: 91;
}
.cal-row-92 {
  grid-row-start: 92;
}
.cal-row-93 {
  grid-row-start: 93;
}
.cal-row-94 {
  grid-row-start: 94;
}
.cal-row-95 {
  grid-row-start: 95;
}
.cal-row-96 {
  grid-row-start: 96;
}
.cal-row-97 {
  grid-row-start: 97;
}
.cal-col-1 {
  grid-column: 2;
}
.cal-col-2 {
  grid-column: 3;
}
.cal-col-3 {
  grid-column: 4;
}
.cal-col-4 {
  grid-column: 5;
}
.cal-col-5 {
  grid-column: 6;
}
.cal-col-6 {
  grid-column: 7;
}
.cal-col-7 {
  grid-column: 8;
}
.cal-span-1 {
  grid-row-end: span 1;
}
.cal-span-2 {
  grid-row-end: span 2;
}
.cal-span-3 {
  grid-row-end: span 3;
}
.cal-span-4 {
  grid-row-end: span 4;
}
.cal-span-5 {
  grid-row-end: span 5;
}
.cal-span-6 {
  grid-row-end: span 6;
}
.cal-span-7 {
  grid-row-end: span 7;
}
.cal-span-8 {
  grid-row-end: span 8;
}
.cal-span-9 {
  grid-row-end: span 9;
}
.cal-span-10 {
  grid-row-end: span 10;
}
.cal-span-11 {
  grid-row-end: span 11;
}
.cal-span-12 {
  grid-row-end: span 12;
}

/* Consistent controls across working sections; calendar tiles and status cards keep their layout. */
:root { --ui-action:#2166b7; --ui-action-hover:#18569e; --ui-control-border:#cbd8e8; }
:where(main,dialog) { line-height:1.5; }
:where(main,dialog) :is(h1,h2,h3,p,label,small) { overflow-wrap:break-word; }
:where(main,dialog) h2 { font-size:19px; line-height:1.4; }
:where(main,dialog) h3 { font-size:16px; line-height:1.4; }
:is(main,dialog,.header-actions) button:not(.kpi,.calendar-day,.live-calendar-day,.calendar-event,.manager-event,.finance-event,.slot-plus,.icon-button,.close):not([data-close],[aria-label="Закрыть"],[data-live-day],[data-calendar-day]) { box-sizing:border-box; min-height:40px; max-width:100%; font-size:13px; line-height:1.4; white-space:normal; }
:where(main,dialog,.header-actions) button:not([class]):not([aria-pressed]) { border:1px solid var(--ui-control-border); border-radius:8px; padding:10px 14px; background:#fff; color:#24486f; }
:is(main,dialog,.header-actions) :is(button,a).primary:not(.danger,.destructive) { background:var(--ui-action); border-color:var(--ui-action); color:#fff; border-radius:8px; }
:is(main,dialog,.header-actions) :is(button,a).primary:not(.danger,.destructive):hover { background:var(--ui-action-hover); border-color:var(--ui-action-hover); }
:is(main,dialog,.header-actions) :is(button,a).secondary:not(.danger,.destructive) { border:1px solid var(--ui-control-border); border-radius:8px; background:#fff; color:#24486f; }
:where(main,dialog) :is(a.primary,a.secondary) { display:inline-flex; align-items:center; justify-content:center; min-height:40px; box-sizing:border-box; padding:10px 14px; text-decoration:none; line-height:1.4; white-space:normal; }
:where(main,dialog) :is(.title-row,.page-heading,.list-heading,.live-heading,.nd-heading,.card-heading,.person-actions,.nurse-actions,.doctor-form-actions,.form-actions,.section-bottom,.actions,.buttons) { flex-wrap:wrap; gap:12px; }
:where(main,dialog) :is(.form-grid,.person-form,.person-grid,.nd-form-grid,.form-columns) > * { min-width:0; }
:where(main,dialog) :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { box-sizing:border-box; min-width:0; max-width:100%; line-height:1.5; }
:is(main,dialog) :is(input,select):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { min-height:40px; }
:where(main,dialog) :is(.table-scroll,.table-wrap,.inquiry-table-wrap,.physician-table-scroll) { min-width:0; max-width:100%; overflow-x:auto; }
:where(main,dialog) td { overflow-wrap:anywhere; vertical-align:middle; }
:where(main,dialog) :is(.card,.nurse-card,.nd-card,.panel,.task) { min-width:0; }
:where(.dialog-head,.drawer-head) { display:flex; align-items:center; justify-content:space-between; gap:16px; }
:where(.dialog-head,.drawer-head) h2 { flex:1; min-width:0; margin:0; }
:where(.dialog-head,.drawer-head) button { flex:none; }
dialog:not(#contract-preview-dialog):not(#service-act-preview) { box-sizing:border-box; max-width:calc(100vw - 32px); max-height:calc(100vh - 32px); overflow:auto; }
:where(main,dialog) button:disabled { cursor:not-allowed; }
@media(max-width:640px){ :where(main,dialog) :is(.title-row,.page-heading,.list-heading,.live-heading,.nd-heading,.card-heading) { align-items:flex-start; gap:12px; } }
