:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17332e;
  background: #f2f6f4;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { min-width: 320px; min-height: 100vh; margin: 0; background: #f2f6f4; }
button, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1360px) / 2));
  color: #fff;
  background: #123e36;
  border-bottom: 1px solid #ffffff1a;
}

.brand { display: inline-flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #d8b86a; color: #17332e; font-size: .78rem; font-weight: 800; letter-spacing: .03em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: .98rem; letter-spacing: .08em; }
.brand small { margin-top: 2px; color: #c6d7d2; font-size: .72rem; }
.prototype-note { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid #ffffff26; border-radius: 999px; color: #e4ece9; font-size: .78rem; font-weight: 650; }
.prototype-note span { width: 7px; height: 7px; border-radius: 50%; background: #f0cd76; box-shadow: 0 0 0 4px #f0cd7622; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.calendar-open { min-height: 34px; padding: 0 13px; border: 1px solid #ffffff2e; border-radius: 9px; color: #edf4f1; background: #ffffff0e; cursor: pointer; font-size: .78rem; font-weight: 700; }
.calendar-open:hover { background: #ffffff18; }

main { width: min(1360px, calc(100% - 48px)); margin: 0 auto; padding: 44px 0 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 9px; color: #4f756b; font-size: .72rem; font-weight: 750; letter-spacing: .105em; text-transform: uppercase; }
h1 { margin: 0; color: #102d28; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.15rem); font-weight: 500; line-height: 1.05; letter-spacing: -.025em; }
.subtitle { margin: 12px 0 0; color: #668079; font-size: .96rem; }
.primary-button { display: inline-flex; gap: 7px; align-items: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 10px; color: #fff; background: #1e6657; font-weight: 700; box-shadow: 0 8px 20px #1e665726; }
.primary-button:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; }
.primary-button:not(:disabled) { cursor: pointer; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.summary-card { position: relative; min-height: 152px; overflow: hidden; padding: 22px 24px; border: 1px solid #dce7e2; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px #163d3510; }
.summary-card::after { content: ""; position: absolute; top: 0; right: 0; width: 72px; height: 72px; border-radius: 0 0 0 72px; opacity: .12; }
.summary-card--active::after { background: #24715f; }
.summary-card--today::after { background: #3575a0; }
.summary-card--overdue::after { background: #b84f49; }
.summary-card--rehab::after { background: #ab7a2f; }
.summary-label, .summary-caption { display: block; color: #6b817b; }
.summary-label { font-size: .82rem; font-weight: 700; }
.summary-card strong { display: block; margin: 12px 0 2px; color: #153b33; font-family: Georgia, "Times New Roman", serif; font-size: 2.4rem; font-weight: 500; line-height: 1; }
.summary-caption { font-size: .78rem; }

.today-panel { margin-top: 18px; padding: 22px 24px 24px; border: 1px solid #dce7e2; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px #163d3510; }
.today-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.today-heading .eyebrow { margin-bottom: 4px; }
.today-heading h2 { margin: 0; color: #183d35; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; }
.today-heading > span { color: #718781; font-size: .75rem; font-weight: 700; }
.task-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.task-group { min-height: 132px; padding: 13px; border: 1px solid #dce7e3; border-radius: 11px; background: #f8fbf9; }
.task-group h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 9px; color: #42655d; font-size: .7rem; letter-spacing: .02em; text-transform: uppercase; }
.task-group h3 span { display: grid; min-width: 22px; height: 22px; padding: 0 5px; place-items: center; border-radius: 7px; color: #356056; background: #e3efeb; }
.task-group--alert { background: #fcf7f6; }
.task-group--warning { background: #fdf9f0; }
.task-group--billing { background: #fbf8ef; }
.task-list { display: grid; gap: 7px; }
.task-item { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 0; border-radius: 8px; color: #345a51; background: #fff; cursor: pointer; text-align: left; box-shadow: 0 1px 3px #163d350d; }
.task-item strong, .task-item small { display: block; }
.task-item strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.task-item small { margin-top: 2px; color: #849791; font-size: .63rem; }
.task-item > span:last-child { flex: 0 0 auto; color: #56776f; font-size: .72rem; font-weight: 800; }
.task-empty { padding: 18px 4px; color: #91a19d; font-size: .7rem; text-align: center; }

.patients-panel { margin-top: 18px; overflow: hidden; border: 1px solid #dce7e2; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px #163d3510; }
.panel-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; border-bottom: 1px solid #e6eeea; }
.panel-toolbar h2 { margin: 0; color: #183d35; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; }
.panel-toolbar p { margin: 5px 0 0; color: #78908a; font-size: .78rem; }
.filters { display: flex; gap: 10px; align-items: center; }
select { height: 38px; padding: 0 34px 0 12px; border: 1px solid #d3e0db; border-radius: 9px; color: #294b44; background: #fff; font-size: .8rem; font-weight: 650; }
.segmented-control { display: flex; padding: 3px; border: 1px solid #d7e2de; border-radius: 10px; background: #f3f7f5; }
.segmented-control button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 7px; color: #617a73; background: transparent; cursor: pointer; font-size: .76rem; font-weight: 700; }
.segmented-control button.is-active { color: #1a594c; background: #fff; box-shadow: 0 1px 5px #17332e17; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; color: #6f8580; background: #fafcfb; font-size: .67rem; font-weight: 750; letter-spacing: .055em; text-align: left; text-transform: uppercase; }
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child { padding-right: 24px; }
td { padding: 17px 16px; border-top: 1px solid #edf2f0; color: #34534c; font-size: .84rem; vertical-align: middle; }
tbody tr { transition: background .16s ease; }
tbody tr:hover { background: #f9fbfa; }
.hall-badge { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #185344; background: #e4f1ec; font-weight: 800; }
.patient-name { display: block; color: #183a33; font-weight: 750; }
.patient-meta, .cell-subline { display: block; margin-top: 5px; color: #82958f; font-size: .72rem; line-height: 1.35; }
.diagnosis { display: block; max-width: 370px; margin-top: 6px; color: #5a746d; font-size: .73rem; line-height: 1.35; }
.deadline { display: inline-flex; gap: 7px; align-items: center; font-weight: 750; }
.deadline::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #6b9188; }
.deadline--today { color: #236b91; }
.deadline--today::before { background: #3d8db8; box-shadow: 0 0 0 4px #3d8db81a; }
.deadline--overdue { color: #a4423d; }
.deadline--overdue::before { background: #c25650; box-shadow: 0 0 0 4px #c2565018; }
.deadline--planned { color: #42675e; }
.mdrk-action { padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.rehab-status { display: inline-flex; padding: 6px 9px; border-radius: 7px; color: #886321; background: #fbf2dc; font-size: .7rem; font-weight: 750; }
.rehab-status--none { color: #778b86; background: #eef3f1; }
.rehab-status--done { color: #23614f; background: #e3f2ec; }
.rehab-status--blocked { color: #8e4640; background: #f8e9e7; }
.rehab-action { display: block; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.row-action { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #dbe5e1; border-radius: 9px; color: #41665d; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.row-action:hover { border-color: #8fb4aa; background: #eef6f3; }
.loading-state { height: 140px; color: #78908a; text-align: center; }
.empty-state { padding: 56px 24px; color: #6c837d; text-align: center; }
.empty-state > div { display: grid; width: 42px; height: 42px; margin: 0 auto 14px; place-items: center; border-radius: 50%; color: #2c6d5e; background: #e4f1ec; font-weight: 800; }
.empty-state h3 { margin: 0; color: #294a43; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.empty-state p { margin: 7px 0 0; font-size: .82rem; }
.error-state { color: #a4423d; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.patient-dialog { width: min(920px, calc(100% - 32px)); max-height: min(900px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: #17332e; background: #fff; box-shadow: 0 28px 80px #102d2850; }
.patient-dialog::backdrop { background: #0e2924a8; backdrop-filter: blur(3px); }
.patient-dialog form { display: flex; max-height: min(900px, calc(100vh - 32px)); flex-direction: column; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 28px 20px; border-bottom: 1px solid #e3ebe8; }
.dialog-header .eyebrow { margin-bottom: 6px; }
.dialog-header h2 { margin: 0; color: #183a33; font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 500; }
.dialog-close { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 9px; color: #617a73; background: #eef3f1; cursor: pointer; font-size: 1.4rem; line-height: 1; }
.dialog-body { padding: 24px 28px 28px; overflow-y: auto; }
fieldset { margin: 0; padding: 0; border: 0; }
fieldset + fieldset { margin-top: 26px; padding-top: 22px; border-top: 1px solid #e8efec; }
legend { width: 100%; margin: 0 0 15px; padding: 0; color: #2d554c; font-size: .77rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.form-grid { display: grid; gap: 16px; }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label:not(.checkbox-label) { display: flex; gap: 7px; flex-direction: column; }
.form-grid label > span, .deadline-preview > span { color: #58716a; font-size: .73rem; font-weight: 700; }
.form-grid input:not([type="checkbox"]), .form-grid select, .form-grid textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cfddd8; border-radius: 9px; outline: none; color: #203f38; background: #fff; font-size: .84rem; transition: border-color .15s ease, box-shadow .15s ease; }
.form-grid textarea { resize: vertical; line-height: 1.45; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: #4c8b7c; box-shadow: 0 0 0 3px #4c8b7c18; }
.form-grid input:disabled { color: #8b9d98; background: #f2f5f4; }
.checkbox-label { display: flex; gap: 9px; align-items: center; align-self: end; min-height: 42px; color: #49675f; font-size: .8rem; font-weight: 650; }
.checkbox-label input { width: 17px; height: 17px; accent-color: #1e6657; }
.form-span-two { grid-column: span 2; }
.form-span-full { grid-column: 1 / -1; }
.deadline-preview { padding: 12px 14px; border: 1px solid #dbe7e3; border-radius: 10px; background: #f5f9f7; }
.deadline-preview strong, .deadline-preview small { display: block; }
.deadline-preview strong { margin-top: 6px; color: #25594e; font-size: .85rem; }
.deadline-preview small { margin-top: 4px; color: #79908a; font-size: .7rem; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 17px 28px; border-top: 1px solid #e3ebe8; background: #fafcfb; }
.secondary-button { min-height: 44px; padding: 0 18px; border: 1px solid #cfddd8; border-radius: 10px; color: #41645b; background: #fff; cursor: pointer; font-weight: 700; }
.danger-button { min-height: 44px; padding: 0 18px; border: 1px solid #d9a39f; border-radius: 10px; color: #923f39; background: #fff4f2; cursor: pointer; font-weight: 750; }
.dialog-footer-spacer { flex: 1; }
.form-message { margin-bottom: 18px; padding: 11px 13px; border-radius: 9px; font-size: .8rem; line-height: 1.4; }
.form-message--error { color: #8e3632; background: #fbeae8; border: 1px solid #f2cfcc; }
.form-message--success { color: #23614f; background: #e7f4ee; border: 1px solid #cce6dc; }

.calendar-dialog { width: min(1080px, calc(100% - 32px)); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: #17332e; background: #fff; box-shadow: 0 28px 80px #102d2850; }
.calendar-dialog::backdrop { background: #0e2924a8; backdrop-filter: blur(3px); }
.calendar-dialog .dialog-header { background: #fff; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; min-height: 570px; }
.calendar-main { padding: 24px 28px 26px; border-right: 1px solid #e3ebe8; }
.month-toolbar { display: grid; grid-template-columns: 38px 1fr 38px; gap: 12px; align-items: center; margin-bottom: 20px; }
.month-toolbar h3 { margin: 0; color: #21483f; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; text-align: center; text-transform: capitalize; }
.month-toolbar button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #d7e3df; border-radius: 9px; color: #35665a; background: #fff; cursor: pointer; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.calendar-weekdays { margin-bottom: 8px; color: #78908a; font-size: .68rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day { position: relative; min-height: 65px; padding: 9px; border: 1px solid #dfe9e5; border-radius: 10px; color: #31574e; background: #fff; cursor: pointer; text-align: left; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.calendar-day:hover { z-index: 1; border-color: #7dab9f; transform: translateY(-1px); }
.calendar-day--off { color: #8a615d; background: #fbf5f4; }
.calendar-day--exception { border-color: #d4af63; box-shadow: inset 0 0 0 1px #d4af6355; }
.calendar-day--selected { border-color: #226b5b; box-shadow: 0 0 0 3px #226b5b1c; }
.calendar-day--empty { min-height: 65px; }
.calendar-day-number { display: block; font-size: .82rem; font-weight: 800; }
.calendar-day-note { display: -webkit-box; margin-top: 6px; overflow: hidden; color: #8c6a2c; font-size: .6rem; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.calendar-day--today .calendar-day-number { display: grid; width: 25px; height: 25px; margin: -4px 0 0 -4px; place-items: center; border-radius: 50%; color: #fff; background: #236b5b; }
.calendar-legend { display: flex; gap: 18px; margin-top: 18px; color: #718781; font-size: .7rem; }
.calendar-legend span { display: inline-flex; gap: 7px; align-items: center; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid #dce7e3; background: #fff; }
.calendar-legend .legend-off { background: #fbefed; }
.calendar-legend .legend-exception { border-color: #d4af63; background: #fff7df; }
.calendar-sidebar { padding: 24px; background: #f8fbf9; }
.calendar-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 28px; }
.calendar-summary > div { padding: 13px; border: 1px solid #dfe9e5; border-radius: 10px; background: #fff; }
.calendar-summary strong, .calendar-summary span { display: block; }
.calendar-summary strong { color: #235448; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 500; }
.calendar-summary span { margin-top: 2px; color: #7b908a; font-size: .65rem; }
.calendar-sidebar h3 { margin: 0; color: #244d44; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 500; }
.calendar-help { margin: 7px 0 18px; color: #7b908a; font-size: .72rem; line-height: 1.5; }
.day-type-control { display: grid; gap: 8px; margin-bottom: 17px; }
.day-type-control label { display: flex; gap: 9px; align-items: center; padding: 10px 11px; border: 1px solid #d9e5e1; border-radius: 9px; color: #47675f; background: #fff; font-size: .76rem; font-weight: 700; }
.day-type-control input { accent-color: #226b5b; }
.calendar-field { display: flex; gap: 7px; flex-direction: column; margin-top: 14px; }
.calendar-field > span { color: #58716a; font-size: .7rem; font-weight: 750; }
.calendar-field input, .calendar-field select { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cfddd8; border-radius: 8px; color: #25483f; background: #fff; font: inherit; font-size: .78rem; }
.calendar-save { width: 100%; justify-content: center; margin-top: 17px; }
.calendar-reset { width: 100%; margin-top: 8px; padding: 8px; border: 0; color: #9a4943; background: transparent; cursor: pointer; font-size: .73rem; font-weight: 700; }
.calendar-sidebar .form-message { margin: 14px 0 0; }

.rehab-dialog { width: min(760px, calc(100% - 32px)); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: #17332e; background: #fff; box-shadow: 0 28px 80px #102d2850; }
.rehab-dialog::backdrop { background: #0e2924a8; backdrop-filter: blur(3px); }
.rehab-dialog-body { padding: 26px 28px 30px; }
.rehab-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rehab-timeline > div { min-height: 82px; padding: 14px; border: 1px solid #dce7e3; border-radius: 11px; background: #f8fbf9; }
.rehab-timeline span, .rehab-timeline strong { display: block; }
.rehab-timeline span { color: #758b85; font-size: .68rem; font-weight: 700; }
.rehab-timeline strong { margin-top: 9px; color: #28564b; font-size: .86rem; line-height: 1.3; }
.workflow-form { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e4ece9; }
.workflow-form h3 { margin: 0; color: #274e45; font-family: Georgia, "Times New Roman", serif; font-size: 1.17rem; font-weight: 500; }
.workflow-form > p, .workflow-heading p { margin: 6px 0 17px; color: #758b85; font-size: .74rem; line-height: 1.5; }
.workflow-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.workflow-submit { justify-content: center; margin-top: 17px; }
.billing-note { margin: 16px 0 0 !important; padding: 10px 12px; border-radius: 8px; color: #6e592d !important; background: #fff7e4; }

.small-dialog { width: min(560px, calc(100% - 32px)); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: #17332e; background: #fff; box-shadow: 0 28px 80px #102d2850; }
.small-dialog::backdrop, .archive-dialog::backdrop { background: #0e2924a8; backdrop-filter: blur(3px); }
.small-dialog-body { padding: 23px 28px 26px; }
.workflow-context { margin: 0 0 17px; color: #70867f; font-size: .77rem; line-height: 1.5; }
.archive-dialog { width: min(1120px, calc(100% - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: 18px; color: #17332e; background: #fff; box-shadow: 0 28px 80px #102d2850; }
.archive-body { max-height: calc(100vh - 130px); padding: 22px 28px 28px; overflow-y: auto; }
.archive-body table { border: 1px solid #e1eae7; }

@media (max-width: 960px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-toolbar { align-items: flex-start; flex-direction: column; }
  .filters { width: 100%; justify-content: space-between; }
  .calendar-dialog { max-height: calc(100vh - 24px); overflow-y: auto; }
  .calendar-layout { grid-template-columns: 1fr; }
  .calendar-main { border-right: 0; border-bottom: 1px solid #e3ebe8; }
}

@media (max-width: 680px) {
  .topbar { height: 64px; padding: 0 16px; }
  .brand small { display: none; }
  .prototype-note { padding: 7px 9px; }
  .calendar-open { padding: 0 9px; }
  main { width: min(100% - 24px, 1360px); padding: 28px 0 40px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .primary-button { width: 100%; justify-content: center; }
  .summary-grid { gap: 10px; margin-top: 24px; }
  .today-panel { padding: 18px; }
  .task-columns { grid-template-columns: 1fr; }
  .summary-card { min-height: 128px; padding: 18px; }
  .summary-card strong { font-size: 2rem; }
  .panel-toolbar { padding: 18px; }
  .filters { align-items: stretch; flex-direction: column; }
  select { width: 100%; }
  .segmented-control button { flex: 1; }
  th:nth-child(3), td:nth-child(3), th:nth-child(5), td:nth-child(5) { display: none; }
  th:first-child, td:first-child { padding-left: 16px; }
  th:last-child, td:last-child { padding-right: 16px; }
  td { padding: 15px 10px; }
  .diagnosis { max-width: 230px; }
  .patient-dialog { width: 100%; max-width: none; max-height: 100vh; margin: 0; border-radius: 0; }
  .patient-dialog form { max-height: 100vh; }
  .dialog-header, .dialog-body, .dialog-footer { padding-right: 18px; padding-left: 18px; }
  .form-grid--three, .form-grid--two { grid-template-columns: 1fr; }
  .form-span-two, .form-span-full { grid-column: auto; }
  .dialog-footer .primary-button, .dialog-footer .secondary-button { flex: 1; padding: 0 10px; }
  .calendar-dialog { width: 100%; max-height: 100vh; margin: 0; border-radius: 0; }
  .calendar-main, .calendar-sidebar { padding: 20px 16px; }
  .calendar-weekdays, .calendar-grid { gap: 4px; }
  .calendar-day, .calendar-day--empty { min-height: 52px; padding: 7px; }
  .calendar-day-note { display: none; }
  .calendar-legend { flex-wrap: wrap; gap: 9px 14px; }
  .rehab-dialog { width: 100%; max-height: 100vh; margin: 0; overflow-y: auto; border-radius: 0; }
  .rehab-dialog-body { padding: 20px 18px; }
  .rehab-timeline { grid-template-columns: 1fr; }
  .small-dialog, .archive-dialog { width: 100%; max-height: 100vh; margin: 0; border-radius: 0; }
  .small-dialog-body, .archive-body { padding: 20px 18px; }
}
