.cp-workspace {
  --cp-gap: 20px;
}
.cp-workspace .page-heading {
  margin-bottom: 19px;
}
.cp-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 15px;
  margin-bottom: 23px;
}
.cp-session-icon {
  color: var(--accent);
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
}
.cp-session p {
  display: flex;
  align-items: baseline;
  gap: 11px;
  flex: 1;
  flex-wrap: wrap;
  font-size: 10px;
  line-height: 1.6;
}
.cp-session p span {
  color: var(--muted);
  font-size: 10px;
}
.cp-session-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-ink);
  font-size: 9px;
  white-space: nowrap;
}
.cp-session-badge .icon {
  width: 13px;
  height: 13px;
}
.cp-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 23px;
  flex-wrap: wrap;
}
.cp-tabs {
  display: flex;
  gap: 5px;
  background: var(--surface-3);
  padding: 5px;
  border-radius: 16px;
  max-width: 100%;
  overflow-x: auto;
}
.cp-tab {
  padding: 10px 13px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 10px;
  color: var(--muted);
}
.cp-tab .icon {
  width: 15px;
  height: 15px;
}
.cp-tab[aria-current='page'] {
  background: var(--surface);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
  font-weight: 700;
}
.cp-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.cp-controls label {
  display: grid;
  gap: 6px;
}
.cp-controls label > span {
  font-size: 8px;
  letter-spacing: 0.3px;
  color: var(--muted);
}
.cp-controls select,
.cp-controls input {
  max-width: 220px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 10px;
  min-height: 38px;
}
.cp-overview {
  display: grid;
  grid-template-columns: minmax(280px, 1.8fr) repeat(3, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 23px;
}
.cp-room-hero {
  padding: 22px 24px;
  background: var(--hero);
  color: var(--hero-ink);
  border: 0;
  position: relative;
  overflow: hidden;
}
.cp-room-hero:after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  border: 20px solid #ffffff04;
  right: -70px;
  top: -65px;
  border-radius: 50%;
  box-shadow: 0 0 0 20px #ffffff03;
  pointer-events: none;
}
.cp-room-hero > .eyebrow {
  color: var(--hero-muted);
  font-size: 8px;
  letter-spacing: 0.8px;
  margin-bottom: 13px;
}
.cp-room-hero > .eyebrow .icon {
  width: 15px;
  height: 15px;
}
.cp-room-hero h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  font-weight: 600;
  line-height: 1.35;
}
.cp-room-hero > p {
  font-size: 10px;
  color: var(--hero-muted);
  margin-top: 7px;
  line-height: 1.65;
}
.cp-allocation-list {
  display: grid;
  gap: 9px;
  margin-top: 17px;
  max-height: 232px;
  overflow: auto;
  font-size: 10px;
  scrollbar-width: thin;
}
.cp-allocation-list > span {
  line-height: 1.8;
  color: var(--hero-muted);
  font-size: 10px;
}
.cp-allocation-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-top: 9px;
  border-top: 1px solid #ffffff20;
}
.cp-allocation-list > div > span {
  display: flex;
  gap: 5px;
  align-items: center;
  white-space: nowrap;
  color: var(--hero-muted);
  font-size: 9px;
}
.cp-allocation-list > div > span .icon {
  width: 12px;
  height: 12px;
}
.cp-allocation-list strong {
  text-align: right;
  font-size: 9px;
  line-height: 1.6;
}
.cp-allocation-list strong small {
  color: var(--hero-muted);
  font-size: 8px;
}
.cp-stat {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
}
.cp-stat > span {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}
.cp-stat .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.cp-stat > strong {
  font-size: 39px;
  letter-spacing: -1.6px;
  font-weight: 500;
  line-height: 1.1;
}
.cp-stat > small {
  font-size: 9px;
}
.cp-agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: start;
}
.cp-agenda {
  overflow: hidden;
}
.cp-appointments {
  padding: 0 23px;
}
.cp-appointment {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 23px 0;
  border-top: 1px solid var(--line);
  position: relative;
  min-height: 107px;
}
.cp-appointment-time {
  min-width: 40px;
  align-self: flex-start;
  margin-top: 3px;
}
.cp-appointment-time strong {
  font-size: 12px;
  font-weight: 700;
}
.cp-appointment-time small {
  font-size: 9px;
  margin-top: 6px;
}
.cp-time-dot {
  height: 7px;
  width: 7px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 50%;
  flex: none;
  align-self: flex-start;
  margin-top: 8px;
  position: relative;
}
.cp-time-dot.active {
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: var(--accent);
}
.cp-appointment .avatar {
  width: 36px;
  height: 36px;
  font-size: 10px;
}
.cp-appointment-person {
  flex: 1;
  min-width: 0;
}
.cp-appointment-person h3 {
  font-size: 12px;
  line-height: 1.5;
}
.cp-appointment-person p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 5px;
}
.cp-appointment-person p span {
  margin: 0 4px;
}
.cp-appointment-person small {
  font-size: 8px;
  margin-top: 2px;
}
/* What was booked: service, who pays and the value. */
.cp-appointment-person p.cp-appointment-service {
  margin-top: 3px;
}
.cp-appointment-person p.cp-appointment-service strong {
  color: var(--ink);
  font-weight: 600;
}
.cp-appointment-person p.cp-appointment-service small {
  display: inline;
  font-size: 9px;
  margin-left: 4px;
}
.cp-hint {
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}
/* With three or more acts in a line, they go two by two so the line does not grow tall. */
@media (min-width: 701px) {
  .cp-appointment-actions:has(> :nth-child(3)) {
    display: grid;
    grid-template-columns: repeat(2, auto);
  }
}
/* The free times offered while booking: one group for each shift of the professional on the day. */
.cp-slots {
  display: grid;
  gap: 10px;
}
.cp-slots-title {
  font-size: 11px;
  font-weight: 700;
}
.cp-slots-shift {
  display: grid;
  gap: 6px;
}
.cp-slots-shift > span,
.cp-slots-shift small {
  font-size: 9px;
  color: var(--muted);
}
.cp-slots-shift > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cp-slot {
  font: inherit;
  font-size: 11px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.cp-slot:hover,
.cp-slot:focus-visible {
  border-color: var(--accent);
}
.cp-slot[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
/* The money of an appointment: its state in the line, its account and its receipts in the window. */
.cp-appointment-person p.cp-appointment-payment {
  margin-top: 2px;
  font-weight: 600;
  color: var(--ink);
}
.cp-appointment-person p.cp-appointment-payment.cp-paid {
  color: var(--accent-ink);
}
.cp-appointment-person p.cp-appointment-payment.cp-unpaid,
.cp-appointment-person p.cp-appointment-payment.cp-refund {
  color: var(--danger);
}
.cp-account {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.cp-account > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.cp-account span,
.cp-account small {
  font-size: 9px;
  color: var(--muted);
}
.cp-account strong {
  font-size: 16px;
  font-weight: 600;
}
.cp-payments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cp-payments li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.cp-payments li > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.cp-payments strong {
  font-size: 11px;
  font-weight: 600;
}
.cp-payments small {
  font-size: 9px;
  color: var(--muted);
}
.cp-payments li.cp-voided strong {
  text-decoration: line-through;
  color: var(--muted);
}
.cp-payments .cp-void-note {
  color: var(--danger);
}
/* The real times of the steps already registered. */
.cp-appointment-person p.cp-appointment-times {
  margin-top: 2px;
  color: var(--ink);
}
/* The numbers the unit decides. */
.cp-parameters-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 25px 23px;
}
.cp-parameters-form .cp-field small {
  font-size: 9px;
  line-height: 1.5;
  color: var(--muted);
}
.cp-parameters-form .cp-form-error,
.cp-parameters-actions {
  grid-column: 1/-1;
}
@media (max-width: 900px) {
  .cp-parameters-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Dados da clínica (block 10.7): what goes in the head of proposals and charges. */
.cp-identity {
  margin-bottom: 18px;
}
.cp-identity-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0 25px 23px;
}
.cp-identity-address,
.cp-identity-logo,
.cp-identity-saved,
.cp-identity-form .cp-form-error,
.cp-identity-form .cp-parameters-actions {
  grid-column: 1/-1;
}
.cp-identity-logo img {
  justify-self: start;
  max-height: 64px;
  max-width: 220px;
  object-fit: contain;
}
.cp-identity-logo small,
.cp-identity-saved {
  color: var(--muted);
}
.cp-identity-logo .cp-check {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}
.cp-identity-logo .cp-check input {
  width: auto;
  margin: 0;
}
@media (max-width: 900px) {
  .cp-identity-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Waiting room (waiting.js). */
.wt-context {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 16px;
}
.wt-context span,
.wt-person p span {
  margin: 0 4px;
}
.wt-date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 9px;
  color: var(--muted);
}
.wt-date input {
  font: inherit;
  font-size: 11px;
  color: var(--ink);
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.wt-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.wt-stat.wt-alert strong {
  color: var(--danger, #b3412f);
}
.wt-group {
  margin-bottom: 16px;
}
.wt-rows {
  display: grid;
}
.wt-row {
  display: grid;
  grid-template-columns: 62px 36px minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 25px;
  border-top: 1px solid var(--line);
}
.wt-time strong,
.wt-told strong {
  display: block;
  font-size: 12px;
}
.wt-time small,
.wt-told small,
.wt-person p {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.7;
}
.wt-person {
  min-width: 0;
}
.wt-person h3 {
  font-size: 12px;
  line-height: 1.5;
}
.wt-mark {
  text-align: right;
}
.wt-empty,
.wt-foot {
  font-size: 10px;
  color: var(--muted);
  padding: 4px 25px 20px;
}
.wt-foot {
  padding: 4px 0 0;
}
.wt-foot a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
}
@media (max-width: 1100px) {
  .wt-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wt-row {
    grid-template-columns: 54px 36px minmax(0, 1fr);
  }
  .wt-told,
  .wt-mark {
    grid-column: 3;
    text-align: left;
  }
}
/* Why an appointment will not happen, where it came from, whether it was fitted in. */
.cp-appointment-person p.cp-appointment-note {
  margin-top: 2px;
  font-style: italic;
}
/* The return or the exam a consultation asked for. */
.cp-appointment-person p.cp-appointment-origin {
  margin-top: 2px;
  color: var(--accent);
  font-weight: 600;
}
.cp-appointment.cp-closed .cp-appointment-time,
.cp-appointment.cp-closed .avatar,
.cp-appointment.cp-closed .cp-appointment-person h3,
.cp-appointment.cp-closed .cp-appointment-service {
  opacity: 0.55;
}
.cp-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.cp-history li {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
.cp-history strong {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}
.cp-history small {
  font-size: 9px;
  color: var(--muted);
}
.cp-history-box summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
}
.cp-hint a {
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: underline;
}
.cp-booking {
  display: grid;
  grid-template-columns: inherit;
  gap: inherit;
}
.cp-appointment > .button {
  font-size: 9px;
  padding: 8px 10px;
}
.cp-appointment > .tag {
  font-size: 8px;
}
.cp-card-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 16px 23px;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.8;
}
.cp-card-footer .icon {
  width: 14px;
  height: 14px;
}
.cp-aside {
  display: grid;
  gap: 17px;
}
.cp-continuity,
.cp-doc-teaser {
  padding: 23px;
}
.cp-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}
.cp-continuity h2 {
  margin-top: 19px;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.5px;
}
.cp-continuity p,
.cp-doc-teaser p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 11px;
}
.cp-continuity .button,
.cp-doc-teaser .button {
  padding-left: 0;
  justify-content: flex-start;
  color: var(--accent-ink);
  margin-top: 13px;
  white-space: normal;
  text-align: left;
}
.cp-doc-teaser h3 {
  margin-top: 13px;
  font-size: 13px;
}
.cp-patient-list {
  overflow: hidden;
}
.cp-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 24px 10px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.cp-search .icon {
  height: 16px;
  width: 16px;
}
.cp-search input {
  border: 0;
  outline-offset: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 3px;
}
.cp-search-state {
  font-size: 9px;
  white-space: nowrap;
}
.cp-patient-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 21px 24px;
  border-top: 1px solid var(--line);
}
.cp-patient-row > div {
  flex: 1;
  min-width: 0;
}
.cp-patient-row h3 {
  font-size: 12px;
  line-height: 1.6;
}
.cp-patient-row p {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
  line-height: 1.65;
}
.cp-patient-row small {
  font-size: 9px;
  margin-top: 3px;
}
.cp-patient-row .avatar {
  width: 38px;
  height: 38px;
  font-size: 10px;
}
.cp-document-intro {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: flex-start;
  padding: 9px 0 25px;
}
.cp-document-intro h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  line-height: 1.4;
}
.cp-document-intro p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 11px;
  max-width: 650px;
}
.cp-document-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cp-document-card {
  padding: 27px;
  display: grid;
  grid-template-columns: 43px 1fr;
  column-gap: 14px;
}
.cp-document-card h2 {
  font-size: 16px;
  line-height: 1.5;
}
.cp-document-card p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
  margin-top: 7px;
}
.cp-document-placeholder {
  grid-column: 1/-1;
  position: relative;
  margin: 26px 0 20px;
  padding: 25px 30px 30px;
  min-height: 180px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px dashed var(--line);
  opacity: 0.8;
  overflow: hidden;
}
.cp-paper-logo {
  display: block;
  color: var(--accent);
  font-size: 26px;
  letter-spacing: -1.8px;
  font-weight: 800;
  margin-bottom: 29px;
}
.cp-paper-logo > span {
  display: block;
  color: var(--muted);
  font-size: 6px;
  letter-spacing: 1.8px;
  margin-top: 2px;
}
.cp-document-placeholder > span:not(:first-child) {
  display: block;
  width: 78%;
  height: 5px;
  border-radius: 4px;
  background: var(--line);
  margin-top: 11px;
}
.cp-document-placeholder > span:nth-child(3) {
  width: 95%;
}
.cp-document-placeholder > span:nth-child(4) {
  width: 60%;
}
.cp-document-placeholder > i {
  display: block;
  margin: 25px auto 0;
  height: 1px;
  background: var(--line);
  width: 45%;
}
.cp-document-status {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 15px;
}
.cp-document-status .icon {
  height: 14px;
  width: 14px;
}
.cp-document-card > .button {
  grid-column: 1/-1;
  justify-self: start;
  white-space: normal;
  text-align: left;
  opacity: 0.7;
}
.cp-document-steps {
  margin-top: 22px;
  padding: 24px 27px;
}
.cp-document-steps > h3 {
  font-size: 12px;
}
.cp-document-steps > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 20px;
}
.cp-document-steps > div > div {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.cp-document-steps > div > div > span {
  background: var(--surface-3);
  color: var(--accent-ink);
  border-radius: 9px;
  padding: 9px;
  font-size: 9px;
  font-weight: 700;
}
.cp-document-steps strong {
  font-size: 10px;
}
.cp-document-steps small {
  font-size: 9px;
  margin-top: 6px;
}
.cp-management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.cp-managed-list {
  padding: 0 23px;
}
.cp-managed-list > div:not(.cp-empty) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.cp-managed-list p {
  flex: 1;
  min-width: 0;
}
.cp-managed-list strong {
  font-size: 11px;
  line-height: 1.6;
}
.cp-managed-list small {
  font-size: 9px;
  margin-top: 4px;
}
.cp-managed-list > div > span:last-child:not(.avatar):not(.cp-feature-icon) {
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.cp-managed-list .cp-feature-icon {
  width: 34px;
  height: 34px;
}
.cp-managed-list .avatar {
  width: 34px;
  height: 34px;
  font-size: 10px;
}
.cp-access-card {
  display: flex;
  gap: 17px;
  align-items: flex-start;
  grid-column: 1/-1;
  padding: 25px;
}
.cp-access-card > div {
  flex: 1;
}
.cp-access-card h2 {
  font-size: 15px;
}
.cp-access-card p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 9px;
  max-width: 720px;
}
.cp-seed {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 25px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-top: 22px;
}
.cp-seed strong {
  font-size: 12px;
}
.cp-seed p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 7px;
}
.cp-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  min-height: 250px;
  padding: 40px 25px;
  color: var(--muted);
  font-size: 12px;
}
.cp-spinner {
  height: 22px;
  width: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cp-spin 1s linear infinite;
}
@keyframes cp-spin {
  to {
    transform: rotate(360deg);
  }
}
.cp-error {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 23px;
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 20%, transparent);
  border-radius: 15px;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.8;
}
.cp-error > div {
  flex: 1;
}
.cp-error strong {
  font-size: 12px;
}
.cp-error p {
  font-size: 11px;
  margin-top: 6px;
}
.cp-empty {
  padding: 40px 25px;
  text-align: center;
  color: var(--muted);
}
.cp-empty > .icon {
  width: 29px;
  height: 29px;
  margin-bottom: 14px;
  opacity: 0.7;
}
.cp-empty h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}
.cp-empty p {
  font-size: 11px;
  line-height: 1.8;
  margin: 9px auto 0;
  max-width: 400px;
}
.cp-empty > .button {
  margin-top: 17px;
}
.cp-workspace .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* Patient workspace and forms are isolated from the operational demonstration. */
.cp-record,
.cp-action-dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 90px #0003;
  overscroll-behavior: contain;
}
.cp-record {
  width: 930px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
}
.cp-action-dialog {
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
}
.cp-record::backdrop,
.cp-action-dialog::backdrop {
  background: #0b282a70;
  backdrop-filter: blur(3px);
}
.cp-record-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  padding: 25px 29px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 2;
}
.cp-record-head h2 {
  font-size: 21px;
  line-height: 1.4;
  letter-spacing: -0.6px;
}
.cp-record-head .eyebrow {
  font-size: 8px;
  line-height: 1.7;
}
.cp-record-head .icon-button {
  background: var(--surface-2);
}
.cp-record-body {
  padding: 25px 29px 30px;
}
.cp-patient-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.cp-patient-summary > .avatar {
  width: 46px;
  height: 46px;
  font-size: 13px;
}
.cp-patient-summary > div {
  flex: 1;
}
.cp-patient-summary h3 {
  font-size: 15px;
  line-height: 1.6;
}
.cp-patient-summary p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  margin-top: 4px;
}
.cp-patient-summary small {
  font-size: 10px;
  margin-top: 4px;
}
.cp-persistent-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0 28px;
}
.cp-persistent-summary > section {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 14px;
  padding: 18px;
}
.cp-persistent-summary h3 {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 13px;
}
.cp-persistent-summary .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.cp-persistent-summary p {
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cp-persistent-summary small {
  font-size: 9px;
  line-height: 1.7;
  margin-top: 11px;
}
.cp-unrecorded {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.cp-clinical-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 22px 0;
}
.cp-clinical-heading h3 {
  font-size: 14px;
}
.cp-clinical-heading p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 7px;
}
.cp-context-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 24px;
}
.cp-encounter-timeline {
  display: grid;
  gap: 21px;
}
.cp-encounter {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.cp-encounter-meta {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 22px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.cp-timeline-dot {
  height: 32px;
  width: 32px;
  display: grid;
  place-items: center;
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 50%;
  flex: none;
}
.cp-timeline-dot.final {
  color: var(--accent);
  background: var(--accent-soft);
}
.cp-timeline-dot .icon {
  height: 14px;
  width: 14px;
}
.cp-encounter-meta > div {
  flex: 1;
}
.cp-encounter-meta strong {
  font-size: 12px;
  line-height: 1.6;
}
.cp-encounter-meta p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 5px;
}
.cp-encounter-meta small {
  font-size: 9px;
  line-height: 1.7;
  margin-top: 5px;
}
.cp-encounter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 28px;
  padding: 22px;
}
.cp-encounter-fields h4,
.cp-addenda h4 {
  font-size: 9px;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.7;
}
.cp-encounter-fields p {
  font-size: 11px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cp-encounter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
}
.cp-encounter-footer > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  line-height: 1.7;
  color: var(--muted);
}
.cp-encounter-footer .icon {
  width: 12px;
  height: 12px;
}
.cp-addenda {
  margin: 0 22px 22px;
  padding: 17px 18px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.cp-addenda > section {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
}
.cp-addenda p {
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  margin-bottom: 10px;
}
.cp-addenda small {
  font-size: 9px;
  margin-top: 5px;
  line-height: 1.8;
}
.cp-record-document-note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
}
.cp-record-document-note .icon {
  width: 15px;
  height: 15px;
}
.cp-form-grid,
.cp-clinical-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.cp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.cp-field > span {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.65;
}
.cp-field input,
.cp-field textarea,
.cp-field select {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 12px 13px;
  font-size: 11px;
  line-height: 1.7;
  width: 100%;
  min-width: 0;
  transition: border-color 0.2s;
}
.cp-field input:focus,
.cp-field textarea:focus,
.cp-field select:focus {
  border-color: var(--accent);
}
.cp-field textarea {
  resize: vertical;
  min-height: 100px;
}
.cp-full {
  grid-column: 1/-1;
}
.cp-field[hidden] {
  display: none;
}
.cp-form-error {
  padding: 13px 15px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 11px;
  margin-top: 20px;
}
.cp-editor-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 17px 19px;
  margin-bottom: 19px;
}
.cp-editor-context strong {
  font-size: 12px;
}
.cp-editor-context small {
  font-size: 10px;
  line-height: 1.8;
  margin-top: 6px;
}
.cp-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.cp-editor-footer > span {
  font-size: 9px;
  line-height: 1.8;
  color: var(--muted);
}
.cp-editor-footer > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cp-editor-footer .button {
  padding: 11px 14px;
  font-size: 10px;
}
.cp-action-dialog .cp-record-head {
  padding: 23px 25px;
}
.cp-action-dialog .cp-record-head h2 {
  font-size: 18px;
}
.cp-action-body {
  padding: 23px 25px;
}
.cp-action-description {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 23px;
}
.cp-action-footer {
  padding: 19px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}
.cp-finalize-review {
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cp-finalize-review strong {
  font-size: 12px;
}
.cp-finalize-review p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.8;
}
.cp-finalize-review small {
  font-size: 10px;
  margin-top: 7px;
}
@media (min-width: 1500px) {
  .cp-agenda-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .cp-appointment {
    gap: 18px;
  }
  .cp-stat {
    padding: 25px;
  }
  .cp-room-hero {
    padding: 25px;
  }
  .cp-overview {
    grid-template-columns: minmax(320px, 1.6fr) repeat(3, minmax(150px, 1fr));
  }
}
@media (max-width: 1200px) {
  .cp-overview {
    grid-template-columns: 1.5fr 1fr;
  }
  .cp-stat {
    padding: 20px;
    gap: 10px;
  }
  .cp-agenda-layout {
    grid-template-columns: 1fr;
  }
  .cp-aside {
    grid-template-columns: 1fr 1fr;
  }
  .cp-continuity h2 {
    margin-top: 10px;
  }
  .cp-continuity {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
  }
  .cp-continuity h2 {
    margin-top: 0;
  }
  .cp-continuity p,
  .cp-continuity .button {
    grid-column: 2;
  }
  .cp-session p {
    display: block;
  }
  .cp-session p span {
    display: block;
    margin-top: 3px;
  }
  .cp-management-grid {
    grid-template-columns: 1fr;
  }
  .cp-access-card {
    grid-column: auto;
  }
  .cp-document-steps > div {
    gap: 18px;
  }
}
@media (max-width: 700px) {
  .cp-workspace .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .cp-workspace h1 {
    font-size: 26px;
  }
  .cp-session {
    padding: 13px;
    align-items: flex-start;
    gap: 10px;
  }
  .cp-session-badge {
    font-size: 0;
    gap: 0;
    padding: 7px 0;
  }
  .cp-session-badge .icon {
    width: 15px;
    height: 15px;
  }
  .cp-toolbar {
    display: block;
    margin-bottom: 19px;
  }
  .cp-tabs {
    padding: 4px;
    gap: 2px;
    justify-content: space-between;
    border-radius: 13px;
  }
  .cp-tab {
    padding: 10px;
    gap: 6px;
    font-size: 9px;
    border-radius: 10px;
  }
  .cp-tab .icon {
    width: 14px;
    height: 14px;
  }
  .cp-controls {
    margin-top: 15px;
    gap: 10px;
  }
  .cp-controls label {
    flex: 1;
    min-width: 0;
  }
  .cp-controls input,
  .cp-controls select {
    width: 100%;
    max-width: none;
    min-width: 0;
    font-size: 10px;
  }
  .cp-overview {
    gap: 12px;
    grid-template-columns: 1fr 1fr;
  }
  .cp-room-hero {
    grid-column: 1/-1;
    padding: 21px;
  }
  .cp-stat {
    padding: 17px;
    min-height: 125px;
  }
  .cp-stat:last-child {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 15px;
    min-height: 85px;
    align-items: center;
  }
  .cp-stat:last-child > strong {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 31px;
  }
  .cp-stat > strong {
    font-size: 32px;
  }
  .cp-stat > span {
    font-size: 9px;
  }
  .cp-stat > small {
    font-size: 8px;
  }
  .cp-agenda .card-head {
    padding: 20px 18px;
    align-items: flex-start;
  }
  .cp-agenda .card-head h2 {
    font-size: 14px;
  }
  .cp-agenda .card-head p {
    font-size: 9px;
  }
  .cp-agenda .card-head .button {
    padding: 8px 10px;
  }
  .cp-appointments {
    padding: 0 18px;
  }
  .cp-appointment {
    display: grid;
    grid-template-columns: 43px 30px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 19px 0;
  }
  .cp-time-dot {
    display: none;
  }
  .cp-appointment .avatar {
    height: 30px;
    width: 30px;
    font-size: 9px;
    grid-column: 2;
    grid-row: 1;
  }
  .cp-appointment-time {
    grid-column: 1;
    grid-row: 1/3;
    margin: 1px 0 0;
  }
  .cp-appointment-time strong {
    font-size: 11px;
  }
  .cp-appointment-person {
    grid-column: 3;
    grid-row: 1;
  }
  .cp-appointment-person h3 {
    font-size: 11px;
  }
  .cp-appointment-person p {
    font-size: 9px;
  }
  .cp-appointment > .tag {
    grid-column: 3;
    grid-row: 2;
    justify-self: start;
    align-self: center;
    font-size: 8px;
  }
  .cp-appointment > .button {
    grid-column: 3;
    grid-row: 3;
    justify-self: start;
    margin-top: 2px;
  }
  .cp-card-footer {
    padding: 14px 18px;
    font-size: 8px;
  }
  .cp-card-footer .icon {
    width: 12px;
    height: 12px;
  }
  .cp-aside {
    grid-template-columns: 1fr;
  }
  .cp-continuity,
  .cp-doc-teaser {
    padding: 21px;
  }
  .cp-patient-list .card-head {
    padding: 20px 18px;
    align-items: flex-start;
  }
  .cp-patient-list .card-head h2 {
    font-size: 14px;
  }
  .cp-patient-list .card-head p {
    font-size: 9px;
  }
  .cp-search {
    margin: 0 18px 10px;
    gap: 8px;
    padding: 10px;
  }
  .cp-search input {
    font-size: 10px;
  }
  .cp-search-state {
    display: none;
  }
  .cp-patient-row {
    padding: 18px;
    display: grid;
    grid-template-columns: 33px 1fr;
    gap: 10px 12px;
  }
  .cp-patient-row .avatar {
    width: 33px;
    height: 33px;
    font-size: 9px;
  }
  .cp-patient-row h3 {
    font-size: 11px;
  }
  .cp-patient-row p,
  .cp-patient-row small {
    font-size: 9px;
  }
  .cp-patient-row > .button,
  .cp-patient-row > .tag {
    grid-column: 2;
    justify-self: start;
    font-size: 9px;
  }
  .cp-document-intro {
    display: block;
    padding-top: 0;
  }
  .cp-document-intro h2 {
    font-size: 21px;
  }
  .cp-document-intro > .tag {
    margin-top: 16px;
  }
  .cp-document-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .cp-document-card {
    padding: 23px;
  }
  .cp-document-placeholder {
    min-height: 150px;
  }
  .cp-document-steps {
    padding: 23px;
  }
  .cp-document-steps > div {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cp-management-grid {
    gap: 17px;
  }
  .cp-management-grid .card-head {
    padding: 20px 18px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
  }
  .cp-managed-list {
    padding: 0 18px;
  }
  .cp-managed-list > div:not(.cp-empty) {
    flex-wrap: wrap;
    gap: 10px;
  }
  .cp-managed-list strong {
    font-size: 10px;
  }
  .cp-managed-list small {
    font-size: 8px;
  }
  .cp-managed-list > div > span:last-child:not(.avatar):not(.cp-feature-icon) {
    font-size: 9px;
  }
  .cp-access-card {
    padding: 21px;
    flex-wrap: wrap;
    gap: 14px;
  }
  .cp-access-card > div {
    min-width: 170px;
  }
  .cp-access-card > .button {
    margin-left: 52px;
    font-size: 10px;
  }
  .cp-seed {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .cp-seed .button {
    font-size: 10px;
  }
  .cp-error {
    flex-wrap: wrap;
    padding: 20px;
  }
  .cp-error > div {
    min-width: 170px;
  }
  .cp-error > .button {
    margin-left: 30px;
  }
  .cp-record,
  .cp-action-dialog {
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }
  .cp-record-head {
    padding: 19px 18px;
  }
  .cp-record-head h2 {
    font-size: 18px;
  }
  .cp-record-head .eyebrow {
    font-size: 7px;
    letter-spacing: 0.8px;
  }
  .cp-record-body {
    padding: 20px 18px;
  }
  .cp-patient-summary {
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 19px;
  }
  .cp-patient-summary > .avatar {
    width: 38px;
    height: 38px;
    font-size: 11px;
  }
  .cp-patient-summary h3 {
    font-size: 13px;
  }
  .cp-patient-summary > div {
    min-width: 180px;
  }
  .cp-patient-summary > .tag {
    margin-left: 50px;
  }
  .cp-persistent-summary {
    grid-template-columns: 1fr;
    gap: 11px;
    margin: 18px 0 23px;
  }
  .cp-persistent-summary > section {
    padding: 16px;
  }
  .cp-clinical-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .cp-clinical-heading h3 {
    font-size: 13px;
  }
  .cp-encounter-meta {
    padding: 17px 15px;
    gap: 9px;
  }
  .cp-timeline-dot {
    width: 26px;
    height: 26px;
  }
  .cp-timeline-dot .icon {
    width: 12px;
    height: 12px;
  }
  .cp-encounter-meta strong {
    font-size: 11px;
  }
  .cp-encounter-meta p {
    font-size: 9px;
  }
  .cp-encounter-meta small {
    font-size: 8px;
  }
  .cp-encounter-meta > .tag {
    font-size: 8px;
    padding: 4px 6px;
  }
  .cp-encounter-fields {
    grid-template-columns: 1fr;
    padding: 18px 15px;
    gap: 18px;
  }
  .cp-encounter-fields h4 {
    font-size: 8px;
  }
  .cp-encounter-fields p {
    font-size: 10px;
  }
  .cp-encounter-footer {
    padding: 14px 15px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .cp-encounter-footer > .button {
    font-size: 9px;
  }
  .cp-addenda {
    margin: 0 15px 18px;
    padding: 16px;
  }
  .cp-addenda h4 {
    font-size: 8px;
  }
  .cp-addenda p {
    font-size: 10px;
  }
  .cp-record-document-note {
    font-size: 9px;
  }
  .cp-form-grid,
  .cp-clinical-form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .cp-field > span {
    font-size: 10px;
  }
  .cp-field input,
  .cp-field textarea,
  .cp-field select {
    font-size: 12px;
  }
  .cp-editor-context {
    padding: 15px;
  }
  .cp-editor-context strong {
    font-size: 11px;
  }
  .cp-editor-context small {
    font-size: 9px;
  }
  .cp-editor-footer {
    display: block;
  }
  .cp-editor-footer > div {
    margin-top: 13px;
    justify-content: flex-start;
    gap: 7px;
  }
  .cp-editor-footer .button {
    font-size: 9px;
    padding: 10px 12px;
  }
  .cp-action-dialog .cp-record-head {
    padding: 19px 18px;
  }
  .cp-action-dialog .cp-record-head h2 {
    font-size: 17px;
  }
  .cp-action-body {
    padding: 21px 18px;
  }
  .cp-action-footer {
    padding: 17px 18px;
  }
  .cp-action-footer .button {
    font-size: 10px;
    padding: 11px 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cp-spinner {
    animation-duration: 2.5s;
  }
}
.cp-appointment-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: stretch;
}
.cp-appointment-actions .button {
  font-size: 9px;
  padding: 8px 10px;
  min-height: 31px;
}
.cp-appointment-actions .button .icon {
  width: 13px;
  height: 13px;
}
@media (max-width: 700px) {
  .cp-appointment-actions {
    grid-column: 3;
    grid-row: 3;
    align-items: flex-start;
    margin-top: 2px;
  }
  .cp-appointment-actions .button {
    font-size: 9px;
  }
}

@media (max-width: 700px) {
  .cp-workspace .page-heading .heading-actions {
    display: flex;
  }
}

@media (max-width: 700px) {
  .cp-workspace .page-heading .heading-actions .button {
    display: inline-flex;
    font-size: 10px;
    width: auto;
    height: auto;
    padding: 10px 14px;
  }
}
/* Structured clinical continuity, created as CRM work only on finalization. */
.cp-followup-editor {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.cp-followup-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 22px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
}
.cp-followup-heading .cp-feature-icon {
  background: var(--surface);
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.cp-followup-heading h3 {
  font-size: 14px;
  line-height: 1.6;
}
.cp-followup-heading p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 8px;
}
.cp-followup-return {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.cp-followup-toggle {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  cursor: pointer;
}
.cp-followup-toggle > input {
  margin: 3px 0 0;
  height: 17px;
  width: 17px;
  accent-color: var(--accent);
  flex: none;
}
.cp-followup-toggle strong {
  font-size: 12px;
  line-height: 1.6;
}
.cp-followup-toggle small {
  font-size: 10px;
  margin-top: 4px;
}
.cp-followup-return-fields {
  padding: 20px 0 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
.cp-followup-return-fields[hidden] {
  display: none;
}
.cp-followup-editor .cp-field small {
  font-size: 9px;
  line-height: 1.8;
  font-weight: 400;
  margin: 0;
}
.cp-followup-editor .cp-field textarea {
  min-height: 80px;
}
.cp-return-target output {
  display: flex;
  align-items: center;
  min-height: 45px;
  padding: 12px 13px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  line-height: 1.7;
}
.cp-followup-hint {
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 15px;
}
.cp-followup-exams-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 22px 0;
}
.cp-followup-exams-heading h4 {
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}
.cp-followup-exams-heading p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 7px;
}
.cp-followup-exams-heading > .button {
  flex: none;
  font-size: 9px;
}
.cp-followup-exams {
  padding: 0 22px;
  display: grid;
  gap: 17px;
}
.cp-followup-exam {
  padding: 0 18px 18px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 14px;
  min-width: 0;
  margin: 20px 0 0;
}
.cp-followup-exam + fieldset {
  margin-top: 0;
}
.cp-followup-exam > legend {
  font-size: 10px;
  font-weight: 700;
  padding: 0 8px;
  color: var(--accent-ink);
  line-height: 1.8;
}
.cp-followup-exam-top {
  display: flex;
  justify-content: flex-end;
  margin: 0 -5px 9px;
}
.cp-followup-exam-top > .button {
  font-size: 9px;
  min-height: 28px;
  color: var(--muted);
}
.cp-followup-exam-top > .button .icon {
  width: 12px;
  height: 12px;
}
.cp-followup-exam .cp-field input,
.cp-followup-exam .cp-field textarea {
  background: var(--surface);
}
.cp-followup-empty {
  padding: 19px 22px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}
.cp-followup-empty[hidden] {
  display: none;
}
.cp-followup-notice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--muted);
  padding: 19px 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.8;
  background: var(--surface-2);
}
.cp-followup-notice > .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}
.cp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cp-followup-history {
  margin: 0 22px 22px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}
.cp-followup-history-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
}
.cp-followup-history h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.cp-followup-history h4 > .icon {
  height: 14px;
  width: 14px;
  color: var(--accent);
}
.cp-followup-history-heading > .tag {
  font-size: 8px;
}
.cp-followup-history article {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.cp-followup-kind {
  min-width: 44px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 4px 6px;
  border-radius: 6px;
  align-self: flex-start;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}
.cp-followup-history article > div {
  min-width: 0;
  flex: 1;
}
.cp-followup-history article strong {
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.cp-followup-history article p {
  font-size: 9px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 5px;
}
.cp-followup-history article .cp-followup-instructions {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 10px;
  color: var(--ink);
  margin-top: 9px;
}
.cp-followup-history > .button {
  font-size: 9px;
  background: var(--surface);
  margin-top: 3px;
}
.cp-followup-history > .button .icon {
  width: 13px;
  height: 13px;
}
@media (max-width: 700px) {
  .cp-followup-editor {
    margin-top: 25px;
    border-radius: 15px;
  }
  .cp-followup-heading {
    padding: 18px 16px;
    gap: 11px;
  }
  .cp-followup-heading h3 {
    font-size: 12px;
  }
  .cp-followup-heading p {
    font-size: 9px;
  }
  .cp-followup-heading .cp-feature-icon {
    height: 29px;
    width: 29px;
  }
  .cp-followup-heading .icon {
    height: 16px;
    width: 16px;
  }
  .cp-followup-return {
    padding: 19px 16px;
  }
  .cp-followup-toggle strong {
    font-size: 11px;
  }
  .cp-followup-toggle small {
    font-size: 9px;
  }
  .cp-followup-exams-heading {
    padding: 19px 16px 0;
    flex-wrap: wrap;
    gap: 13px;
  }
  .cp-followup-exams-heading h4 {
    font-size: 11px;
  }
  .cp-followup-exams-heading p {
    font-size: 9px;
  }
  .cp-followup-exams {
    padding: 0 14px;
    gap: 15px;
  }
  .cp-followup-exam {
    padding: 0 12px 15px;
    margin-top: 18px;
  }
  .cp-followup-exam > legend {
    font-size: 9px;
  }
  .cp-followup-exam .cp-form-grid {
    gap: 16px;
  }
  .cp-followup-empty {
    padding: 18px 16px 0;
    font-size: 9px;
  }
  .cp-followup-notice {
    padding: 16px;
    margin-top: 18px;
    font-size: 8px;
  }
  .cp-followup-history {
    margin: 0 15px 18px;
    padding: 15px 13px;
  }
  .cp-followup-history-heading {
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 5px;
  }
  .cp-followup-history h4 {
    font-size: 9px;
  }
  .cp-followup-history article {
    gap: 10px;
  }
  .cp-followup-history article strong {
    font-size: 10px;
  }
  .cp-followup-history article p {
    font-size: 8px;
  }
  .cp-followup-history article .cp-followup-instructions {
    font-size: 9px;
  }
  .cp-followup-history > .button {
    font-size: 8px;
    padding: 8px 10px;
  }
}
.cp-workspace .heading-actions {
  flex-wrap: wrap;
}
.cp-demo-button {
  font-size: 10px;
}
@media (max-width: 700px) {
  .cp-workspace .heading-actions {
    gap: 8px;
  }
  .cp-demo-button {
    font-size: 9px;
    min-height: 37px;
    padding: 10px 13px;
  }
}

/* Agenda: state of each appointment (step, arrival that just came in, whether the consultation is registered). */
.cp-appointment-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.cp-appointment-state .tag {
  font-size: 9px;
}
.cp-just-arrived {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 12px;
}
.cp-agenda-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.cp-agenda-tools small {
  color: var(--muted);
  font-size: 10px;
}
.cp-day-nav {
  display: flex;
  gap: 5px;
}
.cp-day-nav .button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 11px;
}
.cp-day-nav .button[aria-current='date'] {
  border-color: var(--accent);
  color: var(--accent);
}
/* Care forgotten "in progress" on a previous day: it no longer blocks anyone, so it has to stay in sight. */
.cp-left-open {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  margin-bottom: var(--cp-gap);
  border-color: #e9cf9d;
  background: #fdf6e7;
  color: #6f531f;
}
.cp-left-open > .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.cp-left-open strong {
  font-size: 13px;
}
.cp-left-open p {
  font-size: 12px;
  margin: 4px 0 8px;
  line-height: 1.6;
}
.cp-left-open ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cp-left-open li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
}
.cp-conclude-too {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.cp-conclude-too input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 2px;
}
.cp-conclude-too strong {
  display: block;
  font-size: 13px;
}
.cp-conclude-too small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
/* The shared rule that hides secondary heading buttons on medium screens removed the only way to register a patient. */
.cp-workspace .heading-actions .secondary {
  display: inline-flex;
}
@media (max-width: 760px) {
  /* Between 701 and 760 px the shared rule shrinks heading buttons to an icon; these keep their words. */
  .cp-workspace .page-heading .heading-actions .button {
    display: inline-flex;
    font-size: 10px;
    width: auto;
    height: auto;
    padding: 10px 14px;
  }
}
@media (max-width: 700px) {
  .cp-appointment-state {
    grid-column: 3;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .cp-day-nav .button {
    min-height: 34px;
  }
}
/* Demonstration mode of the unit, shown to the administration above rooms and accesses. */
.cp-demonstration {
  margin-bottom: var(--cp-gap);
}
.cp-demonstration-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 24px 22px;
}
.cp-demonstration-body p {
  margin: 0;
  max-width: 70ch;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

/* Access control panel (permissions.js): people, profiles and the grid of what each profile may do. */
.ac-tabs {
  width: fit-content;
  margin-bottom: 18px;
}
.ac-card {
  overflow: hidden;
}
.ac-card .card-head {
  flex-wrap: wrap;
}
.ac-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}
.ac-table,
.ac-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.6;
  white-space: normal;
}
/* The frame writes every table heading small and in capitals; here a heading is the name of a person, a profile or an act. */
.ac-table th,
.ac-matrix th {
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.ac-table tbody th,
.ac-matrix tbody th[scope='row'] {
  background: transparent;
  color: var(--ink);
}
.ac-table td,
.ac-matrix td {
  font-size: 11px;
}
.ac-table th,
.ac-table td,
.ac-matrix th,
.ac-matrix td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.ac-table thead th,
.ac-matrix thead th {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-2);
  white-space: nowrap;
}
.ac-table tbody th {
  font-weight: 400;
  overflow-wrap: anywhere;
}
.ac-table tbody tr:last-child > *,
.ac-matrix tbody tr:last-child > * {
  border-bottom: 0;
}
.ac-off th strong,
.ac-off td[data-ac-cell='profile'],
.ac-off td[data-ac-cell='professional'] {
  color: var(--muted);
}
.ac-none {
  color: var(--muted);
}
.ac-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
/* The grid: the act and its explanation on the left, one narrow column per profile. */
.ac-matrix thead th:first-child,
.ac-matrix tbody th[scope='row'] {
  min-width: 250px;
  max-width: 360px;
}
.ac-matrix thead th:not(:first-child),
.ac-matrix td {
  text-align: center;
  min-width: 118px;
}
.ac-matrix thead th strong {
  display: block;
  font-size: 11px;
  color: var(--ink);
  white-space: normal;
  overflow-wrap: anywhere;
}
.ac-matrix thead th small,
.ac-matrix tbody th small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  white-space: normal;
}
.ac-matrix tbody th strong {
  font-weight: 700;
}
.ac-profile-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}
.ac-link {
  font-size: 9px;
  font-weight: 700;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ac-matrix .ac-group th {
  padding-top: 17px;
  padding-bottom: 9px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--surface);
}
.ac-matrix input[type='checkbox'] {
  width: 19px;
  height: 19px;
  accent-color: var(--accent);
  cursor: pointer;
}
.ac-matrix input[type='checkbox']:disabled {
  cursor: progress;
}
.ac-locked {
  color: var(--muted);
}
.ac-locked .icon {
  width: 16px;
  height: 16px;
}
.ac-changed {
  background: var(--warn-soft);
}
.ac-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The history of the access: one line per act, what was done in bold and who and when under it. */
.ac-history {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.ac-history li {
  padding: 13px 23px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.7;
}
.ac-history li:last-child {
  border-bottom: 0;
}
.ac-history strong {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ac-history small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.ac-card > .cp-hint,
.ac-card > .cp-loading,
.ac-card > .cp-error {
  margin: 0 23px 18px;
}
.ac-history-more {
  padding-top: 12px;
}
/* What was marked and not saved yet, said in words before it is saved. */
.ac-save {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 23px;
  border-top: 1px solid var(--line);
  background: var(--warn-soft);
  font-size: 11px;
  line-height: 1.7;
}
.ac-save ul {
  margin: 5px 0 0;
  padding-left: 17px;
}
.ac-save .cp-form-error {
  margin-top: 10px;
}
.ac-save-actions {
  display: flex;
  gap: 8px;
}
.ac-dialog .cp-form-grid:empty {
  display: none;
}
.ac-dialog .cp-field small {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.ac-dialog .cp-action-description strong {
  color: var(--ink);
}
@media (max-width: 720px) {
  .ac-matrix thead th:first-child,
  .ac-matrix tbody th[scope='row'] {
    min-width: 190px;
  }
  .ac-save-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
/* In the record: the exams that were performed and the day each result was delivered. */
.cp-record-results {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}
.cp-record-results h3 {
  font-size: 12px;
  margin-bottom: 10px;
}
.cp-record-results ul {
  display: grid;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.cp-record-results li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  font-size: 11px;
}
.cp-record-results li span {
  color: var(--muted);
}
.cp-record-results li span[data-cp-result='delivered'] {
  color: var(--success);
}
.cp-record-results small {
  color: var(--muted);
  font-size: 9px;
}
/* The consultation with the patient in the room: the history beside what is being written, and the buttons always
   in sight at the foot of the window. */
.cp-record.cp-record-wide {
  width: 1240px;
}
.cp-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.cp-editor-aside {
  position: sticky;
  /* Under the head of the window (measured when the consultation opens) and above the buttons at the foot. */
  top: calc(var(--cp-head, 104px) + 14px);
  max-height: calc(100dvh - var(--cp-head, 104px) - 150px);
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
  font-size: 11px;
  line-height: 1.7;
}
.cp-editor-aside h3 {
  font-size: 12px;
  margin-bottom: 8px;
}
.cp-editor-aside h4 {
  font-size: 10px;
  margin: 12px 0 4px;
}
.cp-editor-aside h5 {
  font-size: 9px;
  color: var(--muted);
  margin: 8px 0 2px;
  font-weight: 600;
}
.cp-editor-aside small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.cp-editor-aside details {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.cp-editor-aside summary {
  cursor: pointer;
  font-weight: 600;
}
.cp-editor-aside .cp-record-results {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
}
.cp-encounter-form .cp-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 26px -29px -30px;
  padding: 16px 29px;
  background: var(--surface);
  box-shadow: 0 -10px 18px -16px rgba(0, 0, 0, 0.45);
}
@media (max-width: 1100px) {
  .cp-editor-layout {
    grid-template-columns: 1fr;
  }
  .cp-editor-aside {
    position: static;
    order: -1;
    max-height: 230px;
  }
}
@media (max-width: 700px) {
  .cp-encounter-form .cp-editor-footer {
    margin: 20px -18px -20px;
    padding: 12px 18px;
  }
}
