:root {
  color-scheme: light;
  --canvas: #eff4f2;
  --surface: #fff;
  --surface-2: #f4f7f5;
  --surface-3: #e6efeb;
  --ink: #173b3c;
  --muted: #566d6a;
  --line: #e2eae6;
  --accent: #146b67;
  --accent-soft: #e1f0eb;
  --accent-ink: #175f58;
  --on-accent: #fff;
  --hero: #134f51;
  --hero-ink: #f2fbf8;
  --hero-muted: #bfdbd5;
  --hero-accent: #b9dbb0;
  --nav-bg: #fff;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 8px 32px -20px #18463730;
  --success: #28734e;
  --success-soft: #e9f4ed;
  --warn: #95501c;
  --warn-soft: #fff0df;
  --danger: #b33b45;
  --danger-soft: #fcebef;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: 'Manrope', system-ui, sans-serif;
}
html[data-theme='graphite'] {
  color-scheme: dark;
  --canvas: #141d1c;
  --surface: #1e2927;
  --surface-2: #26332f;
  --surface-3: #30413c;
  --ink: #edf5f0;
  --muted: #afc3ba;
  --line: #364840;
  --accent: #94d1be;
  --accent-soft: #294b40;
  --accent-ink: #b5e3d1;
  --on-accent: #173b3c;
  --hero: #244f48;
  --hero-ink: #f2fbf8;
  --hero-muted: #c1d8ce;
  --nav-bg: #192421;
  --shadow: 0 12px 40px -20px #0008;
  --success: #b0dfc2;
  --success-soft: #254436;
  --warn: #efc191;
  --warn-soft: #453627;
  --danger: #ffb2b8;
  --danger-soft: #482d35;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 13px var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: inherit;
  transition:
    background 0.18s,
    transform 0.18s;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -1.2px;
  font-weight: 700;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 14px;
  letter-spacing: -0.2px;
}
small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
strong {
  font-weight: 700;
}
.icon {
  width: 19px;
  height: 19px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip {
  position: fixed;
  top: -70px;
  left: 16px;
  padding: 14px;
  background: var(--surface);
  z-index: 100;
}
.skip:focus {
  top: 15px;
}
.sidebar {
  width: 238px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 20px;
  background: var(--nav-bg);
  border-radius: 0 42px 0 0;
  z-index: 25;
  overflow-x: clip;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 0 12px 28px;
  font-size: 32px;
  letter-spacing: -1.9px;
  font-weight: 800;
}
.brand > span:last-child small {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-top: 0;
  white-space: nowrap;
}
.brand-mark {
  position: relative;
  color: var(--accent);
  width: 38px;
  height: 42px;
  line-height: 38px;
  font-size: 53px;
  font-weight: 500;
  letter-spacing: -9px;
}
.brand-mark span {
  font-size: 33px;
  position: relative;
  left: -1px;
  bottom: 3px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 13px 9px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 10px;
  margin-bottom: 23px;
  white-space: nowrap;
}
.workspace small {
  font-size: 8px;
  margin-top: 3px;
}
.workspace-symbol {
  width: 28px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
}
.live-dot {
  height: 5px;
  width: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}
.nav-label {
  padding-left: 15px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 1.6px;
  margin: 0 0 9px;
}
/* The menu is drawn in groups by function; the group of simulations opens on request. */
.nav-group + .nav-group {
  margin-top: 14px;
}
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding-right: 12px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.nav-toggle small {
  display: block;
  margin-top: 3px;
  letter-spacing: 0;
  font-size: 9px;
  text-transform: none;
}
.nav-toggle .icon {
  flex: none;
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}
.nav-toggle[aria-expanded='true'] .icon {
  transform: rotate(90deg);
}
.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.nav-group[data-open='false'] .nav-items {
  display: none;
}
/* The method page belongs with the simulations; the search is hidden only from who has no role yet. */
.search-button[hidden],
.method-link[hidden] {
  display: none;
}
nav {
  position: relative;
  isolation: isolate;
}
.nav-selection {
  position: absolute;
  left: 0;
  right: -20px;
  height: 75px;
  pointer-events: none;
  z-index: -1;
  transition: transform 420ms cubic-bezier(0.22, 0.75, 0.2, 1);
}
.nav-selection svg {
  width: 100%;
  height: 100%;
  fill: var(--canvas);
}
.nav-link {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  margin: 4px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  position: relative;
  border-radius: 12px;
}
.nav-link:hover {
  color: var(--ink);
}
.nav-link.active {
  color: var(--accent-ink);
  font-weight: 800;
}
.nav-link .icon {
  width: 18px;
  height: 18px;
}
.nav-count {
  margin-left: auto;
  min-width: 20px;
  padding: 3px 5px;
  background: var(--surface-3);
  border-radius: 6px;
  text-align: center;
  font-size: 9px;
}
.nav-link.active .nav-count {
  background: var(--surface);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.method-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 10px;
  font-size: 11px;
  font-weight: 700;
}
.method-link small {
  font-size: 9px;
  margin-top: 3px;
}
.method-logo {
  font-size: 26px;
  letter-spacing: -3px;
  width: 28px;
  font-weight: 800;
  color: var(--accent);
}
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 19px 0 0;
  font-size: 10px;
  font-weight: 700;
}
.profile small {
  font-size: 9px;
  margin-top: 2px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  flex: none;
}
.profile .icon-button {
  margin-left: auto;
}
.workspace-main {
  margin-left: 238px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 78px;
  flex: none;
  margin: 0 34px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  color: var(--muted);
}
.breadcrumbs strong {
  color: var(--ink);
  font-weight: 600;
}
.crumb-divider {
  opacity: 0.5;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.search-button {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.search-button .icon {
  width: 16px;
}
kbd {
  border: 1px solid var(--line);
  padding: 3px 5px;
  border-radius: 5px;
  font: 10px var(--font);
  background: var(--surface);
}
.demo-badge {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
}
.demo-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
}
.icon-button:hover {
  background: var(--surface-3);
}
.mobile-menu {
  display: none;
}
main {
  width: 100%;
  max-width: 1650px;
  margin: 0 auto;
  padding: 30px 34px 40px;
  flex: 1;
  outline: none;
}
.page-enter {
  animation: page-in 0.3s var(--ease);
}
@keyframes page-in {
  from {
    opacity: 0.1;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow i {
  width: 15px;
  height: 1px;
  background: var(--accent);
}
.page-heading p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 9px;
  line-height: 1.7;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 17px;
  min-height: 42px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 30px;
  white-space: nowrap;
}
.button .icon {
  width: 15px;
  height: 15px;
}
.primary {
  background: var(--accent);
  color: var(--on-accent);
}
.primary:hover {
  filter: brightness(1.09);
}
.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}
.secondary:hover {
  background: var(--surface-2);
}
.quiet {
  color: var(--muted);
  background: transparent;
}
.small {
  min-height: 33px;
  padding: 8px 11px;
  font-size: 10px;
}
.danger-button {
  color: var(--danger);
  border: 1px solid var(--danger);
  background: transparent;
}
.card {
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 24px 17px;
}
.card-head p {
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.card-head h2 {
  font-size: 15px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-ink);
  padding: 0;
}
.text-link:hover {
  text-decoration: underline;
}
.text-link .icon {
  width: 14px;
  height: 14px;
}
.overview-strip {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 23px;
}
.welcome-card {
  background: var(--hero);
  color: var(--hero-ink);
  padding: 19px 22px;
  position: relative;
  overflow: hidden;
  border: 0;
  min-height: 108px;
}
.welcome-card:after {
  content: '';
  position: absolute;
  width: 170px;
  height: 170px;
  border: 22px solid #ffffff05;
  border-radius: 50%;
  right: -91px;
  top: -65px;
  box-shadow: 0 0 0 24px #ffffff03;
}
.welcome-card .eyebrow {
  color: var(--hero-muted);
  letter-spacing: 0.7px;
  font-size: 8px;
  margin-bottom: 8px;
}
.welcome-card h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.4;
}
.welcome-card p {
  font-size: 9px;
  color: var(--hero-muted);
  margin-top: 7px;
}
.stat-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  gap: 10px;
}
.stat-top .icon {
  width: 16px;
  color: var(--accent);
}
.stat-bottom {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 9px;
}
.stat-value {
  font-size: 28px;
  letter-spacing: -1.2px;
  line-height: 1.3;
  font-weight: 600;
}
.stat-note {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.routine-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
.clinic-card {
  overflow: hidden;
}
.view-switch {
  display: flex;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px;
  background: var(--surface-2);
}
.view-switch button {
  border-radius: 16px;
  font-size: 9px;
  padding: 6px 9px;
  color: var(--muted);
  display: flex;
  gap: 5px;
  align-items: center;
}
.view-switch button .icon {
  width: 13px;
  height: 13px;
}
.view-switch button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 1px 6px #00000008;
}
.scene-wrap {
  position: relative;
  height: 410px;
  background: radial-gradient(ellipse at 50% 47%, #f8fbf8 0%, #eaf0e9 80%);
  overflow: hidden;
}
.scene-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline-offset: -4px;
}
.scene-stage {
  width: 100%;
  height: 100%;
  position: relative;
}
.scene-overlay {
  position: absolute;
  left: 19px;
  top: 14px;
  z-index: 4;
  pointer-events: none;
}
.scene-overlay span {
  font-size: 9px;
  color: #46655a;
  background: #ffffffe5;
  border: 1px solid #dbe5dc;
  border-radius: 8px;
  padding: 6px 9px;
}
.scene-toolbar {
  position: absolute;
  bottom: 17px;
  right: 16px;
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #ffffffed;
  border: 1px solid #dce7dd;
  border-radius: 13px;
  z-index: 5;
  color: #173b3c;
}
.scene-toolbar button {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}
.scene-toolbar button:hover {
  background: #e1f0eb;
}
.scene-toolbar .icon {
  width: 16px;
  height: 16px;
}
.scene-hint {
  position: absolute;
  left: 20px;
  bottom: 22px;
  font-size: 9px;
  color: #597365;
  z-index: 4;
  pointer-events: none;
}
.clinic-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 23px;
  border-top: 1px solid var(--line);
  gap: 12px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  font-size: 8px;
  color: var(--muted);
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #73aa93;
}
.legend .busy {
  background: #e3af73;
}
.legend .blocked {
  background: #c36a70;
}
.clinic-footer > small {
  font-size: 8px;
  text-align: right;
  max-width: 190px;
}
.side-stack {
  display: grid;
  gap: 17px;
}
.focus-card {
  background: var(--hero);
  color: var(--hero-ink);
  border: 0;
  padding: 23px;
}
.focus-card .eyebrow {
  color: var(--hero-muted);
  font-size: 8px;
}
.focus-card h2 {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
}
.focus-card p {
  color: var(--hero-muted);
  font-size: 10px;
  line-height: 1.8;
  margin-top: 10px;
}
.focus-card .text-link {
  color: var(--hero-ink);
  margin-top: 19px;
}
.focus-number {
  font-size: 43px;
  line-height: 1.2;
  letter-spacing: -2px;
  font-weight: 500;
}
.focus-card .focus-top {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 14px 0;
}
.focus-top p {
  margin: 0;
  max-width: 150px;
}
.today-list {
  padding: 0 20px 9px;
}
.today-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  width: 100%;
  text-align: left;
}
.today-item:last-child {
  border: 0;
}
.today-item time {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.today-item strong {
  font-size: 10px;
  display: block;
}
.today-item small {
  font-size: 9px;
  margin-top: 4px;
}
.today-item .dot {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--accent);
  border-radius: 50%;
  margin-left: auto;
}
.lower-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-top: 22px;
}
.tasks-card {
  height: 460px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tasks-card > .card-head,
.tasks-card > .tabs,
.tasks-card > .panel-footer {
  flex-shrink: 0;
}
.tabs {
  display: flex;
  gap: 20px;
  margin: 0 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  padding: 10px 0 13px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.tab[aria-selected='true'] {
  font-weight: 700;
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}
.tab em {
  font-style: normal;
  background: var(--surface-3);
  padding: 2px 5px;
  font-size: 8px;
  border-radius: 5px;
  margin-left: 4px;
}
.task-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0 24px;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}
.task-list.updating {
  animation: fade-list 0.18s var(--ease);
}
@keyframes fade-list {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.task-row:last-child {
  border: 0;
}
.task-symbol {
  width: 34px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  flex: none;
}
.task-symbol .icon {
  width: 17px;
}
.task-row > div {
  flex: 1;
}
.task-row strong {
  font-size: 10px;
  display: block;
  line-height: 1.65;
}
.task-row small {
  font-size: 9px;
  margin-top: 4px;
}
.panel-footer {
  border-top: 1px solid var(--line);
  padding: 13px 24px;
  color: var(--muted);
  font-size: 9px;
}
.method-card {
  padding: 24px;
}
.method-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 11px 0 20px;
}
.four-states {
  display: grid;
  gap: 12px;
}
.dimension-line {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dimension-line:last-child {
  border: 0;
}
.state-circle {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 10px;
}
.state-circle.done {
  background: var(--success-soft);
  color: var(--success);
}
.state-circle .icon {
  width: 15px;
  height: 15px;
}
.dimension-line strong {
  font-size: 11px;
  display: block;
}
.dimension-line small {
  font-size: 9px;
  margin-top: 3px;
}
.tag {
  font-size: 9px;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}
.tag.success {
  background: var(--success-soft);
  color: var(--success);
}
.tag.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.tag.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.tag.accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.tag .icon {
  height: 11px;
  width: 11px;
}
.table-card {
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 23px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.filter-input {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  min-width: 240px;
}
.filter-input input {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--ink);
  outline-offset: 4px;
  min-width: 180px;
}
.filter-input .icon {
  width: 16px;
}
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.filters select,
.filters input {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 10px;
  max-width: 200px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  padding: 14px 22px;
  font-size: 8px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--muted);
}
td {
  padding: 17px 22px;
  font-size: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:last-child td {
  border: 0;
}
td strong {
  font-size: 11px;
  display: block;
}
td small {
  margin-top: 4px;
  font-size: 9px;
}
tr:hover td {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}
.patient-cell {
  display: flex;
  gap: 11px;
  align-items: center;
}
.patient-cell .avatar {
  width: 32px;
  height: 32px;
  font-size: 9px;
}
.mini-dims {
  display: flex;
  gap: 5px;
}
.mini-dim {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 9px;
}
.mini-dim.done {
  background: var(--success-soft);
  color: var(--success);
}
.mini-dim .icon {
  width: 12px;
  height: 12px;
}
.cycle-progress {
  font-size: 9px;
  color: var(--muted);
  margin-top: 6px;
}
.empty {
  padding: 42px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.empty .icon {
  width: 30px;
  height: 30px;
  display: block;
  margin: 0 auto 12px;
}
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 22px;
  color: var(--accent-ink);
}
.notice .icon {
  width: 16px;
  margin-top: 3px;
}
.notice p {
  flex: 1;
}
.subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 15px;
  gap: 15px;
}
.subheading p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.metrics-grid.four {
  grid-template-columns: repeat(4, 1fr);
}
.money-stat {
  font-size: 23px;
  letter-spacing: -0.8px;
  margin-top: 13px;
  font-weight: 600;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}
.info-card {
  padding: 23px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.info-card .card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.info-card h2 {
  font-size: 15px;
}
.info-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.info-card .button {
  align-self: flex-start;
  margin-top: auto;
}
.info-rows {
  display: grid;
  gap: 10px;
  font-size: 10px;
}
.info-rows > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.info-rows span {
  color: var(--muted);
}
.info-rows strong {
  text-align: right;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(205px, 1fr));
  gap: 16px;
  overflow: auto;
  align-items: start;
}
.kanban-column {
  background: var(--surface-3);
  border-radius: 20px;
  padding: 15px;
  min-height: 285px;
}
.kanban-column > h2 {
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.kanban-column .info-card {
  box-shadow: none;
  border: 0;
  margin-bottom: 12px;
  padding: 17px;
}
.kanban-column .info-card p {
  font-size: 10px;
}
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 20px 22px;
  max-height: 410px;
  overflow: auto;
}
.room-card {
  padding: 16px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.room-card strong {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
}
.room-card small {
  font-size: 9px;
}
.room-card[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.room-inspector {
  padding: 22px;
}
.room-inspector .eyebrow {
  font-size: 8px;
}
.room-inspector h2 {
  font-size: 19px;
}
.room-inspector p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
  margin: 10px 0 17px;
}
.mini-service {
  display: block;
  text-align: left;
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.mini-service strong {
  font-size: 11px;
  display: block;
}
.mini-service small {
  font-size: 9px;
  margin-top: 4px;
}
.mini-service .tag {
  margin-top: 8px;
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 25px;
}
.step-card {
  padding: 22px 18px;
}
.step-number {
  font-size: 10px;
  color: var(--accent);
  font-weight: 800;
}
.step-card h2 {
  font-size: 14px;
  margin: 13px 0 9px;
}
.step-card p {
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
}
.accordion {
  padding: 0 24px;
}
.accordion details {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}
.accordion details:last-child {
  border: 0;
}
.accordion summary {
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.accordion p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  padding-top: 12px;
}
.accordion ul {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  padding-left: 18px;
}
.app-footer {
  padding: 0 35px 21px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 8px;
}
dialog {
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 20px 90px #0003;
  max-height: calc(100dvh - 36px);
  max-width: calc(100vw - 30px);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #0e242b4d;
  backdrop-filter: blur(3px);
}
.modal {
  width: 570px;
  border-radius: 28px;
}
.drawer {
  width: 540px;
  height: calc(100dvh - 32px);
  max-height: none;
  max-width: calc(100vw - 32px);
  margin: 16px 16px 16px auto;
  border-radius: 26px;
  animation: drawer-in 0.35s var(--ease);
}
@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal[open] {
  animation: modal-in 0.25s var(--ease);
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 27px 27px 21px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.dialog-head h2 {
  font-size: 22px;
  line-height: 1.4;
}
.dialog-head .eyebrow {
  font-size: 8px;
}
.dialog-body {
  padding: 23px 27px;
}
.dialog-body > p {
  line-height: 1.9;
  font-size: 11px;
  color: var(--muted);
}
.dialog-body .notice {
  font-size: 10px;
  margin-top: 16px;
}
.dialog-section {
  margin-top: 25px;
}
.dialog-section h3 {
  font-size: 12px;
  margin-bottom: 12px;
}
.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.dialog-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.dialog-summary .avatar {
  width: 45px;
  height: 45px;
  font-size: 13px;
}
.dialog-summary > div {
  flex: 1;
}
.dialog-summary h3 {
  font-size: 16px;
}
.dialog-summary small {
  margin-top: 4px;
}
.dimension-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.dimension-card .dimension-line {
  border: 0;
  padding: 0;
}
.dimension-card .dialog-actions {
  margin: 10px 0 0 42px;
}
.rule-card {
  background: var(--surface-2);
  padding: 16px;
  border-radius: 13px;
  font-size: 10px;
  line-height: 1.9;
  color: var(--muted);
}
.rule-card strong {
  color: var(--ink);
}
.timeline {
  border-left: 1px solid var(--line);
  margin-left: 6px;
  padding-left: 20px;
}
.timeline-row {
  position: relative;
  margin: 0 0 17px;
  font-size: 10px;
  line-height: 1.7;
}
.timeline-row:before {
  content: '';
  position: absolute;
  left: -24px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
}
.timeline-row small {
  font-size: 9px;
  margin-top: 3px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 400;
  min-height: 42px;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}
.field small {
  font-size: 9px;
  font-weight: 400;
}
.form-error {
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 11px;
  padding: 12px;
  border-radius: 10px;
  line-height: 1.6;
  margin-top: 16px;
}
.form-error:empty {
  display: none;
}
.form-footer {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 18px 27px;
}
.form-review {
  background: var(--accent-soft);
  border-radius: 13px;
  padding: 13px 16px;
  line-height: 1.9;
  font-size: 10px;
  color: var(--accent-ink);
  margin: 18px 0 0;
}
.search-field {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 14px;
  color: var(--ink);
  font-size: 12px;
}
.search-results {
  max-height: 380px;
  overflow: auto;
  margin-top: 15px;
}
.search-result {
  display: block;
  text-align: left;
  padding: 14px 4px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.search-result small {
  margin-top: 5px;
  font-size: 10px;
}
.toast {
  position: fixed;
  /* Explicit sides: shown as a popover (above open windows) the browser would otherwise center it on the screen. */
  inset: auto auto 25px 50%;
  margin: 0;
  border: 0;
  overflow: visible;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 21px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 14px;
  box-shadow: 0 8px 30px #0002;
  z-index: 100;
  font-size: 11px;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: 90vw;
  line-height: 1.7;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.settings-row {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.settings-row p {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 5px;
}
.switch {
  width: 40px;
  height: 24px;
  border-radius: 20px;
  position: relative;
  background: var(--surface-3);
  flex: none;
}
.switch:after {
  content: '';
  width: 18px;
  height: 18px;
  position: absolute;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.2s;
}
.switch[aria-checked='true'] {
  background: var(--accent);
}
.switch[aria-checked='true']:after {
  transform: translateX(16px);
}
.menu-shade {
  position: fixed;
  inset: 0;
  background: #142a2a77;
  z-index: 24;
}
.muted {
  color: var(--muted);
}
.right {
  text-align: right;
}
.nowrap {
  white-space: nowrap;
}
.overflow-wrap {
  overflow-wrap: anywhere;
}
.spacer {
  height: 20px;
}
.scene-fallback {
  padding: 60px 30px;
  text-align: center;
  line-height: 1.9;
  color: #46655a;
  font-size: 12px;
}
@media (min-width: 1550px) {
  .scene-wrap {
    height: 480px;
  }
  .routine-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .today-item {
    padding: 18px 0;
  }
  .focus-card {
    padding: 27px;
  }
}
@media (max-width: 1250px) {
  .sidebar {
    width: 212px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .workspace-main {
    margin-left: 212px;
  }
  .workspace {
    font-size: 9px;
    gap: 7px;
  }
  .workspace small {
    font-size: 7px;
  }
  .workspace-symbol {
    width: 25px;
  }
  .topbar {
    margin: 0 25px;
  }
  .header-actions {
    gap: 16px;
  }
  main {
    padding: 27px 25px;
  }
  .routine-grid {
    grid-template-columns: minmax(0, 1fr) 267px;
    gap: 16px;
  }
  .overview-strip {
    gap: 12px;
  }
  .stat-card {
    padding: 17px 15px;
  }
  .welcome-card {
    padding: 18px;
  }
  .scene-wrap {
    height: 390px;
  }
  .scene-hint {
    font-size: 8px;
    max-width: 165px;
    line-height: 1.7;
    bottom: 16px;
  }
  .card-head {
    padding: 19px 19px 16px;
  }
  .card-head h2 {
    font-size: 14px;
  }
  .clinic-footer {
    padding: 14px 18px;
  }
  .clinic-footer > small {
    max-width: 130px;
  }
  .nav-link {
    font-size: 10px;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .metrics-grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1050px) {
  .routine-grid {
    grid-template-columns: 1fr;
  }
  .side-stack {
    grid-template-columns: 1fr 1fr;
  }
  .scene-wrap {
    height: 460px;
  }
  .overview-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .welcome-card {
    grid-column: 1/-1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .welcome-card .eyebrow {
    margin-bottom: 0;
  }
  .welcome-card h2 {
    font-size: 16px;
  }
  .welcome-card p {
    margin: 0;
  }
  .lower-grid {
    grid-template-columns: 1fr 1fr;
  }
  .topbar .demo-badge {
    display: none;
  }
  .stat-note {
    font-size: 8px;
  }
  .heading-actions .secondary {
    display: none;
  }
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .money-stat {
    font-size: 19px;
  }
  .form-grid {
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.3s var(--ease);
    width: 238px;
    border-radius: 0 32px 0 0;
  }
  .sidebar.open {
    transform: none;
  }
  .workspace-main {
    margin-left: 0;
  }
  .mobile-menu {
    display: inline-grid;
  }
  .topbar {
    height: 65px;
    margin: 0 18px;
  }
  .breadcrumbs {
    gap: 8px;
    font-size: 9px;
  }
  .header-actions {
    gap: 8px;
  }
  .search-button > span:not(:first-child),
  .search-button kbd {
    display: none;
  }
  .search-button {
    padding: 8px;
  }
  .brand {
    margin-top: 3px;
  }
  .workspace {
    font-size: 10px;
  }
  .workspace small {
    font-size: 8px;
  }
  .nav-link {
    font-size: 11px;
  }
  main {
    padding: 24px 18px 32px;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 10px;
    max-width: 280px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .heading-actions .button {
    font-size: 0;
    width: 39px;
    height: 39px;
    min-height: 39px;
    padding: 0;
  }
  .heading-actions .button .icon {
    width: 18px;
    height: 18px;
  }
  .overview-strip {
    gap: 9px;
    margin-bottom: 17px;
  }
  .welcome-card {
    padding: 15px 17px;
    flex-wrap: wrap;
    gap: 5px 10px;
  }
  .welcome-card .eyebrow {
    font-size: 7px;
  }
  .welcome-card h2 {
    font-size: 14px;
  }
  .welcome-card p {
    font-size: 8px;
    width: 100%;
    margin-top: 3px;
  }
  .stat-card {
    padding: 13px 12px;
  }
  .stat-top {
    font-size: 8px;
    gap: 3px;
  }
  .stat-top .icon {
    width: 13px;
  }
  .stat-bottom {
    display: block;
    margin-top: 6px;
  }
  .stat-value {
    font-size: 24px;
  }
  .stat-note {
    display: block;
    font-size: 8px;
    margin-top: 3px;
  }
  .card-head {
    padding: 19px 18px 14px;
    gap: 10px;
  }
  .card-head h2 {
    font-size: 14px;
  }
  .card-head p {
    font-size: 9px;
  }
  .scene-wrap {
    height: 390px;
  }
  .scene-overlay {
    left: 14px;
  }
  .scene-overlay span {
    font-size: 8px;
  }
  .scene-toolbar {
    bottom: 14px;
    right: 12px;
  }
  .scene-hint {
    left: 14px;
    max-width: 150px;
  }
  .clinic-footer {
    align-items: flex-start;
    padding: 14px 16px;
  }
  .legend {
    gap: 8px;
    font-size: 7px;
  }
  .clinic-footer > small {
    font-size: 7px;
    max-width: 130px;
  }
  .view-switch button {
    font-size: 8px;
    padding: 5px 8px;
  }
  .view-switch button .icon {
    display: none;
  }
  .side-stack {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .focus-card {
    padding: 18px;
  }
  .focus-number {
    font-size: 34px;
  }
  .focus-top {
    gap: 10px !important;
  }
  .focus-card h2 {
    font-size: 15px;
  }
  .focus-card p {
    font-size: 9px;
  }
  .focus-card .text-link {
    font-size: 9px;
    line-height: 1.6;
  }
  .today-list {
    padding: 0 16px 6px;
  }
  .today-item {
    gap: 8px;
    padding: 12px 0;
  }
  .today-item strong {
    font-size: 9px;
  }
  .today-item small {
    font-size: 8px;
  }
  .today-item time {
    font-size: 8px;
  }
  .lower-grid {
    grid-template-columns: 1fr;
    gap: 17px;
    margin-top: 18px;
  }
  .tasks-card {
    height: 460px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid,
  .metrics-grid.four {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .metrics-grid .stat-card:last-child:nth-child(3) {
    grid-column: 1/-1;
  }
  .money-stat {
    font-size: 20px;
  }
  .table-toolbar {
    padding: 14px 16px;
  }
  .filter-input {
    min-width: 180px;
    width: 100%;
  }
  .filter-input input {
    width: 100%;
  }
  th,
  td {
    padding: 14px 16px;
  }
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .step-card {
    padding: 19px 16px;
  }
  .process-steps .step-card:last-child {
    grid-column: 1/-1;
  }
  .rooms-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px 16px 20px;
  }
  .app-footer {
    padding: 0 18px 20px;
    line-height: 1.8;
    flex-direction: column;
    gap: 4px;
    font-size: 8px;
  }
  .drawer {
    width: 100%;
    height: calc(100dvh - 16px);
    margin: 8px;
    max-width: calc(100vw - 16px);
    border-radius: 22px;
  }
  .dialog-head {
    padding: 22px;
  }
  .dialog-body {
    padding: 20px 22px;
  }
  .dialog-head h2 {
    font-size: 20px;
  }
  .modal {
    max-width: calc(100vw - 20px);
    border-radius: 23px;
  }
  .form-footer {
    padding: 17px 22px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .dimension-card .dialog-actions {
    margin-left: 0;
  }
  .notice {
    font-size: 10px;
    padding: 12px 14px;
  }
  .kanban {
    grid-template-columns: repeat(4, 240px);
  }
  .tag {
    font-size: 8px;
  }
}
@media (max-width: 400px) {
  .scene-wrap {
    height: 345px;
  }
  .side-stack {
    grid-template-columns: 1fr;
  }
  .welcome-card .eyebrow {
    width: 100%;
    margin-bottom: 4px;
  }
  .scene-hint {
    max-width: 130px;
  }
  .stat-top .icon {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
html.reduce-motion *,
html.reduce-motion *:before,
html.reduce-motion *:after {
  animation-duration: 0.01ms !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}
/* Keep dense operational panels within the viewport and their own scroll area. */
.card,
.workspace-main,
.side-stack,
.routine-grid,
.lower-grid,
.task-row > div {
  min-width: 0;
}
.lower-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
}
@media (max-width: 1050px) {
  .lower-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Tighter spacing keeps the menu and the footer visible at common heights. */
@media (min-width: 761px) and (max-height: 1012px) {
  .sidebar {
    padding-top: 22px;
  }
  .brand {
    margin-bottom: 20px;
  }
  .workspace {
    margin-bottom: 16px;
  }
  .nav-link {
    height: 32px;
    margin: 2px 0;
  }
  .nav-selection {
    height: 71px;
  }
  .sidebar-bottom {
    padding-top: 15px;
  }
  .method-link {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .profile {
    padding-top: 12px;
  }
  .nav-label {
    font-size: 8px;
  }
}

/* Each tier starts where the previous one stops fitting (970, 852 and 730px of content; the narrower 212px sidebar wraps two footer labels and needs about 22px more), so the menu of daily work and the footer stay reachable without scrolling; with the simulations open the sidebar scrolls and app.js keeps the screen in use in sight. The selection keeps link height + 39px because positionNav offsets it by a fixed 19px. */
@media (min-width: 761px) and (max-height: 895px) {
  .sidebar {
    padding-top: 16px;
    padding-bottom: 14px;
  }
  .brand {
    margin-bottom: 10px;
  }
  .workspace {
    margin-bottom: 8px;
  }
  .nav-group + .nav-group {
    margin-top: 10px;
  }
  .nav-link {
    height: 26px;
    margin: 1px 0;
  }
  .nav-selection {
    height: 65px;
  }
  .sidebar-bottom {
    padding-top: 8px;
  }
}
@media (min-width: 761px) and (max-height: 772px) {
  .sidebar {
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .brand {
    margin-bottom: 10px;
  }
  .workspace {
    padding-top: 9px;
    padding-bottom: 9px;
    margin-bottom: 10px;
  }
  .nav-label {
    margin-bottom: 6px;
  }
  .nav-group + .nav-group {
    margin-top: 10px;
  }
  .nav-link {
    height: 24px;
    margin: 1px 0;
    line-height: 1.1;
  }
  .nav-selection {
    height: 63px;
  }
  .method-link {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .profile {
    padding-top: 8px;
  }
}
/* Telas mais baixas (1366×657 e afins): o menu ganhou Repasses no bloco 10.5 e precisa de mais um degrau; a Minha
   rotina (bloco 11B.2) apertou cada degrau baixo um pouco mais. */
@media (min-width: 761px) and (max-height: 700px) {
  .nav-group + .nav-group {
    margin-top: 4px;
  }
  .nav-label {
    margin-bottom: 5px;
  }
  .nav-link {
    height: 24px;
    margin: 0;
    line-height: 1.05;
  }
  .nav-selection {
    height: 63px;
  }
}
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

/* Leitura do campo numérico (numero-br.js): como o valor digitado foi entendido, ou por que foi recusado. */
.numero-leitura {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-ink);
}
.numero-leitura:empty {
  display: none;
}
.numero-leitura.invalido {
  color: var(--danger);
}

/* Minha rotina (bloco 11B.2): a lista do que é da pessoa hoje, ao lado da agenda do dia. */
.rt-list {
  list-style: none;
  margin: 0;
  padding: 0 24px 22px;
  display: grid;
  gap: 10px;
}
.rt-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.rt-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.rt-list small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.rt-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 17px;
  align-items: start;
}
.rt-card .card-head {
  flex-wrap: wrap;
  gap: 10px;
}
/* Véspera e fechamento do dia (bloco 11B.3): os títulos de cada parte do fechamento e as respostas da véspera. */
.rt-section {
  margin: 4px 24px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
/* A véspera cabe no cartão: o contato quebra linha e o botão fica embaixo dele. */
.rt-card .biz-table td small {
  white-space: normal;
  overflow-wrap: anywhere;
}
.rt-card .biz-table th:first-child,
.rt-card .biz-table td:first-child {
  min-width: 0;
  width: 56px;
}
.rt-eve-act {
  margin-top: 8px;
}
.rt-closed {
  margin: 0 24px 16px;
}
.rt-outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border: 0;
  padding: 0;
  margin: 12px 0;
  font-size: 12px;
}
.rt-outcomes legend {
  font-weight: 700;
  margin-bottom: 6px;
}

/* Salas (bloco 12.1a): o cartão fica embaixo do painel de Salas e unidade, e a recusa lista o que ocupa a sala. */
.rm-root {
  margin-top: 20px;
}
.rm-held {
  margin: 8px 0 0 18px;
  font-size: 12px;
  line-height: 1.6;
}

/* Aparelhos (bloco 12.1b): os serviços que cada aparelho faz, escolhidos numa lista. */
.eq-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 14px;
  border: 0;
  padding: 0;
  margin: 14px 0 6px;
  font-size: 12px;
}
.eq-services legend {
  font-weight: 700;
  margin-bottom: 8px;
}
/* Os botões de cada aparelho quebram linha em vez de passar da borda do cartão. */
.eq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 220px;
}

/* Pacotes do catálogo (bloco 12.3a): a ordem dos serviços, na lista e no diálogo. */
.pk-order {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
}
.pk-services {
  border: 0;
  padding: 0;
  margin: 14px 0 6px;
}
.pk-services legend {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 8px;
}
.pk-chosen {
  margin: 0 0 10px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 12px;
}
.pk-chosen li span:first-child {
  display: inline-block;
  min-width: 220px;
}
.pk-chosen .icon-button {
  margin-left: 4px;
}

/* Booking a package from the agenda (block 12.3b2). */
.pb-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 16px;
}
.pb-parts {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.pb-part {
  border: 1px solid var(--line, #d9e0dc);
  border-radius: 10px;
  padding: 10px 12px;
}
.pb-part-open {
  border-color: var(--danger, #b3402e);
}
.pb-part-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 10px;
}
.pb-part-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.pb-part-fields select {
  width: 100%;
  min-width: 0;
}
.pb-now {
  display: block;
  color: var(--muted, #5b6b64);
  margin-top: 2px;
}
.pb-problem {
  color: var(--danger, #b3402e);
  margin: 8px 0 0;
}
.pb-total {
  margin: 12px 0 0;
  text-align: right;
}
@media (max-width: 520px) {
  .pb-part-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The materials of the clinic (block 12.4a). */
.mt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.mt-history {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.6;
}
.biz-field.mt-use {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.mt-use input {
  width: 100%;
  min-width: 0;
}

/* The contacts of private patients (block 13.2). */
.ct-late td:first-child {
  box-shadow: inset 3px 0 0 var(--danger);
}
.ct-late {
  background: var(--danger-soft);
}
.ct-choices {
  display: grid;
  gap: 8px;
}
/* The fields of a new patient matter only when it is the choice: hidden, the grid does not show them. */
.ct-choices [hidden] {
  display: none;
}
.ct-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.ct-choice:has(input:checked) {
  border-color: var(--accent, #13584f);
  background: var(--surface-2);
}
.ct-choice span {
  display: grid;
  gap: 2px;
}
.ct-choice small {
  color: var(--muted);
}
.co-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.co-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.co-list h3 {
  margin: 0;
  font-size: 15px;
}
.co-list ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.co-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.co-list li > span:first-child {
  flex: 1;
}

/* The quote and the contact before (block 13.3). */
.ct-previous {
  color: var(--danger);
}
.ct-before {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
}
.ct-before[hidden] {
  display: none;
}
.ct-quote-list {
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}
.ct-quote-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.ct-quote-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--surface-2);
}
.ct-quote-total {
  margin: 10px 0 0;
  text-align: right;
  font-weight: 600;
}

/* The management of the clinic (block 13.4). */
.mg-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}
.mg-toolbar .biz-field {
  min-width: 220px;
  margin: 0;
}
.mg-toolbar p {
  margin: 0 0 10px;
  color: var(--muted);
}
.mg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.mg-card {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 20px 22px;
}
.mg-value.mg-empty {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}
.mg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.mg-head h2 {
  margin: 0;
  font-size: 16px;
}
.mg-value {
  margin: 4px 0 0;
  font-size: 36px;
  font-weight: 650;
  line-height: 1.1;
  color: var(--accent);
}
.mg-before {
  margin: 0;
  color: var(--muted);
}
.mg-parts {
  margin: 6px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}
.mg-definition {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.mg-late {
  color: var(--danger);
}
.mg-sides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.mg-side h3 {
  margin: 0 0 4px;
  font-size: 13px;
}
.mg-side p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
  margin: 2px 0;
}
.mg-side p span {
  color: var(--muted);
}
.mg-pending {
  margin-top: 16px;
}
.mg-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

/* The Clínica 3D reading the database (block 13.5). */
.cm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.cm-map {
  padding: 14px;
}
.cm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
}
.cm-legend i,
.cm-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.cm-stage {
  height: 400px;
  border-radius: 14px;
  overflow: hidden;
}
.cm-panel {
  padding: 18px 20px;
}
.cm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.cm-head h2 {
  margin: 0;
  font-size: 17px;
}
.cm-panel h3 {
  margin: 14px 0 6px;
  font-size: 13px;
}
.cm-state {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  color: #fff;
  background: var(--cm-color);
}
.cm-hint {
  margin: 4px 0;
  color: var(--muted);
}
.cm-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.cm-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.cm-list small {
  display: block;
  color: var(--muted);
}
.cm-late {
  color: var(--danger);
}
.cm-places {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cm-places button {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.cm-places button[aria-pressed='true'] {
  border-color: var(--accent);
}
.cm-places small {
  grid-column: 2;
  color: var(--muted);
}
.cm-unplaced {
  margin-top: 16px;
  padding: 18px 20px;
}
@media (max-width: 1100px) {
  .cm-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .cm-stage {
    height: auto;
    overflow: visible;
  }
}
.cm-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cm-line > div {
  min-width: 0;
}
.cm-line .button {
  flex: none;
}
.cm-ask {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--warn);
  border-radius: 12px;
  background: var(--warn-soft);
}
.cm-ask p {
  margin: 0 0 10px;
}
.cm-ask-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
