/*
 * Component layer of the visual redesign (docs/VISUAL-SCHEDULING-REDESIGN.md), taken from
 * the approved prototype: type, page header, cards, buttons, fields, notices and chips.
 * It restyles the Bootstrap classes the templates already use, so markup and test selectors
 * stay the same. Loaded last; page files keep their own layout rules. Colors are tokens.
 */

/* Type (visual foundation of round UX-B, docs/VISUAL-SYSTEM.md): every area reads at 16 px, as the approved prototypes
   (tmp/ux-prototypes/README.md, section 2). Titles in Bricolage (tokens.css), text in Hanken, times, values, phones,
   codes and section labels in Plex Mono. Read text never goes under 14 px; 12 px only for the mono label in capitals. */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
:is(body.app-shell, body.management-shell, body.patient-shell) { font-size: 1rem; line-height: 1.5; }
/* Support text is 14 px (.small is 0.875em); a small inside a small stays 14 px instead of shrinking to 12. */
:is(.small, small) :is(.small, small) { font-size: 1em; }
time, .tabular-nums { font-variant-numeric: tabular-nums; }

/* Page header: one title size on every work page, 28 px (24 on phones), and a quiet subtitle. */
.workspace-page h1, .workspace-page .h1, .pm-page-header h1 { font-size: var(--pm-fs-xl); font-weight: 720; letter-spacing: -.026em; line-height: 1.2; }
@media (min-width: 768px) { .workspace-page h1, .workspace-page .h1, .pm-page-header h1 { font-size: var(--pm-fs-2xl); } }
.workspace-page > header p:not(.alert), .workspace-page .page-heading p:not(.alert) { color: var(--pm-ink-2); }
/* "← Voltar" links above a title: a quiet rounded control instead of the old underlined tab (three class names grew over time). */
:is(.link-secondary, .page-back-link, .doctor-back-link) { display: inline-flex; align-items: center; gap: .375rem; min-height: 2rem; padding: .25rem .625rem .25rem .5rem; margin-left: -.5rem; border: 0; border-radius: 999px; color: var(--pm-ink-2); font-size: .875rem; font-weight: 500; text-decoration: none; transition: background-color .15s ease, color .15s ease; }
:is(.link-secondary, .page-back-link, .doctor-back-link):hover { color: var(--pm-ink); background-color: var(--pm-surface-2); }
/* The small label above a title is a section label, as on a printed form: Plex Mono, 12 px capitals, never a pill. The
   templates write it as a badge or as a small semibold paragraph right before the h1 or h2. */
.workspace-page header > .badge:first-child,
.workspace-page > header > div > .badge:first-child,
.workspace-page :is(.badge, p.small.fw-semibold.text-primary):has(+ :is(h1, h2)),
.pm-page-header-eyebrow {
  display: block;
  width: max-content;
  max-width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--pm-ink-2) !important;
  font: 600 var(--pm-fs-label)/1.35 var(--pm-font-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: normal;
}
/* The public clinic page keeps a large title. */
.clinic-public-site h1 { font-size: clamp(2rem, 4.2vw, 2.875rem); letter-spacing: -.03em; line-height: 1.1; }

/* Section and card titles: h2 18 px in Bricolage (tokens.css), h3 16 px in Hanken. */
.workspace-page h2:is(.h4, .h5),
.workspace-page .card > h2:not([class]) { font-size: var(--pm-fs-lg); font-weight: 680; letter-spacing: -.016em; line-height: 1.3; }
.workspace-page h3:is(.h4, .h5) { font-size: var(--pm-fs-md); font-weight: 650; letter-spacing: 0; line-height: 1.4; }

/* Cards: flat. A 1 px border, no shadow and 12 px corners (README, rule 3); Front's own .card rule drew no border and a
   shadow. Inside a card go rows and labelled sections, never another card: a card inside a card keeps its spacing and
   loses its border, background and side padding, so its content lines up with the card around it. */
.card {
  --bs-card-border-width: 1px;
  --bs-card-border-color: var(--pm-border);
  --bs-card-border-radius: var(--pm-radius-card);
  --bs-card-inner-border-radius: calc(var(--pm-radius-card) - 1px);
  --bs-card-spacer-y: 1.125rem;
  --bs-card-spacer-x: 1.25rem;
  border-width: var(--bs-card-border-width);
  box-shadow: none;
}
/* "card border-0 shadow-sm" meant a raised card: flat now, it takes the border instead of the shadow. */
.card:is(.shadow-sm, .shadow, .shadow-lg) { box-shadow: none !important; }
.card.border-0:is(.shadow-sm, .shadow, .shadow-lg) { border: var(--bs-card-border-width) solid var(--bs-card-border-color) !important; }
.card .card { --bs-card-bg: transparent; --bs-card-border-color: transparent; --bs-card-border-radius: 0; --bs-card-inner-border-radius: 0; --bs-card-spacer-y: .75rem; --bs-card-spacer-x: 0; background-color: transparent; border-color: transparent; box-shadow: none; }
/* A nested card after other content reads as a section of the card: a ruled line above it. */
.card .card:not(:first-child) { border-top-color: var(--pm-rule); }
/* What touches a card's corner follows its curve, so a colored body, a hovered last item or a scrolling table never squares it off. */
.card > .card-body:first-child { border-top-left-radius: var(--bs-card-inner-border-radius); border-top-right-radius: var(--bs-card-inner-border-radius); }
.card > .card-body:last-child { border-bottom-left-radius: var(--bs-card-inner-border-radius); border-bottom-right-radius: var(--bs-card-inner-border-radius); }
.card > .card-body:last-child > :is(.list-group-flush, .table-responsive):last-child, .card > .table-responsive:last-child { border-bottom-left-radius: var(--bs-card-inner-border-radius); border-bottom-right-radius: var(--bs-card-inner-border-radius); }
.card > .card-body:last-child > .list-group-flush:last-child > .list-group-item:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }

/* Buttons (README, rule 1 and section 6): pills, like the tip of the pen. One filled button per screen, .btn-primary, is
   the main action; the others are quiet, with no border and a soft background only under the pointer: pen-blue text for
   the usual secondary action (.btn-outline-primary, .btn-quiet), ink for neutral ones (.btn-outline-secondary,
   .btn-light, .btn-neutral) and red for destructive ones (.btn-outline-danger). 15 px at weight 650, always in the text
   face (a button inside a mono line stays Hanken), and 44 px targets at every width, which the suites measure. The
   focus ring is the global one: 2 px pen blue, 2 px away (experience.css). */
.btn {
  --bs-btn-font-family: var(--pm-font-sans);
  --bs-btn-padding-y: .625rem;
  --bs-btn-padding-x: 1rem;
  --bs-btn-font-size: .9375rem;
  --bs-btn-font-weight: 650;
  --bs-btn-line-height: 1.5;
  --bs-btn-border-radius: 999px; /* the round tip of the pen (docs/BRAND.md) */
  letter-spacing: 0;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn-sm { --bs-btn-padding-y: .375rem; --bs-btn-padding-x: .75rem; --bs-btn-font-size: .875rem; --bs-btn-border-radius: 999px; }
.btn-lg { --bs-btn-padding-y: .8125rem; --bs-btn-padding-x: 1.375rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 999px; }
/* 19/11/2026 (owner): below 992 px every button is at least 44 px tall (experience.css), and a small one kept its words at
   the top with a gap below ("Revisar", "Fazer agora"). Its padding grows to center one line in the 44 px. Not flex: a flex
   button keeps an icon and its words on one line (the month buttons of /admin/agenda-mensal went past a 390 px screen)
   and drops the spaces around tags inside it. A rule that sets its own padding keeps it. */
@media (max-width: 991px) {
  .btn:not(:where(.btn-icon)) { --pm-btn-pad-y: max(var(--bs-btn-padding-y), calc((44px - 1lh) / 2 - var(--bs-btn-border-width, 1px))); padding-top: var(--pm-btn-pad-y); padding-bottom: var(--pm-btn-pad-y); }
}
.btn-group > .btn, .input-group > .btn, .btn-group-vertical > .btn { --bs-btn-border-radius: 10px; }
/* Quiet: the default secondary action. Pressed or open (.active, a dropdown's .show) it is marked by a border too. */
.btn-outline-primary, .btn-outline-success, .btn-quiet {
  --bs-btn-color: var(--pm-brand-ink);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--pm-brand-ink);
  --bs-btn-hover-bg: var(--pm-brand-soft);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--pm-brand-ink);
  --bs-btn-active-bg: var(--pm-brand-soft-2);
  --bs-btn-active-border-color: var(--pm-brand);
  --bs-btn-disabled-color: var(--pm-brand-ink);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}
/* Tonal: the action of a row that asks for attention now ("Chamar"). */
.btn-tonal {
  --bs-btn-color: var(--pm-brand-ink);
  --bs-btn-bg: var(--pm-brand-soft);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--pm-brand-ink);
  --bs-btn-hover-bg: var(--pm-brand-soft-2);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--pm-brand-ink);
  --bs-btn-active-bg: var(--pm-brand-soft-2);
  --bs-btn-active-border-color: var(--pm-brand);
}
/* Neutral: actions in ink (Cancelar, Imprimir, Limpar, the icons of a bar). */
.btn-outline-secondary, .btn-light, .btn-white, .btn-neutral {
  --bs-btn-color: var(--pm-ink);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--pm-ink);
  --bs-btn-hover-bg: var(--pm-surface-2);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--pm-ink);
  --bs-btn-active-bg: var(--pm-surface-3);
  --bs-btn-active-border-color: var(--pm-field);
  --bs-btn-disabled-color: var(--pm-ink-3);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}
/* Destructive: red text, a soft red under the pointer. */
.btn-outline-danger {
  --bs-btn-color: var(--pm-danger);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: var(--pm-danger);
  --bs-btn-hover-bg: var(--pm-danger-bg);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: var(--pm-danger);
  --bs-btn-active-bg: var(--pm-danger-bg);
  --bs-btn-active-border-color: var(--pm-danger);
  --bs-btn-disabled-color: var(--pm-danger);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: transparent;
}
/* Front paints the border of the outline buttons straight (rgba(33,50,91,.1)); the variable applies again, at the same
   weight, so hover and pressed states still change it (experience.css does the same for .btn-outline-secondary). */
.btn-outline-primary, .btn-outline-success, .btn-outline-danger, .btn-light, .btn-white { border-color: var(--bs-btn-border-color); }
/* Open or switched on, a quiet button keeps its soft background (the menu it opened, a display switch that is on). */
:is(.btn-outline-primary, .btn-outline-success, .btn-quiet):is([aria-expanded="true"], [aria-pressed="true"]) { background-color: var(--pm-brand-soft); }
:is(.btn-outline-secondary, .btn-light, .btn-white, .btn-neutral):is([aria-expanded="true"], [aria-pressed="true"]) { background-color: var(--pm-surface-2); }
/* UX-G (14/11/2026): the link of a row of choices that shows the current list or period (aria-current) is a quiet button
   marked like a pressed filter, the soft background and the pen-blue border, never a filled one (rule 1). Set through the
   button's own variables, which the dark theme's quiet buttons also read (theme-shell.css). */
:is(.btn-outline-primary, .btn-quiet):is([aria-current="page"], [aria-current="true"]) { --bs-btn-bg: var(--pm-brand-soft); --bs-btn-border-color: var(--pm-brand); --bs-btn-hover-bg: var(--pm-brand-soft-2); --bs-btn-hover-border-color: var(--pm-brand); }
/* A button that is one part of a control (a segmented group, a field with its button) keeps the field's 3:1 outline. */
:is(.btn-group, .btn-group-vertical, .input-group) > :is(.btn-outline-primary, .btn-outline-success, .btn-outline-secondary, .btn-outline-danger, .btn-light, .btn-white) { --bs-btn-border-color: var(--pm-field); --bs-btn-hover-border-color: var(--pm-field); }
.btn-link { --bs-btn-color: var(--pm-brand-ink); --bs-btn-hover-color: var(--pm-brand-strong); --bs-btn-font-weight: 600; }
.btn:disabled, .btn.disabled { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Fields: 44 px high, 10 px corners, 16 px text at every width (the body size, and iOS does not zoom into it). */
.form-control, .form-select { min-height: 44px; border-radius: var(--pm-radius-field); }
textarea.form-control { min-height: 88px; }
input[type="file"].form-control { padding-top: .5625rem; padding-bottom: .5625rem; }
/* A refused field and its reason right below it (label-fields.js). */
.form-control[aria-invalid="true"], .form-select[aria-invalid="true"], .form-check-input[aria-invalid="true"] { border-color: var(--pm-danger); }
.field-error { margin: .25rem 0 0; font-size: .875rem; color: var(--pm-danger); }
/* Payment confirmation for refund, waiver and a new total (payment-strong-fields.php). */
.payment-strong { padding: .75rem .875rem; border: 1px solid var(--pm-warn-border); border-radius: var(--pm-radius); background: var(--pm-warn-bg); color: var(--pm-ink); }
.payment-strong > legend { margin-bottom: .375rem; font-size: .9375rem; font-weight: 600; }
/* A field's label: 15 px at weight 650, over the field. */
.form-label, .col-form-label { font-size: .9375rem; font-weight: 650; color: var(--pm-ink); margin-bottom: .375rem; }
.form-check-input { width: 1.125rem; height: 1.125rem; margin-top: .125rem; }

/* Notices: one block in the color of the situation, no border, 15 px. */
.alert {
  --bs-alert-padding-x: .875rem;
  --bs-alert-padding-y: .75rem;
  --bs-alert-border-radius: var(--pm-radius-field);
  --bs-alert-border-color: transparent;
  /* The Front template sets these properties directly; the tokens win here. */
  color: var(--bs-alert-color);
  background-color: var(--bs-alert-bg);
  border-color: var(--bs-alert-border-color);
  font-size: .9375rem;
}
.alert-info, .alert-primary { --bs-alert-color: var(--pm-brand-ink); --bs-alert-bg: var(--pm-brand-soft); --bs-alert-link-color: var(--pm-brand-ink); }
/* Green is "it worked" (README, section 5): a confirmation reads green, information reads pen blue. */
.alert-success { --bs-alert-color: var(--pm-success); --bs-alert-bg: var(--pm-success-bg); --bs-alert-link-color: var(--pm-success); }
.alert-warning { --bs-alert-color: var(--pm-warn); --bs-alert-bg: var(--pm-warn-bg); --bs-alert-link-color: var(--pm-warn); font-weight: 500; }
.alert-danger { --bs-alert-color: var(--pm-danger); --bs-alert-bg: var(--pm-danger-bg); --bs-alert-link-color: var(--pm-danger); }
.alert-secondary, .alert-light { --bs-alert-color: var(--pm-ink-2); --bs-alert-bg: var(--pm-surface-2); }
.alert a:not(.btn) { color: inherit; font-weight: 600; text-decoration: underline; }

/* Status chips (README, rule 2 and section 5): a situation is color + icon + word. A tag with 6 px corners, never a pill
   (the pill is a button), 14 px at weight 650, with room for the icon the markup brings. Five colors, each passing 4.5:1
   in both themes: green "it worked", amber "attention", red "problem", pen blue "present / in progress", gray "neutral
   or done". Counts (the red pill of a menu item, [data-notification-count]) stay small filled mono pills; a badge the
   template asks to be a pill (.rounded-pill) keeps that shape. */
.badge {
  --bs-badge-padding-x: .5rem;
  --bs-badge-padding-y: .125rem;
  --bs-badge-font-size: .875rem;
  --bs-badge-font-weight: 650;
  --bs-badge-border-radius: var(--pm-radius-chip);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 26px;
  font-family: var(--pm-font-sans);
  line-height: 1.2;
  letter-spacing: 0;
}
.badge > :is(.bi, [class^="bi-"], [class*=" bi-"]) { margin: 0 !important; font-size: .9375rem; }
.badge:is(.bg-success, .bg-soft-success, .text-bg-success) { background-color: var(--pm-success-bg) !important; color: var(--pm-success) !important; }
.badge:is(.bg-warning, .bg-soft-warning, .text-bg-warning) { background-color: var(--pm-warn-bg) !important; color: var(--pm-warn) !important; }
.badge:is(.bg-danger, .bg-soft-danger, .text-bg-danger) { background-color: var(--pm-danger-bg) !important; color: var(--pm-danger) !important; }
.badge:is(.bg-primary, .bg-soft-primary, .bg-info, .bg-soft-info, .text-bg-primary, .text-bg-info) { background-color: var(--pm-brand-soft) !important; color: var(--pm-brand-ink) !important; }
.badge:is(.bg-secondary, .bg-light, .bg-white, .bg-soft-secondary, .text-bg-secondary, .text-bg-light) { background-color: var(--pm-surface-2) !important; color: var(--pm-ink-2) !important; }
.badge.bg-dark { background-color: var(--pm-ink) !important; color: var(--pm-page) !important; }
.badge.rounded-pill { --bs-badge-border-radius: 999px; }
.badge:is(.rounded-pill.bg-danger, [data-notification-count]) { justify-content: center; min-width: 22px; min-height: 22px; padding: 0 6px; font: 600 .75rem/1 var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.badge:is(.rounded-pill.bg-danger, [data-notification-count].bg-danger) { background-color: var(--pm-danger-solid) !important; color: #FFFFFF !important; }
/* On phones a long chip wraps instead of pushing the page sideways. */
@media (max-width: 575.98px) { .badge:not(.rounded-pill.bg-danger, [data-notification-count]) { white-space: normal; text-align: left; } }

/* Tables: the head in mono capitals (a section label), the rows ruled with the lighter line, 16 px text. */
.table { --bs-table-border-color: var(--pm-rule); }
.table > thead > tr > th { font: 600 var(--pm-fs-label)/1.3 var(--pm-font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--pm-ink-2); background-color: var(--pm-surface-2); border-bottom-color: var(--pm-border); }
.table > thead > tr > th :is(a, button) { letter-spacing: inherit; text-transform: inherit; }

/* Lists on phones: each row becomes a block with the column name over each value (data-label) and a full-width action,
   instead of a table that only scrolls sideways with the action off screen. Roles keep the table semantics.
   UX-G (14/11/2026): screens only. A printed page (A4 or Letter, about 720 px wide) also matched the phone's width, so a
   page with a stacked table printed blocks; paper keeps the table, as a wider screen does. */
@media screen and (max-width: 767.98px) {
  .stack-table, .stack-table tbody, .stack-table tfoot, .stack-table tr, .stack-table td { display: block; width: 100%; }
  /* The header row turns into a sort bar: only the columns that order the list stay, as touch-sized links. */
  .stack-table thead { display: block; }
  .stack-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .875rem; padding: .5rem 1rem; }
  .stack-table thead tr::before { content: 'Ordenar:'; color: var(--pm-ink-2); font: 600 var(--pm-fs-label)/1.3 var(--pm-font-mono); letter-spacing: .09em; text-transform: uppercase; }
  .stack-table thead th { display: none; }
  .stack-table thead th:has(> .table-sort) { display: block; width: auto; padding: 0 !important; border: 0; background: none !important; }
  .stack-table thead .table-sort { display: inline-flex; align-items: center; gap: .25rem; min-height: 2.5rem; }
  .stack-table tr { padding: .875rem 1rem; border-bottom: 1px solid var(--pm-rule); }
  .stack-table tr:last-child { border-bottom: 0; }
  .stack-table td { padding: .2rem 0 !important; border: 0; text-align: left !important; }
  .stack-table td[data-label]::before { content: attr(data-label); display: block; color: var(--pm-ink-2); font: 600 var(--pm-fs-label)/1.4 var(--pm-font-mono); letter-spacing: .09em; text-transform: uppercase; }
  /* UX-E: a table with no column to order has no bar (each value carries its label), and the row's own header cell
     (th scope="row": the patient, the professional, the period) is the title of the block. */
  .stack-table thead:not(:has(.table-sort)) { display: none; }
  table.stack-table > :is(tbody, tfoot) > tr > th { display: block; width: 100%; padding: 0 0 .2rem !important; border: 0; font-weight: 650 !important; text-align: left !important; }
  /* UX-F: a total row (tfoot) is the last block, under a stronger line. */
  .stack-table tfoot tr { border-top: 1px solid var(--pm-border-strong); }
  /* In dark mode every cell takes the surface colour (theme-shell.css); the block takes it too, so a table outside a
     card shows whole blocks instead of a box inset by the row's padding. */
  html.dark-mode .stack-table > :is(tbody, tfoot) > tr { background-color: var(--pm-surface); }
  .stack-table .stack-action { padding-top: .625rem !important; }
  .stack-table .stack-action .btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; }
  /* UX-F: several actions in the cell (reactivation of the reception) stack, each one full width. */
  .stack-table .stack-action > .d-inline-flex { display: flex !important; flex-direction: column; width: 100%; }
  /* UX-F: a table that keeps a minimum width for its columns on the computer (the reception's "Tabela", 46rem) does not
     keep it once its rows are blocks: the sort bar wrapped inside a box wider than the phone. */
  table.stack-table { min-width: 0 !important; }
  /* UX-G (14/11/2026): a table of figures (.stack-pairs: the year's result, twelve months and the total per line) keeps
     each label and its value on one line, the value at the end, so a line of months stays a short block. A line that
     details the next one (.stack-sub: an expense category before "Despesas pagas") keeps its indent and weight. */
  /* UX-I (14/11/2026): a value that does not fit beside its name ("Caderneta" beside "Lote e origem" at 320 px, a voided
     value with its reason) goes whole under the name, instead of breaking in the middle of a word. */
  .stack-table.stack-pairs td[data-label] { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .125rem 1rem; }
  .stack-table.stack-pairs td[data-label]::before { flex: none; }
  .stack-table tr.stack-sub { padding-left: 2.5rem; }
  table.stack-table > tbody > tr.stack-sub > th { font-weight: 400 !important; }
  /* UX-I (14/11/2026): a cell with nothing in it and no name (the action of a voided exam value or vaccine dose) leaves
     no empty line at the end of its block. */
  .stack-table td:empty:not([data-label]) { display: none; }
}

/* Disclosures: the summary reads as a control. */
/* 24 px is the floor (WCAG 2.2 2.5.8). :where() keeps it under every page rule, so a page that asks for 44 px keeps it. */
.workspace-page details > summary { cursor: pointer; }
:where(.workspace-page details) > summary { min-height: 24px; }
.workspace-page details > summary:not(.btn) { font-weight: 600; }

/* The patient portal home of the prototype (white card with a pen-blue line, UX-D): patient-portal.css. */
/* Management "Horários" (prototype "Gestão: horários"): the week beside the services on wide screens. */
/* UX-A: "Ver", "Baixar" and "Abrir consulta" of a patient's document; below 1200 px the third takes the whole row. */
@media (max-width: 1199.98px) {
  #patient-document-index .patient-file-actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Booking page (prototype "Paciente no celular" and public page): steps and service cards. */
.ps-stepper { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.ps-stepper li { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--pm-ink-3); font-size: var(--pm-fs-sm); font-weight: 600; }
.ps-stepper-bar { height: 4px; border-radius: 999px; background: var(--pm-border); }
.ps-stepper li.is-done .ps-stepper-bar, .ps-stepper li.is-current .ps-stepper-bar { background: var(--pm-brand); }
.ps-stepper li.is-current { color: var(--pm-ink); }
.ps-agenda-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.ps-agenda-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ps-agenda-card { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 72px; margin: 0; padding: 12px 14px; border: 1px solid var(--pm-border-strong); border-radius: 12px; background: var(--pm-surface); cursor: pointer; }
.ps-agenda-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ps-agenda-card:hover { border-color: var(--pm-brand); }
.ps-agenda-card:has(input:checked) { border-color: var(--pm-brand); background: var(--pm-brand-soft); box-shadow: inset 0 0 0 1px var(--pm-brand); }
.ps-agenda-card:has(input:focus-visible) { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.ps-agenda-card-title { color: var(--pm-ink); font-weight: 600; overflow-wrap: anywhere; }
.ps-agenda-card-meta { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); overflow-wrap: anywhere; }

/* Public clinic page (prototype "Página pública"): hero beside the booking widget, services and team. */
.clinic-site-hero { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 40px; margin-bottom: 1.5rem; }
.clinic-site-hero-text { flex: 1 1 420px; min-width: 0; }
.clinic-site-widget { flex: 1 1 380px; max-width: 520px; padding: 24px; border-radius: 20px; }
.clinic-site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.clinic-site-service { display: flex; flex-direction: column; border-radius: 18px; }
.clinic-site-person { display: flex; flex-direction: row; align-items: center; gap: 14px; border-radius: 18px; }

/* Reception booking steps (prototype drawer): a bar per step, green up to the current one. UX-N4: the names read with
   14 px (they had 12). */
#reception-scheduling .rs-progress { gap: 8px; margin: 0 0 16px; }
#reception-scheduling .rs-progress li, html.dark-mode #reception-scheduling .rs-progress li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 4px; row-gap: 6px;
  padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); font-weight: 600; line-height: 1.3;
}
#reception-scheduling .rs-progress li::before { content: ''; grid-column: 1 / -1; height: 4px; border-radius: 999px; background: var(--pm-border); }
#reception-scheduling .rs-progress li:has(~ li[aria-current="step"])::before, #reception-scheduling .rs-progress li[aria-current="step"]::before { background: var(--pm-brand); }
#reception-scheduling .rs-progress [aria-current="step"], html.dark-mode #reception-scheduling .rs-progress [aria-current="step"] { border: 0; background: transparent; color: var(--pm-ink); font-weight: 600; }
#reception-scheduling .rs-progress .rs-step-number { display: inline; width: auto; height: auto; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; }
#reception-scheduling .rs-progress .rs-step-number::after { content: '.'; }

/* Working days on "Horários": toggle pills, green when the day is on. */
.hours-page .professional-schedule-days { display: flex; flex-wrap: wrap; gap: 8px; }
.hours-page .professional-schedule-days .form-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 16px 0 12px; border: 1px solid var(--pm-border-strong); border-radius: 999px; background: var(--pm-surface); font-weight: 600; }
.hours-page .professional-schedule-days .form-check .form-check-input { float: none; margin: 0; }
.hours-page .professional-schedule-days .form-check:has(input:checked) { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); }

/* Patient shortcuts (prototype "Para você"): rows with a tinted icon tile and a chevron. */
.patient-portal-home .patient-portal-actions { border: 0; padding: 0; background: transparent; box-shadow: none; }
.patient-portal-home .patient-portal-action-group > h2 { margin-bottom: 8px; color: var(--pm-ink-2); font-size: .9375rem; font-weight: 700; }
.patient-portal-home .patient-portal-action-group ul { display: flex; flex-direction: column; gap: 8px; }
.patient-portal-home .patient-portal-actions a, html.dark-mode .patient-portal-home .patient-portal-actions a {
  gap: 12px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-card); background: var(--pm-surface); color: var(--pm-ink); font-weight: 600;
}
.patient-portal-home .patient-portal-actions a:hover { border-color: var(--pm-brand); background: var(--pm-surface); }
.patient-portal-home .patient-portal-actions a > i:first-child { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-size: 1.125rem; }
.patient-portal-home .patient-portal-actions a > i:last-child { color: var(--pm-ink-3); }

/* Booking: service cards carry duration and price; professional cards carry a monogram. */
.ps-agenda-choice + .ps-agenda-choice { margin-top: .25rem; }
.ps-service-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; column-gap: 12px; }
.ps-service-card .ps-agenda-card-title, .ps-service-card .ps-agenda-card-meta { grid-column: 1; }
.ps-agenda-card-price { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--pm-ink); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.ps-person-card, .ps-any-card { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; column-gap: 12px; }
.ps-person-card .agenda-avatar, .ps-any-card .agenda-avatar { grid-row: 1 / span 2; }
.ps-person-card .ps-agenda-card-title, .ps-person-card .ps-agenda-card-meta, .ps-any-card .ps-agenda-card-title, .ps-any-card .ps-agenda-card-meta { grid-column: 2; }
.ps-any-card { border-style: dashed; }
.ps-picked { grid-column: 1 / -1; }

/* Horários (prototype): the week with periods per day, and the patient preview beside it. */
.hours-week { display: flex; flex-direction: column; }
.hours-week-day { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: start; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--pm-border); }
.hours-week-day:first-child { border-top: 0; padding-top: 0; }
.hours-week-name { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; padding-left: 0; font-weight: 600; }
.hours-week-name .form-check-input { float: none; margin: 0; }
.hours-week-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; min-width: 0; }
.hours-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hours-period-field { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--pm-ink-2); font-size: .875rem; }
.hours-period-field span { flex: 0 0 auto; white-space: nowrap; }
.hours-period-add { min-height: 44px; padding-left: 4px; padding-right: 4px; font-weight: 600; text-decoration: none; }
.hours-period-field .form-control { width: 8.5rem; }
.hours-period-remove { min-width: 44px; min-height: 44px; color: var(--pm-ink-2); }
.hours-week-off { min-height: 44px; display: flex; align-items: center; color: var(--pm-ink-3); }
.hours-preview-days { display: flex; flex-direction: column; gap: 14px; }
.hours-preview-label { margin: 0 0 6px; color: var(--pm-ink); font-size: .875rem; font-weight: 600; }
.hours-preview-label::first-letter { text-transform: uppercase; }
.hours-preview-times { display: flex; flex-wrap: wrap; gap: 6px; }
.hours-preview-time, .hours-preview-more { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border: 1px solid var(--pm-border-strong); border-radius: 8px; background: var(--pm-surface); color: var(--pm-ink); font-size: .875rem; font-variant-numeric: tabular-nums; }
.hours-preview-more { border-style: dashed; color: var(--pm-ink-2); }
@media (max-width: 575.98px) {
  .hours-week-day { grid-template-columns: minmax(0, 1fr); }
  .hours-period { gap: 6px 8px; }
  .hours-period-field { gap: 6px; }
  .hours-period-field .form-control { width: 6.25rem; padding-left: .5rem; padding-right: .375rem; }
}

/* Public clinic page: choosing the time inside the "Agende online" card (prototype). */
.clinic-site-widget-label { margin: 0 0 8px; color: var(--pm-ink-2); font-size: .8125rem; font-weight: 600; }
.clinic-site-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.clinic-site-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--pm-border-strong); border-radius: 999px; background: var(--pm-surface); color: var(--pm-ink); font-size: .875rem; font-weight: 500; line-height: 1.2; text-align: left; }
.clinic-site-chip small { color: var(--pm-ink-2); font-size: .75rem; font-weight: 400; }
.clinic-site-chip:hover { border-color: var(--pm-brand); }
.clinic-site-chip:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.clinic-site-chip[aria-pressed="true"] { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 600; }
.clinic-site-chip[aria-pressed="true"] small { color: var(--pm-brand-ink); }
.clinic-site-days { display: flex; gap: 8px; margin-bottom: 12px; padding: 2px 2px 6px; overflow-x: auto; }
.clinic-site-day { flex: 0 0 auto; flex-direction: column; justify-content: center; gap: 0; min-width: 56px; min-height: 60px; padding: 6px 10px; border-radius: 12px; text-align: center; }
.clinic-site-day span { color: var(--pm-ink-2); font-size: .75rem; text-transform: capitalize; }
.clinic-site-day strong { font-size: 1.125rem; }
.clinic-site-day[aria-pressed="true"] span { color: inherit; }
.clinic-site-week { flex: 0 0 auto; min-height: 60px; border-style: dashed; border-radius: 12px; white-space: nowrap; }
.clinic-site-times .clinic-site-chip { justify-content: center; min-width: 72px; border-radius: 10px; font-variant-numeric: tabular-nums; }

/* Reception booking: quick registration of a first-time patient (prototype "Novo agendamento"). UX-N4: a quiet button
   that opens the form below a rule, no dashed box inside the card. */
.rs-quick-patient { padding: 0; border: 0; background: transparent; }
.rs-quick-patient[open] { padding-top: 4px; }
.rs-quick-patient > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--pm-radius-pill); color: var(--pm-brand-ink); font-weight: 650; list-style: none; cursor: pointer; }
.rs-quick-patient > summary::-webkit-details-marker { display: none; }
.rs-quick-patient > summary:hover, .rs-quick-patient[open] > summary { background: var(--pm-brand-soft); }
.rs-quick-patient > form { padding-top: 16px; border-top: 1px solid var(--pm-rule); }

/* Horários e serviços (prototype): people as chips, the week, services, online booking and days off on the left,
   the patient preview on the right; one "Salvar alterações" with scripts on. */
.hours-people { display: flex; flex-wrap: wrap; gap: 8px; }
.hours-person { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 6px; border: 1px solid var(--pm-border-strong); border-radius: 999px; background: var(--pm-surface); color: var(--pm-ink); font-weight: 600; text-decoration: none; }
.hours-person:hover { border-color: var(--pm-brand); color: var(--pm-ink); }
.hours-person.is-current { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.hours-person .agenda-avatar { flex-basis: 34px; width: 34px; height: 34px; }
.hours-person-name { display: flex; flex-direction: column; line-height: 1.2; }
.hours-person-name small { color: var(--pm-ink-3); font-size: .875rem; font-weight: 400; }
.hours-unsaved { position: sticky; top: calc(4.25rem + 12px); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--pm-warn-border); border-radius: var(--pm-radius-card); background: var(--pm-warn-bg); color: var(--pm-ink); box-shadow: var(--pm-shadow); }
.hours-unsaved-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hours-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; align-items: start; }
@media (min-width: 1200px) {
  .hours-layout { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1fr); }
  .hours-layout > .hours-preview { position: sticky; top: calc(4.25rem + 16px); }
}
.hours-single-save .hours-page [data-hours-form-actions] { display: none; }
.hours-page .hours-service-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.hours-page .hours-service-text { flex: 1 1 260px; min-width: 0; }
.hours-page .hours-mode { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--pm-border-strong); border-radius: 12px; background: var(--pm-surface); }
.hours-page .hours-mode-option { position: relative; display: inline-flex; align-items: center; min-height: 38px; margin: 0; padding: 0 12px; border-radius: 9px; color: var(--pm-ink-2); font-size: .8125rem; font-weight: 600; cursor: pointer; }
.hours-page .hours-mode-option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hours-page .hours-mode-option:has(input:checked) { background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.hours-page .hours-mode-option:has(input:focus-visible) { outline: 2px solid var(--pm-focus); outline-offset: 1px; }
.hours-page .hours-mode-option:has(input[value=off]:checked) { background: var(--pm-surface-2); color: var(--pm-ink-2); }
.hours-facts { margin: 0; padding-left: 1.1rem; color: var(--pm-ink-2); }
.hours-facts li + li { margin-top: 4px; }
.hours-days-off { margin: 0; padding: 0; list-style: none; }
.hours-days-off li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--pm-border); }
.hours-days-off li:first-child { border-top: 0; }
.hours-day-off-date { min-width: 84px; font-weight: 600; font-variant-numeric: tabular-nums; }
.hours-day-off-name { flex: 1 1 160px; min-width: 0; color: var(--pm-ink-2); }
.hours-days-off form { margin: 0; }
.hours-day-off-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.hours-day-off-add > div { flex: 1 1 160px; }
.hours-time-block-add > .hours-time-block-clock { flex: 1 1 110px; }
.hours-day-off-add .form-check { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; }
.hours-day-off-add .form-check .form-check-input { float: none; margin: 0; }
.hours-national summary { display: flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--pm-brand-ink); cursor: pointer; }
.hours-national-year { max-width: 160px; margin-bottom: 12px; }
.hours-national-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; margin: 0 0 8px; padding: 0; border: 0; }
.hours-national-list .form-check, .hours-national-scope { display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; padding-left: 0; }
.hours-national-list .form-check-input, .hours-national-scope .form-check-input { float: none; flex: 0 0 auto; margin: 0; }
.hours-national-list .form-check-label { min-width: 0; }
.hours-national-list .hours-day-off-date { display: inline-block; min-width: 48px; }
@media (max-width: 575.98px) {
  .hours-page .hours-mode { display: flex; width: 100%; }
  .hours-page .hours-mode-option { flex: 1 1 0; justify-content: center; text-align: center; }
}

/* Booking page: the agenda in one line, the days as buttons and the times of the chosen day below (prototype). */
#public-scheduling-page .ps-agenda-who { display: flex; align-items: center; gap: 12px; margin-bottom: .5rem; }
#public-scheduling-page .ps-agenda-summary .ps-agenda-facts { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: .25rem 0 .5rem; }
#public-scheduling-page .ps-agenda-summary .ps-agenda-facts > div { display: flex; flex-wrap: wrap; gap: 0 6px; min-width: 0; }
#public-scheduling-page .ps-agenda-summary .ps-agenda-facts dt { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); font-weight: 400; }
#public-scheduling-page .ps-agenda-summary .ps-agenda-facts dd { color: var(--pm-ink); font-size: var(--pm-fs-sm); }
html.dark-mode #public-scheduling-page .ps-agenda-summary .ps-agenda-facts dt { color: var(--pm-ink-2); }
html.dark-mode #public-scheduling-page .ps-agenda-summary .ps-agenda-facts dd { color: var(--pm-ink); }
.ps-howto > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--pm-brand-ink); font-weight: 600; cursor: pointer; }
.ps-day-chips { display: flex; gap: 8px; margin: 4px 0 12px; padding: 2px 2px 8px; overflow-x: auto; }
.ps-day-chip { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; min-height: 62px; padding: 6px 10px; border: 1px solid var(--pm-border-strong); border-radius: 12px; background: var(--pm-surface); color: var(--pm-ink); }
.ps-day-chip span { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); text-transform: capitalize; }
.ps-day-chip strong { font-size: 1.125rem; line-height: 1.2; }
.ps-day-chip:hover:not(:disabled) { border-color: var(--pm-brand); }
.ps-day-chip:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.ps-day-chip[aria-pressed="true"] { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.ps-day-chip[aria-pressed="true"] span { color: inherit; }
.ps-day-chip:disabled { opacity: .45; cursor: not-allowed; }
.ps-day-chip.has-choice::after { content: ''; width: 6px; height: 6px; margin-top: 3px; border-radius: 50%; background: var(--pm-brand); }
#public-scheduling-page .public-schedule-days.is-chips > .public-schedule-day:not([open]) { display: none; }
#public-scheduling-page .public-schedule-days.is-chips > .public-schedule-day > summary { display: none; }
#public-scheduling-page .public-schedule-days.is-chips > .public-schedule-day { padding: 0; border: 0; background: transparent; }

/* Public page hero: the clinic's line and the facts visitors look for; on wide screens the booking card replaces the button. */
.clinic-site-lead { margin: .25rem 0 1rem; color: var(--pm-ink-2); font-size: 1.125rem; }
.clinic-site-facts { display: flex; flex-direction: column; gap: 10px; margin: 0 0 1rem; padding: 0; list-style: none; }
.clinic-site-facts li { display: flex; align-items: flex-start; gap: 10px; color: var(--pm-ink-2); }
.clinic-site-facts i { flex: 0 0 auto; margin-top: 2px; color: var(--pm-brand); }
@media (min-width: 992px) {
  .clinic-site-hero.has-widget .clinic-site-book { display: none; }
}

/* boot.css resets every margin (* { margin: 0 }); modal dialogs need the browser's auto margin to sit in the middle of the screen. */
dialog:modal { margin: auto; }
/* Short pages keep the copyright line at the bottom of the screen. */
@media screen {
  body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  body > main#content { flex: 1 0 auto; width: 100%; }
  body > .site-footer { flex-shrink: 0; }
}

/* Settings month loader and the area switch fallback page. */
.month-loader-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.month-loader-controls .form-control { width: auto; min-width: 12rem; }
.month-loader-controls .btn { min-width: 44px; min-height: 44px; }
.portal-switch-logins { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 10px; }
.portal-switch-logins .btn { justify-content: flex-start; min-height: 48px; display: inline-flex; align-items: center; }

/* Management overview: first steps with the real progress of the guided setup. */
.setup-checklist { gap: 12px; }
.setup-checklist-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.setup-progress { height: 8px; overflow: hidden; border-radius: 999px; background: var(--pm-surface-2); }
.setup-progress span { display: block; height: 100%; border-radius: inherit; background: var(--pm-brand); }
.setup-checklist-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.setup-checklist-steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-card); background: var(--pm-surface); }
.setup-checklist-steps li.is-next { border-color: var(--pm-brand); box-shadow: inset 0 0 0 1px var(--pm-brand); }
.setup-step-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pm-surface-2); color: var(--pm-ink-2); font-size: 1.05rem; }
.setup-checklist-steps li.is-done .setup-step-mark { background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.setup-checklist-steps li.is-next .setup-step-mark { background: var(--pm-brand); color: #FFFFFF; }
.setup-step-text { display: flex; flex-direction: column; min-width: 0; }
.setup-step-text strong { color: var(--pm-ink); font-size: .9375rem; }
.setup-step-text span { color: var(--pm-ink-2); font-size: .875rem; }
/* "+ Novo" menu on the management top bar. */
.management-quick { position: relative; }
.management-quick > summary { display: inline-flex; align-items: center; min-height: 40px; list-style: none; cursor: pointer; }
.management-quick > summary::-webkit-details-marker { display: none; }
.management-quick-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1040; display: flex; flex-direction: column; min-width: 18rem; padding: 6px; border: 1px solid var(--pm-border); border-radius: 12px; background: var(--pm-surface); box-shadow: var(--pm-shadow-pop); }
.management-quick-menu a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 8px; color: var(--pm-ink); text-decoration: none; font-size: .875rem; }
.management-quick-menu a:hover, .management-quick-menu a:focus-visible { background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.management-quick-menu i { color: var(--pm-brand); }
@media (max-width: 575.98px) { .management-quick > summary { font-size: 0; padding: .5rem; } .management-quick > summary i { font-size: 1rem; margin: 0 !important; } }

/* Command palette (Ctrl+K): any page of the area by name, and patient search where the area allows it. */
dialog.command-palette:modal { margin: 12vh auto auto; }
.command-palette { width: min(640px, calc(100vw - 2rem)); max-height: min(70vh, 560px); padding: 0; overflow: hidden; border: 1px solid var(--pm-border-strong); border-radius: 16px; background: var(--pm-surface); color: var(--pm-ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.command-palette::backdrop { background: var(--pm-overlay); }
.command-palette[open] { display: flex; flex-direction: column; }
.command-field { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--pm-border); }
.command-field > i { color: var(--pm-ink-3); font-size: 1.1rem; }
.command-input { flex: 1 1 auto; min-width: 0; min-height: 40px; border: 0; outline: 0; background: transparent; color: var(--pm-ink); font-size: 1rem; }
.command-palette kbd, .nav-command-button kbd { padding: 2px 6px; border: 1px solid var(--pm-border-strong); border-radius: 6px; background: var(--pm-surface-2); color: var(--pm-ink-2); font-family: var(--pm-font-mono); font-size: .6875rem; font-weight: 500; box-shadow: none; }
.command-results { flex: 1 1 auto; overflow-y: auto; padding: 6px; }
.command-option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--pm-ink); text-decoration: none; }
.command-option[aria-selected="true"] { background: var(--pm-brand-soft); color: var(--pm-brand-ink); box-shadow: inset 0 0 0 2px var(--pm-brand); } /* the border marks the option without relying on color (WCAG 1.4.1, 09/11) */
.command-option i { color: var(--pm-brand); }
.command-option-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9375rem; }
.command-option-group { color: var(--pm-ink-3); font-size: .75rem; white-space: nowrap; }
.command-empty { margin: 0; padding: 16px; color: var(--pm-ink-2); }
.command-footer { margin: 0; padding: 8px 16px; border-top: 1px solid var(--pm-border); color: var(--pm-ink-3); font-size: .75rem; }
.nav-command-button { display: flex; align-items: center; width: 100%; gap: 6px; border: 1px solid var(--pm-border) !important; background: var(--pm-surface-2) !important; color: var(--pm-ink-2) !important; text-align: left; }
.nav-command-button span { flex: 1 1 auto; }
/* The doctor can turn keyboard shortcuts off in the work preferences; the hint goes with them. */
body:has(#work-tools-config[data-shortcuts="0"]) .nav-command-button kbd { display: none; }
@media (max-width: 1199.98px) { .nav-command { display: none !important; } }

/* Consultation documents: kind tabs, the form and the list of issued documents beside it. */
.consultation-documents-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1200px) { .consultation-documents-layout { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); } .consultation-documents-list { position: sticky; top: 16px; } }
.consultation-document-kinds { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--pm-border-strong); border-radius: 12px; background: var(--pm-surface); }
.consultation-document-kind { flex: 1 1 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--pm-ink-2); font-size: .875rem; font-weight: 600; }
.consultation-document-kind[aria-selected="true"] { background: var(--pm-brand-soft); color: var(--pm-brand-ink); box-shadow: inset 0 0 0 2px var(--pm-brand); } /* the border marks the chosen kind without relying on color: the tint and the text had the same lightness as the others (WCAG 1.4.1, 1.4.11) */
.consultation-prescription-items { display: grid; gap: 12px; }
.consultation-prescription-item { padding: 12px; border: 1px solid var(--pm-border); border-radius: 12px; }
/* Models and "repeat last" sit above each document form; they never send a field on issue. */
.document-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--pm-border); }
.document-models { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.document-models .form-select { width: auto; min-width: 12rem; max-width: 100%; }
.document-model-save > summary { color: var(--pm-brand-ink); font-size: .875rem; font-weight: 600; cursor: pointer; }
.document-model-save-row { display: flex; gap: 6px; margin-top: 8px; }
.document-tools [data-model-feedback]:empty { display: none; }
.document-tools [data-model-feedback] { flex-basis: 100%; }
.consultation-document-actions { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.consultation-document-actions form { display: inline; }
.patient-consultation-documents li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pm-border); }
.patient-consultation-documents li:first-child { border-top: 0; }
.patient-consultation-documents li > span { display: flex; flex-direction: column; }
.patient-consultation-documents li small { color: var(--pm-ink-3); }
.patient-consultation-confirm { margin-top: 1rem; padding: .875rem 1rem; border: 1px solid var(--pm-border); border-radius: 12px; background: var(--pm-brand-soft); color: var(--pm-ink); }
.patient-consultation-confirm [data-booking-confirmed] { color: var(--pm-brand-ink); font-weight: 600; }
/* On a computer each medicine and how to use it share one row: four items fit without scrolling. */
@media (min-width: 768px) { .consultation-prescription-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); grid-template-rows: auto auto; grid-auto-flow: column; column-gap: 12px; } .consultation-prescription-item .form-label { margin-top: 0 !important; } }
.consultation-documents-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pm-border); }
.consultation-documents-list li:first-child { border-top: 0; }
.consultation-documents-list li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.consultation-documents-list li small { color: var(--pm-ink-3); }

/* Monthly columns (ui-month-columns.php): two steps of the pen blue, thin columns with a 4px rounded top,
   a 2px surface gap between segments, hairline scale; values only on the largest and the latest month.
   UX-Q (17/11/2026): every text of the chart is 14 px (docs/VISUAL-SYSTEM.md: read text never below 14 px). The axis is as
   wide as its longest number (--mc-axis-chars, from the partial). Each column is a size container: narrower than its
   "10/26" with room around it, only every second, third or fourth month keeps the label, counted from the latest, so
   13 months fit at 320 px with no side scroll; the whole month stays in the column's name, a hidden text and the tip.
   When the largest month is right before the latest at almost the same height, its value leans left on narrow columns. */
.month-columns { --mc-done: #2340D0; --mc-other: #9AABFF; margin: 0; }
html.dark-mode .month-columns { --mc-done: #A9B8FF; --mc-other: #3D52C8; }
.month-columns-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.month-columns-title { color: var(--pm-ink); font-weight: 600; }
.month-columns-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; padding: 0; list-style: none; color: var(--pm-ink-2); font-size: .875rem; }
.month-columns-legend li { display: inline-flex; align-items: center; gap: 6px; }
.month-columns-key { width: 12px; height: 12px; border-radius: 3px; }
.month-columns-key.is-done, .month-columns-tip-key.is-done { background: var(--mc-done); }
.month-columns-key.is-other, .month-columns-tip-key.is-other { background: var(--mc-other); }
.month-columns-plot { --mc-axis: calc(var(--mc-axis-chars, 2) * 1ch + 10px); position: relative; padding: 24px 0 0 var(--mc-axis); font-size: .875rem; }
.month-columns-scale { position: absolute; top: 24px; left: var(--mc-axis); right: 0; height: 160px; pointer-events: none; }
.month-columns-scale span { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--pm-border); }
.month-columns-scale b { position: absolute; left: calc(-1 * var(--mc-axis)); top: -.5em; width: calc(var(--mc-axis) - 6px); color: var(--pm-ink-3); font-size: inherit; font-weight: 400; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.month-columns-bars { position: relative; display: flex; margin: 0; padding: 0; list-style: none; }
.month-column { container: month-column / inline-size; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; border-radius: 6px; outline: none; }
.month-column:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.month-column-track { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 160px; }
.month-column-stack { position: relative; display: flex; flex-direction: column; gap: 2px; width: min(24px, 60%); }
.month-column-seg { display: block; min-height: 2px; }
.month-column-seg.is-done { background: var(--mc-done); }
.month-column-seg.is-other { background: var(--mc-other); }
.month-column-stack > .month-column-seg:first-child { border-radius: 4px 4px 0 0; }
.month-column:hover .month-column-seg, .month-column:focus-visible .month-column-seg { filter: brightness(1.1); }
.month-column-value { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -4px); color: var(--pm-ink); font-size: inherit; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.month-column-label { height: 20px; margin-top: 8px; color: var(--pm-ink-3); line-height: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@container month-column (24px <= width < 48px) { .month-column:nth-last-child(2n) .month-column-short { visibility: hidden; } }
@container month-column (16px <= width < 24px) { .month-column:not(:nth-last-child(3n+1)) .month-column-short { visibility: hidden; } }
@container month-column (width < 16px) { .month-column:not(:nth-last-child(4n+1)) .month-column-short { visibility: hidden; } }
@container month-column (width < 48px) { .month-column-value.is-before { transform: translate(calc(-100% + 2px), -4px); } }
.month-columns-tip { position: absolute; top: 0; z-index: 2; min-width: 176px; padding: 8px 10px; border: 1px solid var(--pm-border); border-radius: 8px; background: var(--pm-surface); box-shadow: var(--pm-shadow-md, 0 6px 18px rgba(0,0,0,.12)); color: var(--pm-ink-2); font-size: .875rem; pointer-events: none; }
.month-columns-tip-head { margin-bottom: 4px; color: var(--pm-ink-3); font-size: inherit; }
.month-columns-tip-row { display: flex; align-items: center; gap: 6px; }
.month-columns-tip-row strong { color: var(--pm-ink); font-variant-numeric: tabular-nums; }
.month-columns-tip-key { width: 10px; height: 2px; border-radius: 1px; }

/* Long tables: headers that order the whole list on the server (list-sort-header.php), a header that stays while the page scrolls on computers,
   and active filters as chips that remove themselves. */
.table-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-weight: 600; text-decoration: none; }
.table-sort:hover { color: var(--pm-brand-ink); }
.table-sort i { font-size: .75em; opacity: .45; }
th[aria-sort="ascending"] .table-sort i, th[aria-sort="descending"] .table-sort i { opacity: 1; }
.table-sort:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; border-radius: 4px; }
@media (min-width: 992px) { .table-responsive.table-sticky { overflow: visible; } .table-sticky thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--pm-border); } }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--pm-border-strong); border-radius: 999px; background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-size: .875rem; font-weight: 600; text-decoration: none; }
.filter-chip:hover, .filter-chip:focus-visible { border-color: var(--pm-brand); color: var(--pm-brand-ink); }
.filter-chip i { font-size: .7rem; }


/* Guided anamnesis in the evolution form: vital signs in one row on a computer, sections of the chosen specialty below. */
.clinical-anamnesis { border: 1px solid var(--pm-border); border-radius: 12px; background: var(--pm-surface-2); }
.clinical-anamnesis > summary { padding: 10px 14px; color: var(--pm-brand-ink); font-weight: 600; cursor: pointer; }
.clinical-anamnesis-body { padding: 0 14px 14px; }
.clinical-anamnesis-pick { max-width: 320px; margin-bottom: 12px; }
.clinical-anamnesis-vitals { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.clinical-anamnesis-vitals legend { grid-column: 1 / -1; margin-bottom: 0; }
.clinical-anamnesis-vital { display: flex; flex-direction: column; gap: 4px; font-size: .8125rem; color: var(--pm-ink-2); }
.clinical-anamnesis-vital small { color: var(--pm-ink-3); }
.clinical-anamnesis-vitals [data-anamnesis-bmi] { grid-column: 1 / -1; color: var(--pm-brand-ink); font-weight: 600; }
.clinical-anamnesis-sections { display: grid; gap: 4px; margin: 0; padding: 0; border: 0; }
.clinical-anamnesis-sections .form-label { margin: 8px 0 0; }
.clinical-anamnesis-field { min-width: 0; }
.clinical-anamnesis-sections[hidden] { display: none; }
@media (min-width: 992px) { .clinical-anamnesis-sections { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; } }

/* Clinical forms (4.2): the list beside the editor from 992 px. Each field row takes two lines (name and type, then unit
   or options and the required mark) and one line from 1400 px; the unit/options column shows only for the types that use it. */
.clinical-forms-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 992px) { .clinical-forms-layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); } }
.clinical-forms-list ul li { padding: 6px 0; border-bottom: 1px solid var(--pm-border); }
.clinical-forms-list a[aria-current="page"] { font-weight: 700; }
.clinical-form-rows { display: grid; gap: 12px; margin-bottom: 8px; }
.clinical-form-row { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--pm-border); border-radius: 12px; background: var(--pm-surface-2); }
.clinical-form-row[hidden] { display: none; }
.clinical-form-row .form-label { margin-bottom: 2px; }
.clinical-form-row-required { display: flex; align-items: center; gap: 6px; min-height: 44px; margin: 0; }
.clinical-form-row-extra, .clinical-form-when-options { display: none; }
.clinical-form-row:is([data-type="number"], [data-type="choice"], [data-type="multi"]) .clinical-form-row-extra { display: block; }
.clinical-form-row:is([data-type="choice"], [data-type="multi"]) .clinical-form-when-unit { display: none; }
.clinical-form-row:is([data-type="choice"], [data-type="multi"]) .clinical-form-when-options { display: inline; }
@media (min-width: 576px) {
    .clinical-form-row { grid-template-columns: minmax(0, 1fr) minmax(170px, 220px); grid-template-areas: "label type" "extra required"; align-items: end; }
    .clinical-form-row-label { grid-area: label; } .clinical-form-row-type { grid-area: type; } .clinical-form-row-extra { grid-area: extra; } .clinical-form-row-required { grid-area: required; }
}
@media (min-width: 1400px) { .clinical-form-row { grid-template-columns: minmax(0, 1.4fr) minmax(170px, 210px) minmax(0, 1.4fr) auto; grid-template-areas: "label type extra required"; padding: 8px 12px; } }

/* Growth curves (4.5): recessive grid, the median in the brand color, ±2 solid and ±3 dashed, the patient's points ringed. */
.growth-chart { display: block; width: 100%; height: auto; }
.growth-grid line { stroke: var(--pm-border); stroke-width: 1; }
.growth-axis, .growth-zlabel { font-size: 11px; fill: var(--pm-ink-3); }
.growth-zlabel { fill: var(--pm-ink-2); font-weight: 600; }
.growth-z { fill: none; stroke-width: 1.5; }
.growth-z0 { stroke: var(--pm-brand); stroke-width: 2; }
.growth-z2 { stroke: var(--pm-ink-2); }
.growth-z3 { stroke: var(--pm-ink-3); stroke-dasharray: 4 4; }
.growth-patient-line { fill: none; stroke: var(--pm-brand-ink); stroke-width: 2; }
.growth-patient-point { fill: var(--pm-brand-ink); stroke: var(--pm-surface); stroke-width: 2; }

/* Image comparison (4.10): two figures side by side, and the overlay where a range moves the edge of the first image. */
.image-compare-pair { display: grid; gap: 1rem; }
@media (min-width: 768px) { .image-compare-pair { grid-template-columns: 1fr 1fr; } }
.image-compare-pair figure, .image-compare-overlay { margin: 0; }
.image-compare-pair img, .image-compare-overlay img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: var(--pm-surface-2); border-radius: .5rem; }
.image-compare-overlay { position: relative; --compare: 50%; }
.image-compare-overlay img + img { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--compare)); }
.image-compare-overlay::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--compare); width: 2px; background: var(--pm-brand); pointer-events: none; }

/* Card fees (8.9): the fee table keeps narrow numeric cells. */
.card-fee-table td { min-width: 6.5rem; }
.card-fee-table input { max-width: 7rem; }
/* UX-I (14/11/2026): on a phone each line of the fee table is a block (.stack-table): the type and installments as its
   title, then the two brands side by side, each name over its field, like the two columns of a wider screen. */
@media screen and (max-width: 767.98px) {
  .card-fee-table.stack-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .25rem .75rem; }
  .card-fee-table.stack-table tbody th { grid-column: 1 / -1; }
  .card-fee-table.stack-table td { min-width: 0; }
  .card-fee-table.stack-table input { max-width: none; }
}

/* Session packages (8.7): the balance as three small figures side by side. */
.package-balance { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.package-balance div { min-width: 5.5rem; }
.package-balance dt { font-size: .75rem; font-weight: 600; color: var(--pm-ink-3, inherit); }
.package-balance dd { margin: 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Booking relocation (2.4): each consultation beside its suggested time; stacked on phones. */
.relocation-item { display: grid; gap: .5rem; padding: .875rem 0; border-top: 1px solid var(--pm-border); }
.relocation-item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 768px) { .relocation-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* Reception encaixe (2.3): time and reason side by side from small tablets on. UX-N4: a quiet line under a rule. */
.rs-fit { padding-top: 12px; border-top: 1px solid var(--pm-rule); }
.rs-fit > summary { display: flex; align-items: center; min-height: 44px; color: var(--pm-ink); cursor: pointer; font-weight: 600; }
.rs-fit-fields { display: grid; gap: .75rem; }
@media (min-width: 576px) { .rs-fit-fields { grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); } }

/* Bank reconciliation (8.9): money in tabular figures; the state column wraps its buttons. */
.bank-lines td, .bank-lines th { font-variant-numeric: tabular-nums; }
.bank-lines td:last-child { min-width: 220px; }

/* Quotes (8.8): item rows of the form (description, quantity, price) and the item table. */
.quote-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(96px, 140px); gap: 8px; margin-bottom: 8px; }
.quote-item-row[hidden] { display: none; }
.quote-items td, .quote-items th { font-variant-numeric: tabular-nums; }

/* Indicator questions (7.9) and configuration copy (10.6). */
.indicator-question-row { display: flex; flex-wrap: wrap; gap: 8px; }
.indicator-question-row .form-control { flex: 1 1 260px; min-width: 0; }
.indicator-answer-text { margin-bottom: 4px; font-size: 1.05rem; font-weight: 600; color: var(--pm-ink); }
.configuration-copy-select { flex: 1 1 240px; width: auto; min-width: 0; max-width: 420px; }
.configuration-copy-part { display: flex; gap: 8px; margin: 0; padding: 10px 0; border-bottom: 1px solid var(--pm-border); }

/* Report center (10.2): report cards in a grid, saved views as a list, and "Salvar esta visão" opening under the page title. */
.report-center-search { max-width: 480px; }
.report-center-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.report-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-card); background: var(--pm-surface); }
.report-card[hidden], .report-view[hidden] { display: none; }
.report-card form { margin-top: auto; }
/* The title of a report and of a saved view is a link of its own, not a link in a sentence: 24 px target (WCAG 2.5.8). */
:is(.report-card h3, .report-view) a { display: inline-block; min-height: 24px; padding-block: 2px; }
/* The same for the link to the patient record on the reception change page (it was 18 px tall). */
a[data-change-patient-record] { display: inline-flex; align-items: center; min-height: 24px; }
.report-card-tag { display: inline-block; padding: 1px 6px; border: 1px solid var(--pm-border-strong); border-radius: 6px; color: var(--pm-ink-2); font-size: .75rem; font-weight: 600; vertical-align: middle; }
.report-view-list { display: grid; gap: 4px; }
.report-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--pm-border); }
.report-save-view > summary { list-style: none; }
.report-save-view > summary::-webkit-details-marker { display: none; }
.report-save-view form a { display: inline-flex; align-items: center; min-height: 24px; }
.report-save-view[open] form { margin-top: 8px; padding: 12px; border: 1px solid var(--pm-border); border-radius: 12px; background: var(--pm-surface); max-width: 360px; }

/* Questionnaires (4.8): four answers per question, two per line on phones and four from 768 px, on native radios. */
.questionnaire-item { margin: 0 0 16px; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--pm-border); }
.questionnaire-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 768px) { .questionnaire-options { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.questionnaire-option { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid var(--pm-border-strong); border-radius: 10px; background: var(--pm-surface); color: var(--pm-ink); cursor: pointer; }
.questionnaire-option input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--pm-brand); }
.questionnaire-option:has(input:checked) { border-color: var(--pm-brand); background: var(--pm-surface-2); font-weight: 600; }
.questionnaire-option:has(input:focus-visible) { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.questionnaire-answer { padding: 10px 0; border-bottom: 1px solid var(--pm-border); }

/* Satisfaction survey (0-10) and the portal's one-time questions. Eleven equal buttons fit 320 px; the checked one is filled. */
.satisfaction-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.satisfaction-option { position: relative; margin: 0; }
.satisfaction-option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.satisfaction-option span { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--pm-border-strong); border-radius: 10px; background: var(--pm-surface); color: var(--pm-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.satisfaction-option input:checked + span { border-color: var(--pm-brand); background: var(--pm-brand); color: var(--pm-on-brand); }
.satisfaction-option input:focus-visible + span { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.satisfaction-ends { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; color: var(--pm-ink-3); font-size: .875rem; }
.patient-origin-select { flex: 1 1 220px; width: auto; min-width: 0; max-width: 100%; }

/* Management indicators: filter row, stat tiles, month columns beside the origin bars, comments. */
.indicator-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 20px; }
.indicator-filters .form-label { margin: 0; }
.indicator-filters .form-select { width: auto; min-width: 180px; flex: 0 1 240px; }
.indicator-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.indicator-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-card); background: var(--pm-surface); }
.indicator-label { color: var(--pm-ink-3); font-size: .875rem; font-weight: 600; }
.indicator-tile strong { color: var(--pm-ink); font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.indicator-detail { color: var(--pm-ink-2); font-size: .875rem; }
.indicator-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
@media (min-width: 1024px) { .indicator-columns { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.origin-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.origin-bars li { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.origin-name { color: var(--pm-ink-2); font-size: .875rem; overflow-wrap: anywhere; }
.origin-track { height: 10px; border-radius: 999px; background: var(--pm-surface-2); overflow: hidden; }
.origin-track span { display: block; height: 100%; border-radius: 999px; background: var(--pm-brand); }
.origin-bars b { font-variant-numeric: tabular-nums; color: var(--pm-ink); }
.indicator-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.indicator-comments li { display: flex; gap: 12px; align-items: flex-start; }
.indicator-comment-score { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 700; }

/* Reception lists (reactivation, birthdays): two tabs as pills. */
.reactivation-tabs, .growth-periods, .reception-reminders-order { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.reactivation-tabs a, .growth-periods a, .reception-reminders-order a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--pm-border-strong); border-radius: 999px; color: var(--pm-ink-2); font-weight: 600; text-decoration: none; }
.reactivation-tabs a[aria-current="page"], .growth-periods a[aria-current="page"], .reception-reminders-order a[aria-current="page"] { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); }

/* Spreadsheet import: the preview, the refused lines and the recent imports with their undo. */
.patient-import-preview { padding: 14px; border: 1px solid var(--pm-border); border-radius: 12px; background: var(--pm-surface-2); }
.patient-import-errors { margin: 0; padding-left: 1.2rem; }
.patient-import-batches { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.patient-import-batches li { display: grid; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--pm-border); }
.patient-import-batches li:last-child { padding-bottom: 0; border-bottom: 0; }
.patient-import-undo .form-control { flex: 1 1 160px; width: auto; }

/* AI in the evolution editor: the button with its note, then the organized preview to review. */
.clinical-ai { margin: -4px 0 16px; }
.clinical-ai-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.clinical-ai-result { margin-top: 12px; }
.clinical-ai-preview { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--pm-border-strong); border-radius: 12px; background: var(--pm-surface-2); }
.clinical-ai-warning { margin: 0; color: var(--pm-ink-2); font-size: .8125rem; font-weight: 600; }
.clinical-ai-section strong { display: block; color: var(--pm-ink); }
.clinical-ai-section p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-limit { max-width: 12rem; }

/* Toasts: short notices that arrive while the person works (arrival-notices.js). At the top, below the phone's top bar:
   the bottom holds the phone navigation and the cookie banner, which would cover them. */
.pm-toasts { position: fixed; top: calc(4.75rem + env(safe-area-inset-top, 0px)); right: 1rem; z-index: 1080; display: flex; flex-direction: column; gap: .5rem; width: min(24rem, calc(100vw - 2rem)); }
@media (min-width: 1200px) { .pm-toasts { top: 1rem; } }
.pm-toast { display: flex; align-items: center; gap: .75rem; padding: .75rem .875rem; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-card); background: var(--pm-surface); color: var(--pm-ink); box-shadow: var(--pm-shadow-pop); animation: pm-toast-in .2s ease-out; }
.pm-toast-icon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.pm-toast-text { flex: 1 1 auto; min-width: 0; margin: 0; font-size: .875rem; overflow-wrap: anywhere; }
.pm-toast .btn-close { flex: 0 0 auto; }
html.dark-mode .pm-toast .btn-close { filter: invert(1) grayscale(1) brightness(2); }
@keyframes pm-toast-in { from { opacity: 0; transform: translateY(-.5rem); } }
@media (prefers-reduced-motion: reduce) { .pm-toast { animation: none; } }

/* 160: the page behind the reminder link ("Confirmo" / "Preciso remarcar"), without login. */
.attendance-link-card { max-width: 34rem; }
.attendance-link-when { font-size: 1.0625rem; }
.attendance-link-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.attendance-link-actions .btn { flex: 1 1 13rem; min-height: 44px; }

/* 3.4: booking links per channel on the clinic page management. */
.site-channel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.site-channel { display: grid; gap: .5rem; padding: .75rem; border: 1px solid var(--pm-border); border-radius: .75rem; }
.site-channel-text { display: grid; gap: .125rem; min-width: 0; }
.site-channel-link { display: flex; gap: .5rem; min-width: 0; }
.site-channel-link input { flex: 1 1 auto; min-width: 0; font-size: .8125rem; }
.site-channel-link .btn { flex: 0 0 auto; min-height: 44px; }
@media (min-width: 992px) { .site-channel { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; } }

/* 165: consent terms (portal and management). The text scrolls inside a bounded box. */
.consent-term-body { max-height: 16rem; overflow-y: auto; padding: .75rem; border: 1px solid var(--pm-border); border-radius: .5rem; background: var(--pm-surface-2, transparent); font-size: .9375rem; }
.consent-term summary { cursor: pointer; font-weight: 600; }

/* 3.2: what the guardian can do on each upcoming consultation of the minor. */
.guardian-booking-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex-basis: 100%; margin-top: .25rem; }
.guardian-booking-actions form { margin: 0; }
.guardian-booking-actions .btn { min-height: 44px; }

/* 1.6 and 3.10: the clinic's texts about one consultation. */
.patient-booking-texts { margin:.75rem 0; padding:.75rem 1rem; border-left:3px solid var(--pm-brand, #12805C); border-radius:.375rem; background:var(--pm-brand-soft, rgba(18,128,92,.08)); font-size:.9375rem; overflow-wrap:anywhere; }
/* 204: questionnaire sums over time. */
.questionnaire-chart { display: block; width: 100%; height: auto; max-height: 120px; margin: 8px 0 12px; color: var(--pm-brand); overflow: visible; }
/* Analysis of 03/11, item 13: the full record copy reads and prints as a document. */
.record-copy-entry { border-left: 3px solid var(--pm-border-strong); padding: 4px 0 4px 12px; margin: 8px 0; }
.record-copy-addendum { margin: 8px 0 0 12px; }
.record-copy-text { white-space: normal; overflow-wrap: anywhere; }
/* 04/11: the clinical modules of the copy, as plain lists that read on a phone and on paper. Names, exams and file
   names may be one long word, so the whole copy breaks inside words rather than scrolling sideways. */
.record-copy { overflow-wrap: anywhere; }
.record-copy-section { padding-top: 12px; border-top: 1px solid var(--pm-border); }
.record-copy-item { border-left: 3px solid var(--pm-border-strong); padding: 4px 0 4px 12px; margin: 10px 0; overflow-wrap: anywhere; }
.record-copy-list { margin: 0 0 8px; padding-left: 1.1rem; overflow-wrap: anywhere; }
.record-copy-list li { margin-bottom: 4px; }
.record-copy-answers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; overflow-wrap: anywhere; }
.record-copy-answers dt { font-weight: 600; }
.record-copy-answers dd { margin: 0 0 6px; }
@media (min-width: 768px) { .record-copy-answers { grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); } .record-copy-answers dd { margin-bottom: 4px; } }
.record-copy-limit { margin: 0 0 8px; padding: 6px 10px; border: 1px dashed var(--pm-warn-border); border-radius: 6px; color: var(--pm-ink); }
/* Printed or saved as PDF: only the document, black on white in either theme (paper never gets the dark background). */
@media print {
  body:has(.record-copy) #header, body:has(.record-copy) .site-footer, body:has(.record-copy) .mobile-glass-nav, body:has(.record-copy) [data-professional-scope], body:has(.record-copy) .skip-link, body:has(.record-copy) .cookie-container, body:has(.record-copy) .back-to-top, body:has(.record-copy) .pm-toasts { display: none !important; }
  html:has(.record-copy) { --pm-page: #fff; --pm-ink: #000; }
  html:has(.record-copy), html:has(.record-copy) body, html:has(.record-copy) body .main_content { background: #fff !important; color: #000 !important; }
  body:has(.record-copy) .main_content { padding-top: 0 !important; }
  .record-copy { max-width: none; padding: 0 !important; }
  /* The dark theme colours text through tokens and through "#content" rules, so both are set here. */
  html:has(.record-copy) #content .record-copy { --pm-ink: #000; --pm-ink-2: #333; --pm-ink-3: #333; --pm-brand: #000; --pm-brand-ink: #000; --pm-brand-strong: #000; --pm-link: #000; --pm-danger: #000; --pm-danger-strong: #000; --pm-warn: #000; --bs-body-color: #000; --bs-heading-color: #000; --bs-secondary-color: #333; --bs-emphasis-color: #000; --bs-link-color: #000; }
  html:has(.record-copy) #content .record-copy, html:has(.record-copy) #content .record-copy * { color: #000 !important; background: transparent !important; box-shadow: none !important; transition: none !important; }
  html:has(.record-copy) #content .record-copy .text-muted { color: #333 !important; }
  .record-copy-section, .record-copy-item, .record-copy-entry, .record-copy-limit, .record-copy-warning { border-color: #777 !important; }
  .record-copy-warning { border: 1px solid #000 !important; }
  .record-copy .record-copy-consultation, .record-copy .record-copy-item { break-inside: avoid-page; }
  .record-copy .record-copy-section > h2 { break-after: avoid-page; }
}

/* What a screen still needs before it opens (setup-requirements.php, docs/SETUP-REQUIREMENTS.md). */
.setup-requirements-list { list-style: none; padding-left: 0; display: grid; gap: .375rem; }
.setup-requirement { display: flex; align-items: baseline; gap: .5rem; }
.setup-requirement > i { flex: 0 0 auto; }
.setup-requirement-text { flex: 1 1 auto; min-width: 0; }
.setup-requirement.is-met > i { color: var(--pm-success, #0A5A40); }
.setup-requirement.is-missing > i { opacity: .75; }
.setup-requirement-action { color: inherit; font-weight: 600; text-decoration: underline; }

/* Accessibility audit of 06/11 (docs/ACCESSIBILITY.md). Bootstrap's success green read 2.1:1 on the white of the old
   sign-in pages ("Esqueci minha senha"); the theme's greens pass AA in light and dark. Footer links were 17-21 px tall:
   24 px is the minimum touch target (WCAG 2.2 AA 2.5.8). */
.link-success { color: var(--pm-success, #0A5A40) !important; display: inline-flex; align-items: center; min-height: 24px; }
.site-footer a.link-light { display: inline-flex; align-items: center; min-height: 24px; }
/* A date or time field takes one Tab per part and one for its calendar button. On that last stop the field matches
   only :focus-within (not :focus nor :focus-visible), so nothing showed where the focus was (WCAG 2.4.7). Same ring
   as experience.css. */
input:is([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]):focus-within { outline: 2px solid var(--pm-focus); outline-offset: 2px; }

/* Counter mode (COUNTER-MODE.md): the clinic tablet, read at arm's length. */
.counter-tablet { max-width: 46rem; overflow-wrap: anywhere; }
.counter-tablet-wait { display: grid; justify-items: center; gap: .75rem; padding: 4rem 1rem; text-align: center; }
.counter-tablet-wait > .bi-tablet { font-size: 3.5rem; color: var(--pm-brand); }
.counter-tablet-code { max-width: 14rem; font-size: 1.75rem; letter-spacing: .25em; text-align: center; }
.counter-tablet-term { max-height: 18rem; overflow-y: auto; padding: .75rem 1rem; border: 1px solid var(--pm-border); border-radius: .5rem; background: var(--pm-surface-2, transparent); }

/* UI sweep, round 2 (10/11): on phones the page title was a screen below the header.
   1. The clinic line above every professional and management page is one slim line: the name (cut with an ellipsis)
      and the link that changes it. "Continuidade clínica" stays in the menu.
   2. A signed-in page starts close to its header: the theme's 5rem of top space is for the public site. */
@media (max-width: 575.98px) {
  .professional-context, .management-scope-inner { flex-wrap: nowrap !important; align-items: center; gap: .5rem; }
  .professional-context { padding: .5rem .75rem !important; }
  .professional-context-name, .management-scope-inner > span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .professional-context-links { flex: 0 0 auto; flex-wrap: nowrap !important; }
  .professional-context-extra { display: none; }
  .management-scope-inner > .btn { flex: 0 0 auto; }
  .professional-context [data-professional-stale]:not([hidden]), .management-scope-inner [data-management-stale]:not([hidden]) { white-space: normal; }
  .professional-context:has([data-professional-stale]:not([hidden])), .management-scope-inner:has([data-management-stale]:not([hidden])) { flex-wrap: wrap !important; }
}
@media (max-width: 767.98px) {
  .workspace-page.content-space-2, .workspace-page .content-space-2, .management-shell .content-space-2, body.app-shell .content-space-2 { padding-top: 1.5rem !important; padding-bottom: 3rem !important; }
}

/* Self-service signup (/comecar, PLATFORM-SIGNUP.md). The page reuses the entry layout (.staff-entry) and the tappable
   rows of .permission-confirmation; these rules only group the choices and mark the chosen plan and cycle. */
.signup-form fieldset { margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
.signup-form fieldset > legend { float: none; width: auto; margin-bottom: .375rem; font-size: .9375rem; font-weight: 650; color: var(--pm-ink); }
/* UX-N2 (C8): a confirmation is a plain line elsewhere; the plans and cycles of the signup stay tappable boxes. */
.signup-form .permission-confirmation { align-items: flex-start; margin-bottom: .5rem; padding: .65rem .8rem; border: 1px solid var(--pm-border); border-radius: .65rem; }
.signup-form .permission-confirmation:has(input:checked) { border-color: var(--pm-brand); box-shadow: inset 0 0 0 1px var(--pm-brand); }
.signup-form .permission-confirmation small { display: block; margin-top: .125rem; }
.signup-form .field-error { margin-bottom: .75rem; }

/* The eye that shows a password (password-reveal.js): the field sits in a wrapper as wide as it was, and the eye is a
   44px target over its right end. */
.password-reveal { position: relative; display: block; min-width: 0; flex: 1 1 auto; }
.password-reveal > input { padding-right: 3rem !important; }
.password-reveal-toggle { position: absolute; top: 0; right: 0; width: 2.75rem; height: 100%; min-height: 2.75rem; max-height: 3.25rem; display: flex; align-items: center; justify-content: center; color: var(--pm-ink-2); font-size: 1.15rem; cursor: pointer; border-radius: 0 var(--pm-radius) var(--pm-radius) 0; user-select: none; }
.password-reveal-toggle:hover { color: var(--pm-brand-ink); }
.password-reveal-toggle:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: -2px; }
.password-reveal-toggle[aria-pressed="true"] { color: var(--pm-brand-ink); }
.password-reveal > input:disabled + .password-reveal-toggle { opacity: .45; cursor: default; }

/* The page's main region receives the focus after "ir para o conteúdo" and after some saves. It is not a control: a
   ring around the whole page (seen on Gestão › Assinatura, 10/11) said nothing and looked like a defect. */
main#content:focus, main#content:focus-visible { outline: none !important; box-shadow: none !important; }

/* Authenticator QR code (authenticator-qr.php): always black on white, with room around it for the camera. */
.mfa-qr { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 0 0 .9rem; }
.mfa-qr svg { flex: 0 0 auto; width: 196px; max-width: 100%; height: auto; border-radius: .6rem; border: 1px solid var(--pm-border, #d6dbe3); background: #ffffff; }
.mfa-qr figcaption { flex: 1 1 14rem; min-width: 0; font-size: .92rem; color: var(--pm-ink-2, inherit); }

/* Indicators: who was attended (ClinicIndicators::demographics), three equal columns. */
.indicator-demographics { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .indicator-demographics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Camera and microphone check (device-check.php). */
.device-check summary { cursor: pointer; }
.device-check-stage { display: grid; gap: .6rem; max-width: 26rem; margin-bottom: .75rem; }
.device-check-video { width: 100%; aspect-ratio: 4 / 3; max-width: 100%; border-radius: .75rem; background: #0F1420; object-fit: cover; transform: scaleX(-1); }
.device-check-meter { height: .6rem; border-radius: 999px; background: var(--pm-border); overflow: hidden; }
.device-check-meter span { display: block; height: 100%; width: 0%; background: var(--pm-success-solid); transition: width .08s linear; }
@media (prefers-reduced-motion: reduce) { .device-check-meter span { transition: none; } }

/* 234: free places of a group session in the time pickers (docs/GROUP-SESSIONS.md). */
.slot-seats { display: block; font-size: .75rem; font-weight: 500; color: var(--pm-ink-3); line-height: 1.2; }
input:checked + span .slot-seats, .is-selected .slot-seats { color: inherit; }

/* 235: the record shared with the team, read only (docs/RECORD-SHARES.md). */
.record-share-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding: .6rem 0; border-bottom: 1px solid var(--pm-border); }
.record-share-list li:last-child { border-bottom: 0; }
.record-share .btn, .shared-record .btn, .shared-records .btn { min-height: 44px; }
/* UX-N6a: "Compartilhados comigo" is one list card of ruled rows (.pm-rows), so the list has no gap of its own. */
.shared-record-age { color: var(--pm-ink-2); font-weight: 400; }
.shared-record-row, .shared-entry-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; }
.shared-entry-text, .shared-addendum { overflow-wrap: anywhere; }
.shared-addendum { border-left: 3px solid var(--pm-border-strong); padding-left: .75rem; }
.shared-record .is-private { border-style: dashed; }
.shared-record .shared-alert { border-color: var(--pm-danger-border); background: var(--pm-danger-bg); }
html.dark-mode .shared-record .shared-alert { background-color: var(--pm-danger-bg) !important; border-color: var(--pm-danger-border) !important; }

/* ------------------------------------------------------------------------------------------------------------------
 * Visual foundation of round UX-B (12/11/2026, docs/VISUAL-SYSTEM.md), from the approved prototypes
 * (tmp/ux-prototypes/README.md). Part 1: Plex Mono where the markup already says a text is a time, a value, a phone
 * or a code. Part 2: the vocabulary the template rounds (UX-C, UX-D, UX-E) put in the markup; nothing uses it yet.
 * ------------------------------------------------------------------------------------------------------------------ */
/* Times of the reception, the finance, the pre-consultation and the patient's consultation. */
:is(.reception-time, .reception-reminder-time, .finance-result-time, .hours-preview-time, .preconsult-time strong) { font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
/* Values of the finance pages: the figures of each total, row and review. */
:is(.finance-row-amounts, .finance-review-money, .fr-row-money, .payout-row-money, .expense-row-money, .expense-period-totals, .expense-money-facts, .cash-period-values, .cash-day-values, .cash-composition-values) dd,
.payout-agreed-value strong, .ps-agenda-card-price { font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
/* Phones the markup links (tel:), and codes. A button keeps the text face. */
a[href^="tel:"]:not(.btn), .platform-code { font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
/* Totals of the indicators: the display face, tabular. */
.indicator-tile strong, .package-balance dd { font-family: var(--pm-font-display); font-weight: 720; letter-spacing: -.02em; }
.indicator-label, .indicator-detail { font-size: var(--pm-fs-sm); }

/* Section label: mono capitals, 12 px, the only text under 14 px (a printed form's field name). */
.pm-label { display: block; margin: 0; color: var(--pm-ink-2); font: 600 var(--pm-fs-label)/1.35 var(--pm-font-mono); letter-spacing: .09em; text-transform: uppercase; }
/* A big figure: Bricolage 28/720 (22 on phones), tabular. */
.pm-total { color: var(--pm-ink); font: 720 1.375rem/1.15 var(--pm-font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .pm-total { font-size: var(--pm-fs-2xl); } }
/* Totals: one strip, cells divided by a line, instead of one card per number. */
.pm-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-card); background: var(--pm-surface); overflow: hidden; }
.pm-totals > * { display: grid; gap: 4px; margin: 0; padding: 14px var(--pm-space-5); border-left: 1px solid var(--pm-rule); }
.pm-totals > :first-child { border-left: 0; }
/* Status chip: <span class="pm-chip is-ok"><i class="bi-check2-circle" aria-hidden="true"></i>Confirmou<span class="pm-chip-sub"> · 18 min</span></span>.
   One word per situation in the whole system (README, section 5). */
.pm-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 26px; padding: 2px 8px; border-radius: var(--pm-radius-chip); background: var(--pm-surface-2); color: var(--pm-ink-2); font: 650 var(--pm-fs-sm)/1.2 var(--pm-font-sans); white-space: nowrap; }
.pm-chip > :is(.bi, [class^="bi-"], [class*=" bi-"]) { font-size: .9375rem; }
.pm-chip-sub { font-weight: 500; }
.pm-chip.is-ok { background: var(--pm-success-bg); color: var(--pm-success); }
.pm-chip.is-warn { background: var(--pm-warn-bg); color: var(--pm-warn); }
.pm-chip.is-bad { background: var(--pm-danger-bg); color: var(--pm-danger); }
.pm-chip.is-info { background: var(--pm-brand-soft); color: var(--pm-brand-ink); }
.pm-chip.is-neutral { background: var(--pm-surface-2); color: var(--pm-ink-2); }
.pm-chip.is-free { background: transparent; color: var(--pm-ink-2); box-shadow: inset 0 0 0 1px var(--pm-field); }
.pm-chip.is-alert { background: var(--pm-danger-solid); color: #FFFFFF; }
/* Filter: a pill that toggles (aria-pressed) with its count in mono; checked it is pen-soft with a check. The same pill
   picks one option when a hidden radio sits inside its label (.pm-pick). */
.pm-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-filter { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px 0 14px; border: 1px solid var(--pm-field); border-radius: var(--pm-radius-pill); background: var(--pm-surface); color: var(--pm-ink); font: 550 .9375rem/1 var(--pm-font-sans); white-space: nowrap; cursor: pointer; }
.pm-filter:hover { background: var(--pm-surface-2); }
.pm-filter .pm-count { color: var(--pm-ink-2); font: 600 var(--pm-fs-sm)/1 var(--pm-font-mono); }
.pm-filter[aria-pressed="true"], .pm-pick .pm-filter:has(input:checked) { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 650; }
.pm-filter[aria-pressed="true"] .pm-count { color: var(--pm-brand-ink); }
.pm-pick .pm-filter input { position: absolute; opacity: 0; pointer-events: none; }
.pm-pick .pm-filter:has(input:focus-visible) { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
/* Segmented control for the views of one list (Dia, Semana, Lista). */
.pm-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--pm-field); border-radius: var(--pm-radius-pill); background: var(--pm-surface); }
.pm-seg > :is(a, button) { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 0; border-radius: var(--pm-radius-pill); background: none; color: var(--pm-ink-2); font-size: .9375rem; font-weight: 550; text-decoration: none; }
.pm-seg > :is(a, button):hover { color: var(--pm-ink); background: var(--pm-surface-2); }
.pm-seg > :is([aria-pressed="true"], [aria-selected="true"], [aria-current="page"]) { background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 650; box-shadow: inset 0 0 0 1px var(--pm-brand); }
/* A .card is a flex column: these keep their own width there instead of stretching across the card. */
.card > :is(.pm-seg, .pm-chip, .pm-filter) { align-self: flex-start; }
/* Inside a card: labelled sections and ruled rows, never another card. */
.pm-section { padding: 12px 0 4px; border-top: 1px solid var(--pm-border); }
.pm-rows { margin: 0; padding: 0; list-style: none; }
.pm-rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--pm-rule); }
.pm-rows > li:first-child { border-top: 0; }
.pm-row-title { font-weight: 650; overflow-wrap: anywhere; }
.pm-row-end { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; }
.pm-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--pm-radius-pill); background: var(--pm-surface-2); color: var(--pm-ink-2); font: 600 .75rem/1 var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.pm-filter .pm-count { min-width: 0; height: auto; padding: 0; background: transparent; }
@media (pointer: coarse) { .pm-filter { min-height: 44px; } .pm-seg > :is(a, button) { min-height: 42px; } }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-C (12/11/2026, docs/PATIENT-CARD.md): the patients of Ctrl+K and the patient card.
 * ------------------------------------------------------------------------------------------------------------------ */
/* The palette: what the patient search answered under the field, a patient in two lines, and texts of 14 px. */
.command-busy { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); white-space: nowrap; }
/* The field has no border of its own: the focus is a pen-blue line under the text. The browser's own clear button goes:
   next to the close button it read as a second X (Esc closes, and the text is selected on reopening). */
.command-input:focus-visible { box-shadow: inset 0 -2px 0 var(--pm-focus); }
.command-input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
/* Closing: Esc for the keyboard, an X for the finger (pointer: coarse), where the keyboard hints of the foot go too. */
.command-close { display: inline-grid; place-items: center; flex: none; min-width: 40px; min-height: 36px; padding: 0 4px; border: 0; border-radius: var(--pm-radius-field); background: transparent; color: var(--pm-ink-2); }
.command-close:hover { background: var(--pm-surface-2); }
.command-close .bi-x-lg { display: none; font-size: 1.125rem; }
@media (pointer: coarse) { .command-close { min-width: 44px; min-height: 44px; } .command-close kbd { display: none; } .command-close .bi-x-lg { display: inline-block; } .command-footer { display: none; } }
.command-status { margin: 0; padding: 8px 18px 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.command-status:empty { display: none; }
.command-option.is-patient { min-height: 56px; padding-block: 6px; }
.command-option-label.has-detail { display: grid; gap: 1px; white-space: normal; }
.command-patient-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 650; }
.command-patient-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.command-option-group, .command-footer { font-size: var(--pm-fs-sm); }
.command-option-group { color: var(--pm-ink-2); }
/* The dark theme paints every link in --pm-link (theme-shell.css); the options keep the ink of the light theme. */
html.dark-mode .command-palette a.command-option:not([aria-selected="true"]) { color: var(--pm-ink); }
html.dark-mode .command-palette a.command-option[aria-selected="true"] { color: var(--pm-brand-ink); }
/* On phones the detail of a patient wraps instead of losing the professionals, and the "Paciente" tag gives it room. */
@media (max-width: 575.98px) { .command-option.is-patient .command-option-group { display: none; } .command-option.is-patient { grid-template-columns: 22px minmax(0, 1fr); } .command-patient-detail { white-space: normal; } }

/* Drawer (prototype README, section 6): a modal <dialog> on the right, 480 px wide; on phones a sheet from the bottom, up to
   92% of the screen. Only the form or the card inside, a fixed foot with the actions; the main one is its only filled
   button. The flex children are the head, the body and the foot (the content wrapper does not box them). */
dialog.pm-drawer { position: fixed; inset: 0 0 0 auto; width: min(480px, 100%); height: 100%; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--pm-border); border-radius: 0; background: var(--pm-surface); color: var(--pm-ink); box-shadow: var(--pm-shadow-pop); overflow: hidden; }
dialog.pm-drawer:modal { margin: 0 0 0 auto; }
dialog.pm-drawer[open] { display: flex; flex-direction: column; animation: pm-drawer-in .2s ease-out; }
dialog.pm-drawer::backdrop { background: var(--pm-overlay); }
dialog.pm-drawer:focus { outline: none; }
.pm-drawer-content { display: contents; }
.pm-drawer-head { display: flex; align-items: flex-start; gap: 4px; flex: none; padding: 12px 12px 12px var(--pm-space-5); border-bottom: 1px solid var(--pm-border); }
.pm-drawer-body { flex: 1 1 auto; display: grid; align-content: start; gap: var(--pm-space-5); min-height: 0; padding: var(--pm-space-4) var(--pm-space-5) var(--pm-space-6); overflow-y: auto; overscroll-behavior: contain; }
.pm-drawer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; flex: none; padding: 12px var(--pm-space-5); border-top: 1px solid var(--pm-border); background: var(--pm-surface); }
.pm-drawer-foot .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pm-drawer-icon { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--pm-radius-pill); background: transparent; color: var(--pm-ink); font-size: 1.125rem; }
.pm-drawer-icon:hover { background: var(--pm-surface-2); }
.pm-drawer-icon[hidden] { display: none; }
@keyframes pm-drawer-in { from { transform: translateX(24px); opacity: 0; } }
@keyframes pm-sheet-in { from { transform: translateY(32px); opacity: 0; } }
@media (max-width: 767.98px) {
  dialog.pm-drawer { inset: auto 0 0 0; width: 100%; height: auto; max-height: 92dvh; border: 0; border-top: 1px solid var(--pm-border); border-radius: var(--pm-radius-sheet) var(--pm-radius-sheet) 0 0; }
  dialog.pm-drawer:modal { margin: auto 0 0 0; }
  dialog.pm-drawer[open] { animation-name: pm-sheet-in; }
  .pm-drawer-head { padding-left: var(--pm-space-4); }
  .pm-drawer-body { padding: var(--pm-space-4); }
  .pm-drawer-foot { padding: 12px var(--pm-space-4) calc(12px + env(safe-area-inset-bottom)); }
  .pm-drawer-foot .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { dialog.pm-drawer[open] { animation: none; } }

/* "Saiba mais" (prototype README, rule 5; UX-E): a legal notice or a defensive text waits behind a 14 px link, out of the
   way of the form. <details class="pm-more"><summary>Saiba mais</summary><p>…</p></details>; the summary keeps the 44 px of
   every control of the areas (the suites measure it). */
.pm-more { margin: 0; }
.pm-more > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--pm-brand-ink); font-size: var(--pm-fs-sm); font-weight: 600; cursor: pointer; list-style: none; }
.pm-more > summary::-webkit-details-marker { display: none; }
.pm-more > summary::after { content: ''; width: 7px; height: 7px; margin: 0 2px 2px 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.pm-more[open] > summary::after { margin-bottom: -3px; transform: rotate(225deg); }
.pm-more > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.pm-more > summary:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; border-radius: 4px; }
/* UX-F (H1): the dark patch in _theme.php paints every summary in ink (!important); "Saiba mais" stays a link colour. */
html.dark-mode .pm-more > summary { color: var(--pm-brand-ink) !important; }
/* Several pages style every summary by id as a list item or a grid (workspace.css: #clinic-site, #management-organizations,
   #portal-switch-workspace…); there the chevron showed as "|". "Saiba mais" keeps its own shape everywhere. UX-K (K2):
   also without the "+"/"−" those pages put before every summary (#clinic-google-workspace, #professional-security…). */
.pm-more > summary { display: inline-flex !important; }
.pm-more > summary::before { content: none !important; }
.pm-more > :not(summary) { margin: 0 0 8px; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }

/* "Para quem é este horário?" inline (UX-F): the reservation page opened from a free time of the professional's agenda
   lists her patients as ruled rows; each one opens the same page with that patient (professional-slot-picker.js). */
.slot-picker-inline [data-slot-results] { display: grid; }
.slot-picker-inline .slot-patient-choice { display: flex; flex-direction: column; gap: 2px; min-height: 44px; padding: 10px 12px; margin: 0 -12px; border-top: 1px solid var(--pm-rule); border-radius: var(--pm-radius-sm); color: var(--pm-ink); overflow-wrap: anywhere; text-decoration: none; }
.slot-picker-inline .slot-patient-choice:first-child { border-top: 0; }
.slot-picker-inline .slot-patient-choice:hover { background: var(--pm-brand-soft); }
.slot-picker-inline .slot-patient-choice:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.slot-picker-inline .slot-patient-choice .small { color: var(--pm-brand-ink); }
.slot-picker-inline [data-slot-results] .btn { min-height: 44px; }
.slot-picker-inline [data-slot-search] .btn { flex: none; white-space: nowrap; }

/* The patient card: who, the phone on request, the consultations as ruled rows with their chip, the payment mark. */
.patient-card-who { flex: 1 1 auto; min-width: 0; padding-top: 6px; }
.patient-card-name { margin: 0; font: 680 1.25rem/1.3 var(--pm-font-display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.patient-card-name:focus { outline: none; }
.patient-card-meta { margin: 2px 0 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); overflow-wrap: anywhere; }
.patient-card-section > .pm-label { margin-bottom: 6px; }
.patient-card-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-left: -12px; }
.patient-card-number { padding-left: 12px; color: var(--pm-ink); font: 600 1.0625rem/1.4 var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.patient-card-contact .btn { display: inline-flex; align-items: center; gap: 6px; }
.patient-card-contact .patient-card-note { margin: 0; padding-left: 12px; }
.patient-card-rows > li { align-items: flex-start; padding: 10px 0; }
.patient-card-row-main { min-width: 0; }
.patient-card-row-main .pm-row-title { margin: 0; }
/* The date leads to the day of the agenda (reception) or to the consultation (professional): a link, in pen blue, 24 px tall. */
.patient-card-row-main .pm-row-title a { display: inline-block; min-height: 24px; line-height: 24px; color: var(--pm-brand-ink); text-decoration: none; }
.patient-card-row-main .pm-row-title a:hover { text-decoration: underline; }
.patient-card-time { font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.patient-card-row-meta { margin: 2px 0 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); overflow-wrap: anywhere; }
.patient-card-rows .pm-row-end .pm-chip { white-space: nowrap; }
.patient-card-empty { margin: 0; color: var(--pm-ink-2); }
.patient-card-note { margin: 6px 0 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.patient-card-flag { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--pm-warn); font-size: var(--pm-fs-sm); font-weight: 650; }
.patient-card-payment-line { margin: 0 0 4px; }
.patient-card-loading { margin: 0; color: var(--pm-ink-2); }
.patient-card-error { margin: 8px 0 0; color: var(--pm-danger); font-size: var(--pm-fs-sm); }
.patient-card-error a { color: inherit; font-weight: 650; }
@media (max-width: 379.98px) { .patient-card-rows > li { flex-wrap: wrap; gap: 4px 12px; } .patient-card-rows .pm-row-end { margin-left: 0; } }
/* The professional's list of Pacientes: since UX-N2 the rows are the list of components (.pm-list, section "UX-N2" below). */

/* ------------------------------------------------------------------------------------------------------------------
 * UX-H (14/11/2026, docs/CLINICAL-DIAGNOSES.md): the CID-10 codes of a published evolution or addendum, read only, on the
 * screens that show its text (the consultation's history, Todas as evoluções e adendos, the timeline and the copy of the
 * record). One chip per code: the code in mono and in pen blue, then the description; a long one wraps inside its chip.
 * ------------------------------------------------------------------------------------------------------------------ */
.pm-cid { margin: 12px 0; }
.pm-cid-label { margin-bottom: 6px; }
.pm-cid-list { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0; padding: 0; list-style: none; }
.pm-cid-item { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; min-height: 32px; padding: 5px 12px; border: 1px solid var(--pm-border); border-radius: var(--pm-radius-field); background: var(--pm-surface-2); color: var(--pm-ink); font-size: var(--pm-fs-sm); line-height: 1.4; }
.pm-cid-code { flex: none; color: var(--pm-brand-ink); font-weight: 600; }
.pm-cid-name { min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-M1 (16/11/2026, docs/VISUAL-SYSTEM.md, "Superfícies em níveis"): the approved prototype tmp/ux-prototypes-m. Each
 * surface has one role: the page (the desk), support (what helps to decide), the regular card (the work), the emphasized
 * card (what matters now, one per screen) and raised (what floats). One filled button per screen, up to two tonal ones
 * for the most used actions; a warning that blocks takes the filled one.
 * ------------------------------------------------------------------------------------------------------------------ */
/* Support: summaries, filters, help, history. It steps back towards the page. */
.pm-card-support { --bs-card-bg: var(--pm-support); --bs-card-border-color: var(--pm-support-line); --bs-list-group-bg: transparent; background-color: var(--pm-support); border-color: var(--pm-support-line); }
/* Emphasized: what matters now, one per screen. Soft pen blue, a 3:1 border and the 4 px pen line on top. Inside it the
   ruled lines and the bands of a group take the blue (the gray vanished on the blue), and a tonal button is a white sheet
   with the blue border, so it does not melt into the card. */
.pm-card-emph { --bs-card-bg: var(--pm-emph); --bs-card-border-color: var(--pm-emph-line); --bs-list-group-bg: transparent;
  --pm-rule: color-mix(in srgb, var(--pm-emph-line) 30%, var(--pm-emph)); --pm-surface-2: color-mix(in srgb, var(--pm-brand-soft-2) 70%, var(--pm-emph));
  background-color: var(--pm-emph); border-color: var(--pm-emph-line); box-shadow: inset 0 4px 0 var(--pm-brand) !important; }
.pm-card-emph .btn-tonal { --bs-btn-bg: var(--pm-surface); --bs-btn-border-color: var(--pm-emph-line); --bs-btn-hover-bg: var(--pm-brand-soft-2); --bs-btn-hover-border-color: var(--pm-emph-line); --bs-btn-disabled-bg: var(--pm-surface); --bs-btn-disabled-border-color: var(--pm-emph-line); }
/* A tonal button that waits (disabled) keeps its own colors, faded; Bootstrap's disabled state fell back to the filled blue. */
.btn-tonal { --bs-btn-disabled-color: var(--pm-brand-ink); --bs-btn-disabled-bg: var(--pm-brand-soft); --bs-btn-disabled-border-color: transparent; }
/* The dark patches of theme-shell.css and of _theme.php's <head> paint every card in --pm-surface with a border
   (!important); the two levels keep their own surface and line there. */
html.dark-mode body .card.pm-card-support, html.dark-mode body .pm-card-support { background-color: var(--pm-support) !important; border: 1px solid var(--pm-support-line) !important; }
html.dark-mode body .card.pm-card-emph, html.dark-mode body .pm-card-emph { background-color: var(--pm-emph) !important; border: 1px solid var(--pm-emph-line) !important; box-shadow: inset 0 4px 0 var(--pm-brand) !important; }
/* Raised: what floats over the page (drawers, menus, the palette, toasts) is the raised surface with the pop shadow; in the
   dark it is lighter than the card. */
.dropdown-menu { --bs-dropdown-bg: var(--pm-raised); }
dialog.pm-drawer, .pm-drawer-foot { background: var(--pm-raised); }
/* A big figure keeps its ink; it takes the color only when it asks for attention (the prototype's strip of numbers). */
.pm-totals > .is-bad .pm-total, .pm-total.is-bad { color: var(--pm-danger); }
.pm-totals > .is-warn .pm-total, .pm-total.is-warn { color: var(--pm-warn); }
/* A notice that blocks: the warning with a 4 px bar of its color on the left (the open consultation of "Hoje"). */
.alert.pm-alert-bar { box-shadow: inset 4px 0 0 var(--pm-st-late-bar); }
.alert-danger.pm-alert-bar { box-shadow: inset 4px 0 0 var(--pm-st-miss-bar); }
/* The title of a start page and its date on one line ("Hoje  segunda, 16 de novembro"). */
.pm-page-header-text.pm-title-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.pm-page-header-text.pm-title-line > .pm-page-header-subtitle { flex: 0 0 100%; max-width: 100%; margin-top: 0; }
.pm-page-date { margin: 0; color: var(--pm-ink-2); font-size: var(--pm-fs-md); }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-N2 (17/11/2026, docs/VISUAL-SYSTEM.md, "Componentes da UX-N2"): the shared pieces the next rounds apply screen by
 * screen (tmp/ux-n/INVENTORY.md, section 3). The later rounds only use them; a new variant goes at the end of this file,
 * in a section named after its round.
 * ------------------------------------------------------------------------------------------------------------------ */
/* C10: the page header's quiet "⋯" menu and icon buttons (44 px, the icon centered). */
.pm-icon-button { display: inline-grid; place-items: center; width: 44px; min-width: 44px; padding: 0; font-size: 1.125rem; }
.pm-page-menu { display: inline-flex; }
.pm-page-menu .dropdown-item { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.pm-page-menu .dropdown-item > i { color: var(--pm-ink-2); }
.pm-page-header-actions { align-items: center; }
.pm-page-header-actions .btn { display: inline-flex; align-items: center; justify-content: center; }
.pm-title-line > h1 { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
/* A chip beside the title carries text of the record (the patient's allergies): alone on its line on a phone it folds its
   words, never passing the screen (17/11/2026: a 40-character allergy widened the overview to 423 px at 320). */
.pm-title-line > .pm-chip { align-self: center; white-space: normal; overflow-wrap: anywhere; text-align: left; }

/* C7: the access the person opened, beside the title: the chip and the quiet "Ocultar dados" icon. */
.pm-access { display: inline-flex; align-items: center; gap: 2px; align-self: center; }
.pm-access-form { display: inline-flex; margin: 0; }
.pm-access-form .async-save-feedback { display: none !important; }
.pm-access .pm-icon-button { color: var(--pm-ink-2); }

/* C2: a list is one card: the head (h2, the count, one quiet action), ruled rows and a foot with the pages. A row: the
   time or date in mono (.pm-row-lead), the title and a line of detail (.pm-row-main), the chip and one quiet action at the
   end (.pm-row-end). Never one card per item. */
.pm-list { padding: var(--pm-space-4) var(--pm-space-4) var(--pm-space-2); }
@media (min-width: 768px) { .pm-list { padding: var(--pm-space-5) var(--pm-space-5) var(--pm-space-3); } }
.pm-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 40px; margin-bottom: 4px; }
.pm-card-head:focus { outline: none; }
.pm-card-head:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 4px; border-radius: 6px; }
.pm-card-head > :is(h2, h3) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; margin: 0; }
.pm-card-head-end { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.pm-card-count { color: var(--pm-ink-2); font: 600 var(--pm-fs-sm)/1.3 var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.pm-card-head .filter-chips { flex: 1 1 100%; margin-top: 2px; }
.pm-list-rows > li { align-items: flex-start; flex-wrap: nowrap; min-height: 56px; }
.pm-row-lead { flex: none; min-width: 3.5rem; padding-top: 2px; color: var(--pm-ink); font: 600 var(--pm-fs-md)/1.35 var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pm-row-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--pm-surface-2); color: var(--pm-ink-2); font: 650 var(--pm-fs-sm)/1 var(--pm-font-sans); text-transform: uppercase; }
.pm-row-main { flex: 1 1 auto; min-width: 0; }
.pm-row-main > p { margin: 0; }
.pm-row-main .pm-row-title a { display: inline-block; min-height: 24px; line-height: 1.5; color: var(--pm-ink); text-decoration: none; }
.pm-row-main .pm-row-title a:hover { color: var(--pm-brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.pm-row-main .pm-row-title a:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; border-radius: 4px; }
html.dark-mode .pm-row-main .pm-row-title a:not(:hover) { color: var(--pm-ink); }
.pm-row-detail { margin: 2px 0 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); overflow-wrap: anywhere; }
.pm-mono { font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pm-list-rows .pm-row-end { align-self: center; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; }
.pm-list-rows .pm-row-end .btn { white-space: nowrap; }
.pm-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--pm-rule); }
.pm-range { color: var(--pm-ink-2); font: 600 var(--pm-fs-sm)/1.3 var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.pm-card-foot-pages { display: flex; gap: 8px; }
.pm-list[aria-busy="true"] { opacity: .6; transition: opacity .15s ease; }
@media (max-width: 575.98px) {
  .pm-list-rows > li { flex-wrap: wrap; gap: 4px 12px; }
  .pm-list-rows > li > .pm-row-main { flex: 1 1 calc(100% - 64px); }
  .pm-list-rows .pm-row-end { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
  .pm-list-rows > li:has(> .pm-row-avatar) > .pm-row-end, .pm-list-rows > li:has(> .pm-row-lead) > .pm-row-end { padding-left: 40px; }
  /* .is-inline: one quiet action that stays on the row, as its icon (the name stays for screen readers). */
  .pm-list-rows > li:has(> .pm-row-end.is-inline) { flex-wrap: nowrap; }
  .pm-list-rows > li > .pm-row-end.is-inline { flex: none; margin-left: auto; padding-left: 0; }
  .pm-row-end.is-inline .pm-row-action { width: 44px; padding: 0; justify-content: center; }
  .pm-row-end.is-inline .pm-row-action-label { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
}
.pm-row-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* C3: search and "Filtrar". One line of search with its clear (×) and the quiet search button; the quick choices as
   pills; the rest of the form behind "Filtrar", a quiet <details> (no script, CSP). */
.pm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--pm-space-4); }
.pm-search { position: relative; display: flex; flex: 1 1 12rem; align-items: center; min-width: 0; max-width: 36rem; }
.pm-search > .bi-search { position: absolute; left: 16px; z-index: 1; color: var(--pm-ink-2); pointer-events: none; }
.pm-search > input[type="search"] { flex: 1 1 auto; width: 100%; min-width: 0; padding-left: 42px; padding-right: 46px; border-radius: var(--pm-radius-pill); }
.pm-search > input[type="search"]::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.pm-search-clear { position: absolute; right: 2px; z-index: 1; display: inline-grid; place-items: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--pm-ink-2); font-size: 1rem; }
.pm-search-clear:hover { background: var(--pm-surface-2); color: var(--pm-ink); }
/* The clear shows while the field has text, or (.has-filters) while the form has another filter off its default. */
.pm-search > input:placeholder-shown ~ .pm-search-clear { display: none; }
.pm-toolbar.has-filters .pm-search > input:placeholder-shown ~ .pm-search-clear { display: inline-grid; }
.pm-search-clear:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 0; }
.pm-toolbar-end { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; }
.pm-toolbar-note { flex: 1 1 100%; margin: 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
details.pm-filter-panel { min-width: 0; }
details.pm-filter-panel > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--pm-radius-pill); color: var(--pm-brand-ink); font-size: .9375rem; font-weight: 650; list-style: none; cursor: pointer; }
details.pm-filter-panel > summary::-webkit-details-marker { display: none; }
details.pm-filter-panel > summary::before, details.pm-filter-panel > summary::after { content: none !important; }
details.pm-filter-panel > summary:hover, details.pm-filter-panel[open] > summary { background: var(--pm-brand-soft); }
details.pm-filter-panel > summary:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
details.pm-filter-panel[open] { flex: 1 1 100%; order: 10; }
.pm-filter-panel-body { margin-top: 8px; padding: var(--pm-space-4); border: 1px solid var(--pm-support-line); border-radius: var(--pm-radius-card); background: var(--pm-support); }
.pm-pending-mark { display: inline-flex; align-items: center; gap: 4px; color: var(--pm-warn); font-size: var(--pm-fs-sm); font-weight: 650; }
.pm-pending-mark[hidden] { display: none; }
html.dark-mode details.pm-filter-panel > summary { color: var(--pm-brand-ink) !important; }

/* C4: no "Filtros aplicados" block: the count goes in the card's h2 and only a filter off its default shows, as a chip
   with its ×. The element the scripts and the screen readers use (data-*-applied) stays: the card head. */
.pm-applied-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; min-height: 32px; padding: 0 10px; border-radius: var(--pm-radius-pill); background: var(--pm-surface-2); color: var(--pm-ink); font-size: var(--pm-fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.pm-applied-chip:has(> button) { padding-right: 2px; }
.pm-applied-chip > button { display: inline-grid; place-items: center; flex: none; width: 28px; min-width: 28px; height: 28px; min-height: 28px !important; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--pm-ink-2); }
.pm-applied-chip > button:hover { background: var(--pm-surface-3); color: var(--pm-ink); }
.pm-applied-chip > button:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 1px; }

/* C1: the patient's header and the tabs "Nesta ficha": one line, underlined like the views; on a phone the strip scrolls
   sideways inside itself, never the page. */
.patient-header-meta { color: var(--pm-ink-2); }
/* The name can take two lines on a phone: the arrow stays at the title's first line. */
.pm-page-header.patient-header { align-items: flex-start; }
.patient-header > .pm-page-back { margin-top: -4px; }
@media (min-width: 768px) { .patient-header > .pm-page-back { margin-top: 0; } .pm-page-header.patient-header { align-items: center; } }
.patient-header .pm-page-header-actions { align-self: center; }
/* The same for any one-line header whose title line wraps on a phone (the name and the facts beside it). */
@media (max-width: 767.98px) { .pm-page-line:has(> .pm-title-line) { align-items: flex-start; } .pm-page-line:has(> .pm-title-line) > .pm-page-back { margin-top: -4px; } }
.pm-tabs { min-width: 0; margin: -8px 0 var(--pm-space-5); border-bottom: 1px solid var(--pm-border); }
.pm-tabs-links { display: flex; gap: 4px; margin: 0 0 -1px; padding: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.pm-tabs-links > a { display: inline-flex; flex: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-bottom: 3px solid transparent; color: var(--pm-ink-2); font-weight: 600; text-decoration: none; white-space: nowrap; }
.pm-tabs-links > a:hover { color: var(--pm-ink); border-bottom-color: var(--pm-border); }
.pm-tabs-links > a[aria-current="page"] { color: var(--pm-brand-ink); border-bottom-color: var(--pm-brand); font-weight: 700; }
.pm-tabs-links > a:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: -2px; border-radius: 6px 6px 0 0; }
html.dark-mode .pm-tabs-links > a:not([aria-current="page"]) { color: var(--pm-ink-2); }
html.dark-mode .pm-tabs-links > a[aria-current="page"] { color: var(--pm-brand-ink); }
@media (max-width: 767.98px) { .pm-tabs { margin-left: -16px; margin-right: -16px; } .pm-tabs-links { padding: 0 4px; } }
@media print { .pm-tabs { display: none; } }

/* C8: a history is a support card with ruled rows and the clinic's time at the end of each row. As a <details> its
   summary is the head (44 px). */
.pm-history { padding: var(--pm-space-3) var(--pm-space-4); }
@media (min-width: 768px) { .pm-history { padding: var(--pm-space-3) var(--pm-space-5); } }
.pm-history-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 44px; }
summary.pm-history-head { flex-wrap: nowrap; align-items: center; list-style: none; cursor: pointer; }
.pm-history-text, .pm-card-summary-text { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
summary.pm-history-head::-webkit-details-marker { display: none; }
summary.pm-history-head::before { content: none !important; }
summary.pm-history-head::after { content: ''; width: 8px; height: 8px; margin: 0 4px 4px auto; border: solid var(--pm-ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
details.pm-history[open] > summary.pm-history-head::after { margin-bottom: -2px; transform: rotate(225deg); }
summary.pm-history-head:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; border-radius: 6px; }
.pm-history-title { color: var(--pm-ink); font: 680 var(--pm-fs-lg)/1.3 var(--pm-font-display); }
.pm-history-count { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.pm-history-body { padding-bottom: 4px; }
section.pm-history > .pm-history-body { margin-top: 4px; }
.pm-history-group { margin: 12px 0 4px; }
.pm-history-rows > li { align-items: flex-start; }
.pm-history-main { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pm-history-detail { margin-top: 2px; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.pm-history-when { flex: none; color: var(--pm-ink-2); font: 500 var(--pm-fs-sm)/1.5 var(--pm-font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-history-zone, .pm-history-empty { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.pm-history-zone { padding-top: 8px; border-top: 1px solid var(--pm-rule); }
@media (max-width: 575.98px) { .pm-history-rows > li { flex-wrap: wrap; gap: 2px 12px; } .pm-history-when { flex: 1 1 100%; } }
html.dark-mode .pm-history > summary.pm-history-head { color: var(--pm-ink) !important; }

/* A support card whose summary is its head ("Mais ações desta ficha"): the same 44 px head as the history. Inside it the
   links are ruled rows: icon, name and the arrow. */
details.pm-card-support { padding: var(--pm-space-3) var(--pm-space-4); }
@media (min-width: 768px) { details.pm-card-support { padding: var(--pm-space-3) var(--pm-space-5); } }
details.pm-card-support > summary.pm-card-summary { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 12px; min-height: 44px; list-style: none; cursor: pointer; }
details.pm-card-support > summary.pm-card-summary::-webkit-details-marker { display: none; }
details.pm-card-support > summary.pm-card-summary::before { content: none !important; }
details.pm-card-support > summary.pm-card-summary::after { content: ''; width: 8px; height: 8px; margin: 0 4px 4px auto; border: solid var(--pm-ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
details.pm-card-support[open] > summary.pm-card-summary::after { margin-bottom: -2px; transform: rotate(225deg); }
details.pm-card-support > summary.pm-card-summary:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; border-radius: 6px; }
.pm-card-summary-title { color: var(--pm-ink); font: 680 var(--pm-fs-lg)/1.3 var(--pm-font-display); }
.pm-card-summary-note { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
html.dark-mode details.pm-card-support > summary.pm-card-summary { color: var(--pm-ink) !important; }
.pm-link-rows > li { padding: 0; }
.pm-link-rows > li > a { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-height: 48px; padding: 8px 4px; color: var(--pm-ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.pm-link-rows > li > a > i:first-child { flex: none; width: 24px; color: var(--pm-brand-ink); font-size: 1.125rem; text-align: center; }
.pm-link-rows > li > a > .bi-chevron-right { flex: none; margin-left: auto; color: var(--pm-ink-2); }
.pm-link-rows > li > a:hover { color: var(--pm-brand-ink); }
.pm-link-rows > li > a:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: -2px; border-radius: 6px; }
html.dark-mode .pm-link-rows > li > a:not(:hover) { color: var(--pm-ink); }
/* A label that gives way to its icon below 400 px (the name stays for screen readers): "Novo paciente" beside "Agendar"
   and "⋯" at 320 px. */
@media (max-width: 399.98px) { .pm-narrow-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; } .btn:has(> .pm-narrow-hidden) > i { margin-right: 0 !important; } }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-N4 (17/11/2026, docs/VISUAL-SYSTEM.md, "Componentes da UX-N4"): variants for the scheduling and queue screens of
 * the reception and the professional, over the UX-N2 pieces.
 * ------------------------------------------------------------------------------------------------------------------ */
/* A filter pill that is a link (no script): the choice shown is aria-current="true", as on the finance's "A receber". */
a.pm-filter { text-decoration: none; }
a.pm-filter:hover { color: var(--pm-ink); }
.pm-filter[aria-current="true"] { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 650; }
.pm-filter[aria-current="true"] .pm-count { color: var(--pm-brand-ink); }
html.dark-mode a.pm-filter:not([aria-current="true"]) { color: var(--pm-ink); }
html.dark-mode a.pm-filter[aria-current="true"] { color: var(--pm-brand-ink); }
/* Pills that keep one line on a phone and scroll sideways inside themselves, never the page (a pill per agenda). */
.pm-filters.is-scroll { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding: 2px; margin: -2px; }
.pm-filters.is-scroll > .pm-filter { position: relative; flex: none; } /* relative: its hidden words stay inside the strip */
/* A row's state words beside the title (C5 chips in a wrapping line under the name). */
.pm-row-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
/* An action of a row that opens below it (contact, close, withdraw): a quiet summary, the form under a rule. */
details.pm-row-more { flex: 1 1 100%; min-width: 0; }
details.pm-row-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: var(--pm-radius-pill); color: var(--pm-brand-ink); font-weight: 650; list-style: none; cursor: pointer; }
details.pm-row-more > summary::-webkit-details-marker { display: none; }
details.pm-row-more > summary::before, details.pm-row-more > summary::after { content: none !important; }
details.pm-row-more > summary:hover, details.pm-row-more[open] > summary { background: var(--pm-brand-soft); }
details.pm-row-more > summary:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
details.pm-row-more.is-danger > summary { color: var(--pm-danger); }
details.pm-row-more.is-danger > summary:hover, details.pm-row-more.is-danger[open] > summary { background: var(--pm-danger-bg); }
.pm-row-more-body { margin: 4px 0 8px; padding: 12px 16px; border-left: 3px solid var(--pm-rule); }
html.dark-mode details.pm-row-more > summary { color: var(--pm-brand-ink) !important; }
html.dark-mode details.pm-row-more.is-danger > summary { color: var(--pm-danger) !important; }
/* The rows of a list card that hold more than a line (a queue entry, an offer, a request): the actions wrap under the
   text on every width. */
.pm-list-rows.is-stacked > li { flex-wrap: wrap; }
.pm-list-rows.is-stacked > li > .pm-row-main { flex: 1 1 18rem; }
.pm-list-rows.is-stacked .pm-row-actions { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
@media (min-width: 576px) { .pm-list-rows.is-stacked .pm-row-actions { padding-left: 52px; } .pm-list-rows.is-stacked > li:not(:has(> .pm-row-lead, > .pm-row-avatar)) .pm-row-actions { padding-left: 0; } }
/* A band that groups the rows of a list by day ("Hoje", "qui 20/11") or by kind. */
.pm-band { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 12px 0 4px; padding: 6px 12px; border-radius: 8px; background: var(--pm-surface-2); color: var(--pm-ink); font: 650 var(--pm-fs-sm)/1.35 var(--pm-font-sans); }
.pm-band-count { color: var(--pm-ink-2); font-weight: 500; }
/* Screens of UX-N4 with no section of their own in workspace.css: the reactivation lists, the freed time, the
   relocation and the counter (docs/PATIENT-REACTIVATION.md, BOOKING-RELOCATION.md, COUNTER-MODE.md). */
.reactivation-head { flex-wrap: wrap; }
.reactivation-intro { flex: 1 1 100%; margin: 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.reception-reactivation .pm-list .table-responsive { margin-top: 4px; }
.freed-slot { padding-top: calc(var(--pm-space-4) + 4px); }
.freed-slot-detail { color: var(--pm-ink-2); }
.relocation-card .relocation-list { margin-top: 4px; }
.relocation-detail, .relocation-when { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.relocation-when { color: var(--pm-ink); }
.relocation-foot { flex-direction: column; align-items: flex-start; gap: 12px; }
.counter-note { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.counter-pair-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.counter-pair-form > div { flex: 1 1 14rem; min-width: 0; }
.counter-devices .pm-row-end { flex-wrap: wrap; justify-content: flex-end; }
.counter-devices .pm-row-end form { margin: 0; }
.counter-rows .pm-row-actions form { display: inline-flex; margin: 0; }
@media (max-width: 575.98px) { .counter-devices > li { flex-wrap: wrap; } .counter-devices .pm-row-end { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; } }

/* "Escolher horário" of the professional (service-agendas.php, docs/SERVICE-AGENDAS.md): the agenda in a toolbar under
   the title, the week a band per day and the free times dashed pills ("Selecionar" under the time). The management's
   "Agendas por serviço" keeps its look (round N6). */
.service-agenda-page.is-professional .service-agenda-toolbar { padding: 12px 16px; border: 1px solid var(--pm-support-line); border-radius: var(--pm-radius-card); background: var(--pm-support); }
.service-agenda-page.is-professional .service-agenda-facts { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.service-agenda-page.is-professional .service-agenda-facts strong { color: var(--pm-ink); font-size: var(--pm-fs-md); }
.service-agenda-page .service-agenda-week-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 8px; }
.service-agenda-page.is-professional .service-agenda-steps { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.service-agenda-page.is-professional .service-agenda-days { display: grid; gap: 4px 24px; }
@media (min-width: 992px) { .service-agenda-page.is-professional .service-agenda-days { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.service-agenda-page.is-professional .service-agenda-day > section > .pm-band { margin-top: 8px; }
.service-agenda-page.is-professional .service-agenda-day .agenda-slot-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 7.5rem), 1fr)); gap: 8px; margin-top: 8px; }
.service-agenda-page.is-professional .agenda-slot { min-height: 52px; border: 1px dashed var(--pm-free-line); border-radius: var(--pm-radius-field); background: var(--pm-surface); color: var(--pm-free-ink); text-decoration: none; }
.service-agenda-page.is-professional .agenda-slot strong { font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.service-agenda-page.is-professional .agenda-slot small { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.service-agenda-page.is-professional a.agenda-slot:hover { border-style: solid; border-color: var(--pm-brand); background: var(--pm-brand-soft); }
.service-agenda-page.is-professional .agenda-slot.is-unavailable { border-style: solid; border-color: var(--pm-rule); background: var(--pm-surface-2); color: var(--pm-ink-2); }
html.dark-mode .service-agenda-page.is-professional .agenda-slot { background: var(--pm-surface); border-color: var(--pm-free-line); color: var(--pm-free-ink); }
html.dark-mode .service-agenda-page.is-professional a.agenda-slot:hover { background: var(--pm-brand-soft); border-color: var(--pm-brand); }
html.dark-mode .service-agenda-page.is-professional .agenda-slot.is-unavailable { background: var(--pm-surface-2); border-color: var(--pm-rule); color: var(--pm-ink-2); }
.slot-picker-recap { padding: 10px 14px; border-left: 4px solid var(--pm-brand); border-radius: 0 var(--pm-radius-field) var(--pm-radius-field) 0; background: var(--pm-support); color: var(--pm-ink); font-weight: 600; }

/* Modelos of the professional (professional-evolution-templates.php, docs/CLINIC-EVOLUTION-TEMPLATES.md): one card of ruled rows,
   each model opening inside its row; "Novo modelo" in a drawer; the ready-made structures as support. */
.templates-page .templates-rows > li { display: block; padding: 0; }
.templates-page .template-row > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 4px; list-style: none; cursor: pointer; }
.templates-page .template-row > summary::-webkit-details-marker { display: none; }
.templates-page .template-row > summary::before { content: none !important; }
.templates-page .template-row > summary:hover { background: var(--pm-surface-2); }
.templates-page .template-row > summary:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: -2px; border-radius: 6px; }
.templates-page .template-row-open { flex: none; margin-left: auto; padding: 0 8px; color: var(--pm-brand-ink); font-weight: 650; }
.templates-page .template-row[open] > summary .template-row-open { color: var(--pm-ink-2); }
.templates-page .template-row-body { margin: 0 0 12px; padding: 12px 16px; border-left: 3px solid var(--pm-rule); }
.templates-page .template-row-archive { padding-top: 0; }
.templates-page .template-row-text { white-space: pre-wrap; }
.templates-page .template-gallery-note { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.templates-page .template-gallery .pm-rows > li { flex-wrap: wrap; }
html.dark-mode .templates-page .template-row > summary { color: var(--pm-ink) !important; }
dialog.template-new-drawer .pm-drawer-body textarea { min-height: 14rem; }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-N3 (17/11/2026, docs/VISUAL-SYSTEM.md, "Componentes da UX-N3"): variants for Consultas, Mensagens and Avisos of the
 * professional and the reception, over the UX-N2 and UX-N4 pieces.
 * ------------------------------------------------------------------------------------------------------------------ */
/* A filter pill that is a link to another list of the same page ("Todos", "Precisa de ação"): aria-current="page". */
.pm-filter[aria-current="page"] { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 650; }
.pm-filter[aria-current="page"] .pm-count { color: var(--pm-brand-ink); }
html.dark-mode a.pm-filter[aria-current="page"] { color: var(--pm-brand-ink); }
/* The × of an applied filter chip (C4) as a link, when removing it is a navigation (the reception's Consultas). */
.pm-applied-chip > a { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 999px; color: var(--pm-ink-2); text-decoration: none; }
.pm-applied-chip > a:hover { background: var(--pm-surface-3); color: var(--pm-ink); }
.pm-applied-chip > a:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 1px; }
.pm-applied-chip:has(> a) { padding-right: 2px; }
.service-bookings-list .service-bookings-focus { flex: 1 1 100%; margin: 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
/* The name of a row read as its title (16 px) also when the element is an h3 styled .h6 for the outline. */
.pm-list-rows .pm-row-title.h6 { font-size: var(--pm-fs-md); line-height: 1.4; }
@media (min-width: 576px) { .continuity-page .continuity-row > .pm-row-actions { padding-left: calc(6.75rem + 12px); } }
@media (max-width: 575.98px) { .continuity-page .continuity-row > .pm-row-lead { flex: 1 1 100%; } }
/* A long state word in a row ("Período terminou · peça revisão das preferências") wraps inside its chip at 320 px. */
.pm-row-chips .pm-chip { white-space: normal; text-align: left; }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-N5a (17/11/2026, docs/VISUAL-SYSTEM.md, "Componentes da UX-N5a"): C11 (a block with one action) and C12 (the
 * period of a finance screen), over the UX-N2 pieces.
 * ------------------------------------------------------------------------------------------------------------------ */
/* C11 (ui-block-state.php, finance-block.php): what a screen shows before anything else, a regular card with the icon,
   the sentence, why and the one filled action; "Ainda não ativado neste ambiente." quiet under it. */
.card.pm-block-state { flex-direction: row; align-items: flex-start; gap: 16px; padding: var(--pm-space-5); }
.pm-block-state-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 999px; background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-size: 1.375rem; }
.pm-block-state-text { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.workspace-page .pm-block-state-title, .pm-block-state-title { margin: 0; color: var(--pm-ink); font: 680 var(--pm-fs-lg)/1.3 var(--pm-font-display); letter-spacing: -.016em; }
.pm-block-state-text > p { margin: 0; max-width: 42rem; color: var(--pm-ink-2); overflow-wrap: anywhere; }
.pm-block-state-text > .pm-block-state-action { margin-top: 4px; }
.pm-block-state-text > .pm-block-state-setup { font-size: var(--pm-fs-sm); }
@media (max-width: 575.98px) {
  .card.pm-block-state { flex-direction: column; gap: 12px; padding: var(--pm-space-4); }
  .pm-block-state-icon { width: 40px; height: 40px; font-size: 1.125rem; }
}

/* C12 (finance-period.php): the period as pills, a period that matches none as its own marked pill with the dates, and
   the dates behind "Filtrar" (the quiet <details> of C3). */
.finance-period > .finance-period-pills { flex: 0 1 auto; min-width: 0; }
.finance-period .finance-period-custom { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 650; cursor: default; font-family: var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.finance-period .finance-period-custom:hover { background: var(--pm-brand-soft); }
.finance-period .pm-filter > i { font-size: 1rem; }
.finance-period-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.finance-period-field { flex: 1 1 10rem; min-width: 0; }
.finance-period-fields > .finance-period-wide { flex: 2 1 14rem; min-width: 0; }
.finance-period-submit { flex: none; }
.finance-period-note { margin: 12px 0 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.finance-period .pm-filter-panel-body > :is(p, .alert):last-child { margin-bottom: 0; }
.finance-period .pm-filter-panel-body > :is(p, .alert) { margin-top: 8px; }
@media (max-width: 575.98px) { .finance-period-field { flex-basis: 100%; } .finance-period-submit { flex: 1 1 100%; } }

/* Central de relatórios (report-center.php, the finance's and the management's; docs/REPORT-CENTER.md): the search as one
   line, the favorites a support card and the reports one list card with a ruled row each (the rules of the cards above
   were a grid of boxes). */
#report-center .report-center-toolbar .pm-search { max-width: 36rem; }
#report-center .report-views { padding: var(--pm-space-4) var(--pm-space-5) var(--pm-space-3); }
#report-center .report-views-empty { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
#report-center .report-view-list { display: block; }
#report-center .report-view { padding: 10px 0; border-bottom: 0; }
#report-center ul.report-center-grid { display: block; }
#report-center li.report-card { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; padding: 12px 0; border: 0; border-top: 1px solid var(--pm-rule); border-radius: 0; background: transparent; }
#report-center li.report-card:first-child { border-top: 0; }
#report-center li.report-card[hidden] { display: none; }
#report-center .report-card-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--pm-surface-2); color: var(--pm-brand-ink); font-size: 1.125rem; }
#report-center .report-card form { margin: 0; }
#report-center .report-card .pm-row-title { margin: 0; }
#report-center .report-card-tag { padding: 0 6px; border-color: var(--pm-border); font-size: var(--pm-fs-sm); line-height: 1.4; vertical-align: 1px; }
#report-center .report-search-empty { color: var(--pm-ink-2); }
@media (max-width: 575.98px) { #report-center li.report-card { flex-wrap: wrap; } #report-center li.report-card > .pm-row-end { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; padding-left: 52px; } }

/*
 * UX-N5b (17/11/2026, Agendar; docs/PUBLIC-SCHEDULING-UX.md): the booking page of the portals with the one-line
 * header, the hold's confirmation as a ruled part of its card (no box inside the card) and the text read with 14 px. The
 * public page keeps its flow; only the sizes changed there.
 */
/* Four steps (the public page) do not fit their names side by side on a phone at 14 px: the bars stay in a row and only
   the current step's name shows, under them; the other names stay for screen readers. */
@media (max-width: 575.98px) {
  .ps-stepper:has(> li:nth-child(4)) { position: relative; padding-bottom: 26px; }
  .ps-stepper:has(> li:nth-child(4)) > li > span:not(.ps-stepper-bar) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ps-stepper:has(> li:nth-child(4)) > li.is-current > span:not(.ps-stepper-bar) { left: 0; bottom: 0; width: auto; height: auto; overflow: visible; clip: auto; }
}
#public-scheduling-page .ps-hold-step { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--pm-rule); }
#public-scheduling-page .ps-hold-release { margin-top: 12px; }
#public-scheduling-page .agenda-avatar:not(.is-large) { font-size: var(--pm-fs-sm); }
#public-scheduling-page .slot-seats { font-size: var(--pm-fs-sm); }
/* In the portals the free times are the dashed pills of the other booking screens (UX-N4, .rs-slot): the free-time ink on
   the sheet; the chosen one pen blue with white text (on the label and its span: the dark <head> patch paints labels). */
#public-scheduling-page.patient-page .public-schedule-slot { border: 1px dashed var(--pm-free-line); background: var(--pm-surface); color: var(--pm-free-ink); }
#public-scheduling-page.patient-page .public-schedule-slot > span { color: var(--pm-free-ink); }
#public-scheduling-page.patient-page label.public-schedule-slot:hover { border-style: solid; border-color: var(--pm-brand); background: var(--pm-brand-soft); }
#public-scheduling-page.patient-page .public-schedule-slot:has(input:checked) { border-style: solid; border-color: var(--pm-brand-solid); background: var(--pm-brand-solid); color: #FFFFFF; }
#public-scheduling-page.patient-page .public-schedule-slot:has(input:checked) > span { color: #FFFFFF; }
/* The service and place cards line up with the other fields of the form (the fieldset is a .col-12 without its gutter). */
#public-scheduling-page.patient-page .ps-agenda-choice { padding-right: calc(var(--bs-gutter-x) * .5); padding-left: calc(var(--bs-gutter-x) * .5); }

/* ------------------------------------------------------------------------------------------------------------------
 * UX-N6a (17/11/2026, docs/VISUAL-SYSTEM.md, "Componentes da UX-N6a"): the professional's clinical modules. C14 (the
 * patient and the consultation's day on the title line, clinical-module-header.php) and C15 (a record in a list: the
 * records are ruled groups of one card, the void action opening under its row), over the UX-N2 and UX-N4 pieces.
 * ------------------------------------------------------------------------------------------------------------------ */
/* C14: "Ana Clara Souza · consulta de hoje" beside the title; the name in ink, the day quiet. */
.clinical-module-context { overflow-wrap: anywhere; }
.clinical-module-name { color: var(--pm-ink); font-weight: 650; }
/* A page whose name sits in the region its script scrubs draws the header there; the plain one outside shows only when
   that region is gone (the access ended in another tab). */
.clinical-module-page:has(.clinical-module-header) > [data-module-fallback] { display: none; }
/* A module's form in a drawer: the fields stacked, the confirmation a plain line, the feedback under it. */
.clinical-module-drawer .pm-drawer-body .row { --bs-gutter-y: 16px; }
.clinical-module-drawer .pm-drawer-body .permission-confirmation { margin: 0; }
.clinical-module-drawer .pm-drawer-body fieldset > legend { margin-bottom: 8px; }
.clinical-module-drawer .pm-drawer-hint { margin: 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
/* C15: the records of a module are ruled groups of one list card (an exam's series, a vaccine's doses, a quote, an
   answered form), two columns from 1200 px; never a card per record. */
.clinical-records-note { margin: 4px 0 8px; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.clinical-record-groups { display: grid; column-gap: 32px; }
@media (min-width: 1200px) { .clinical-record-groups.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.clinical-record-group { min-width: 0; padding: 16px 0; border-top: 1px solid var(--pm-rule); }
.clinical-record-groups > .clinical-record-group:first-child { border-top: 0; }
@media (min-width: 1200px) { .clinical-record-groups.is-two > .clinical-record-group:nth-child(2) { border-top: 0; } }
.clinical-record-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.clinical-record-group-title { margin: 0; color: var(--pm-ink); font: 650 var(--pm-fs-md)/1.4 var(--pm-font-sans); overflow-wrap: anywhere; }
.clinical-record-group-meta, .clinical-record-detail { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.clinical-record-group-meta strong { color: var(--pm-ink); }
.clinical-record-detail { margin: 2px 0 0; }
.clinical-record-group .pm-row-chips { margin: 6px 0 0; }
.clinical-record-group > details.pm-row-more, .clinical-record-group .exam-result-share { margin-top: 8px; }
.clinical-record-shared { color: var(--pm-ink); font-size: var(--pm-fs-sm); }
.clinical-record-group .patient-record-change-list { margin-top: 8px; }
/* A void or share action inside a table cell keeps the cell's width; its form opens left-aligned under the row. */
.stack-action details.pm-row-more { display: inline-block; text-align: left; }
.stack-action details.pm-row-more > summary { min-height: 36px; padding: 0 10px; }
.stack-action details.pm-row-more[open] { display: block; }
@media (max-width: 767.98px) { .stack-action details.pm-row-more > summary { min-height: 44px; } }
/* Family B (care plans, tasks, exams, guidance, prevention, contacts, measures): the editor that registers is one card
   whose summary is its head (the plus, the title, a quiet note, the chevron); open, the form under a rule. The situations
   are pills; the records one list card whose last row has no rule under it. */
.clinical-module-page details.card.care-editor { padding: 0; }
.clinical-module-page details.care-editor > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 12px; min-height: 56px; padding: 12px var(--pm-space-5); list-style: none; cursor: pointer; }
.clinical-module-page details.care-editor > summary::-webkit-details-marker { display: none; }
.clinical-module-page details.care-editor > summary::before { content: none !important; }
.clinical-module-page details.care-editor > summary::after { content: ''; flex: none; width: 8px; height: 8px; margin: 0 4px 4px auto; border: solid var(--pm-ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); font-size: 0; }
.clinical-module-page details.care-editor[open] > summary::after { margin-bottom: -2px; transform: rotate(225deg); }
.clinical-module-page details.care-editor > summary:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: -2px; border-radius: var(--pm-radius-card); }
.care-editor-title { display: inline-flex; align-items: center; gap: 8px; color: var(--pm-brand-ink); font: 680 var(--pm-fs-lg)/1.3 var(--pm-font-display); }
.care-editor-note { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.clinical-module-page .care-editor-body { margin: 0; padding: var(--pm-space-4) var(--pm-space-5) var(--pm-space-5); border-top: 1px solid var(--pm-rule); }
.care-editor-hint { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
@media (max-width: 575.98px) { .clinical-module-page details.care-editor > summary, .clinical-module-page .care-editor-body { padding-left: var(--pm-space-4); padding-right: var(--pm-space-4); } .care-editor-note { order: 2; flex-basis: 100%; } }
html.dark-mode .clinical-module-page details.care-editor > summary { color: var(--pm-ink) !important; }
html.dark-mode .care-editor-title { color: var(--pm-brand-ink); }
.care-filters { margin-bottom: var(--pm-space-4); }
/* The situation pills of family B are links to the same page (aria-current="page"), drawn like the pressed pill. */
.care-filters .pm-filter[aria-current="page"] { border-color: var(--pm-brand); background: var(--pm-brand-soft); color: var(--pm-brand-ink); font-weight: 650; }
.care-filters .pm-filter[aria-current="page"] .pm-count { color: var(--pm-brand-ink); }
html.dark-mode .care-filters a.pm-filter[aria-current="page"] { color: var(--pm-brand-ink); }
/* A record's head in family B: the date in mono, the title, the situation chip and one detail line; its actions are
   quiet buttons and its closing step opens in the line (details.pm-row-more). */
.care-record-when { color: var(--pm-ink-2); font: 500 var(--pm-fs-sm)/1.3 var(--pm-font-mono); font-variant-numeric: tabular-nums; }
.care-record-detail { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.care-list-card .pm-chip { align-self: flex-start; }
.care-record-note { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
/* C11 with other ways out (Conversas): they stay quiet, under the block. */
.pm-block-state-more { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--pm-space-2) 0 0; }
.care-list-card :is(.care-plan-list, .care-task-list, .care-exam-list, .tracking-list, .contact-list) { border-top: 0; }
.care-list-card :is(.care-plan-record, .care-task-record, .care-exam-record, .tracking-record, .contact-record):last-child { border-bottom: 0; }
.care-list-card .pm-card-head { margin-bottom: 8px; }
/* Family C (Responsáveis, Convites de responsável, Convites para a área do paciente, Atendimento imediato), Compartilhados
   comigo and Meus repasses. A page whose section is shared with management marks only its plain title as the fallback
   (data-module-fallback): it hides while the C14 header drawn inside the scrubbed region is there. */
.workspace-page:has(.clinical-module-header) > [data-module-fallback] { display: none; }
/* The access card: the head (the person or the subject, and the chip), the contact, then each part (send, what the guardian
   may do, the review) under a rule; the danger action last, opening in the line (details.pm-row-more.is-danger). */
:is(.guardian-detail, .guardian-editor, .invite-card, .immediate-selector) { padding: var(--pm-space-5); }
:is(.guardian-detail, .invite-card) > .pm-card-head { margin-bottom: 4px; }
:is(.guardian-section, .invite-section) { margin-top: var(--pm-space-4); padding-top: var(--pm-space-4); border-top: 1px solid var(--pm-rule); }
:is(.guardian-section, .invite-section) > h3, .guardian-section legend { float: none; width: auto; margin-bottom: 8px; color: var(--pm-ink); font: 650 var(--pm-fs-md)/1.4 var(--pm-font-sans); }
:is(.guardian-section-note, .invite-note, .guardian-detail-note) { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.guardian-detail-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.guardian-detail-state .pm-row-detail { margin: 0; }
.guardian-editor > h2 { margin-bottom: var(--pm-space-3); }
/* The links of a minor: each row is one link (name, kinship, chip); the open one has the soft blue and a bar. */
.guardian-rows > li { padding: 2px 0; }
.guardian-row-link { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: calc(100% + 24px); min-height: 56px; margin: 0 -12px; padding: 10px 12px; border-radius: 8px; color: var(--pm-ink); text-decoration: none; }
.guardian-row-link:hover { background: var(--pm-surface-2); color: var(--pm-ink); }
.guardian-row-link:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: -2px; }
.guardian-row-link[aria-current="true"] { background: var(--pm-brand-soft); box-shadow: inset 3px 0 0 var(--pm-brand); }
.guardian-row-link .pm-row-detail { margin: 0; }
.guardian-row-link .pm-row-chips { margin-top: 4px; }
html.dark-mode .guardian-rows a.guardian-row-link:not(.btn) { color: var(--pm-ink); }
/* The guardian pages keep their feedback outside the region the script empties (so a message survives it), but show it
   under the title drawn inside that region (rule 2: the title, then the notice). */
#guardian-workspace:has(> [data-guardian-content] > .clinical-module-header) { display: flex; flex-direction: column; }
#guardian-workspace:has(> [data-guardian-content] > .clinical-module-header) > [data-guardian-content] { display: contents; }
#guardian-workspace:has(> [data-guardian-content] > .clinical-module-header) > [data-guardian-feedback] { order: 1; }
#guardian-workspace > [data-guardian-content] > * { order: 2; }
#guardian-workspace > [data-guardian-content] > .clinical-module-header { order: 0; }
/* Atendimento imediato: the unit and service, then the start as the emphasis card. */
.immediate-selector .row { --bs-gutter-y: 12px; }
.immediate-start { padding: var(--pm-space-5); }
.immediate-start-line { color: var(--pm-ink-2); }
.clinic-immediate-page :is(.btn, .form-select) { min-height: 44px; }
/* Meus repasses: what is left to pay in the emphasis card, then the payouts' list card. */
.payouts-due { padding: var(--pm-space-4) var(--pm-space-5); }
.payouts-due h2.pm-label { margin: 0; color: var(--pm-brand-ink); font-size: var(--pm-fs-sm); }
html.dark-mode .payouts-due h2.pm-label { color: var(--pm-brand-ink) !important; }
.payouts-due-value { margin: 4px 0 2px; color: var(--pm-ink); font: 720 1.75rem/1.2 var(--pm-font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.payouts-due-note { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.payouts-list .table-responsive { margin-top: 4px; }
@media (max-width: 767.98px) {
  :is(.guardian-detail, .guardian-editor, .invite-card, .immediate-selector, .immediate-start) { padding: var(--pm-space-4); }
  .payouts-due { padding: var(--pm-space-4); }
}

/*
 * UX-N6c (17/11/2026, docs/VISUAL-SYSTEM.md, "Componentes da UX-N6c"): the account pages of every area. Segurança, Senha, Sessões,
 * Minhas notificações and Minha conexão Google keep their rules in their sections of workspace.css (rewritten: no blue panel, no
 * 3:1 border, no box inside a card); here the pages that had no rules of their own: Agenda no celular, Exportar meus dados and Ajuda.
 */
/* Agenda no celular: one card for the clinic's link (generating a new one is a ruled part, turning it off opens in the line); the
   link just issued is the emphasis card. */
#professional-calendar-feed :is(.calendar-feed-card, .calendar-feed-issued) { padding: var(--pm-space-5); }
#professional-calendar-feed .calendar-feed-card .pm-card-head { margin-bottom: var(--pm-space-2); }
#professional-calendar-feed .calendar-feed-read { color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
#professional-calendar-feed .calendar-feed-part { margin-top: var(--pm-space-2); padding-top: var(--pm-space-4); border-top: 1px solid var(--pm-rule); }
#professional-calendar-feed .calendar-feed-revoke { margin-top: var(--pm-space-3); }
#professional-calendar-feed .calendar-feed-steps { padding-left: 1.25rem; font-size: var(--pm-fs-sm); }
#professional-calendar-feed :is(.btn, .form-control) { min-height: 44px; }
/* Exportar meus dados: what goes in the file as ruled lines, then the confirmation and the download. */
#professional-data-export .data-export-card { padding: var(--pm-space-5); }
#professional-data-export .data-export-rows > li { justify-content: flex-start; padding: 10px 0; }
#professional-data-export .data-export-rows i { color: var(--pm-ink-2); }
#professional-data-export .data-export-form { margin-top: var(--pm-space-2); padding-top: var(--pm-space-2); border-top: 1px solid var(--pm-rule); }
#professional-data-export .pm-block-state { margin-bottom: var(--pm-space-4); }
#professional-data-export :is(.btn, .form-control) { min-height: 44px; }
/* Ajuda da área: the tips as ruled lines with the way to the help center in the card's head; the report form as the second card. */
#support-help .support-topic-rows > li { align-items: flex-start; }
#support-help .support-topic-rows > li > i { flex: none; margin-top: 2px; color: var(--pm-brand-ink); }
#support-help :is(.support-topic-foot, .support-report-note) { font-size: var(--pm-fs-sm); color: var(--pm-ink-2); }
#support-help .support-report-card { padding: var(--pm-space-5); }
#support-help :is(.btn, .form-control) { min-height: 44px; }
@media (max-width: 767.98px) {
  #professional-calendar-feed :is(.calendar-feed-card, .calendar-feed-issued), #professional-data-export .data-export-card, #support-help .support-report-card { padding: var(--pm-space-4); }
}

/* UX-O (17/11/2026, docs/VISUAL-SYSTEM.md, "UX-O: escolher onde trabalhar"): one list for every place a person can work in
   (work-place-list.php): a common card (C2) where each clinic is a band (.pm-band) and each area, clinic or represented
   patient a ruled row with one action. The current place is marked in the list itself (the emphasis blue, the 4 px stroke
   and "Você está aqui"); the confirmation is a drawer (work-place-confirm.php) whose filled button names the destination. */
.pm-place-list .pm-card-head { margin-bottom: 0; }
.pm-place-list .pm-band { margin: 8px 0 0; }
.pm-place-list .pm-band-state { margin-left: auto; }
.pm-place-list .pm-band + .pm-place-rows > li:first-child { border-top: 0; }
.pm-place-rows > li { position: relative; align-items: center !important; flex-wrap: nowrap !important; gap: 12px !important; min-height: 60px; padding: 10px 0; }
.pm-place-rows > li > .pm-row-main { flex: 1 1 auto !important; }
.pm-place-rows .pm-row-end { flex: none !important; margin-left: auto !important; padding-left: 0 !important; justify-content: flex-end !important; }
.pm-place-rows .pm-row-end > form { display: contents; }
.pm-place-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--pm-surface-2); color: var(--pm-ink-2); font-size: 1.125rem; }
.pm-place-icon.is-monogram { border-radius: 999px; font: 650 var(--pm-fs-sm)/1 var(--pm-font-sans); text-transform: uppercase; }
.pm-place-rows .pm-row-title { margin: 0; font-size: var(--pm-fs-md); }
.pm-place-rows > li.is-current { margin: 4px -8px; padding: 10px 8px 10px 12px; border-top-color: transparent; border-radius: 10px; background: var(--pm-emph); box-shadow: inset 4px 0 0 var(--pm-emph-line); }
.pm-place-rows > li.is-current + li { border-top-color: transparent; }
.pm-place-rows > li.is-current .pm-place-icon { background: var(--pm-brand); color: var(--pm-on-brand); }
html.dark-mode .pm-place-rows > li.is-current .pm-place-icon { background: var(--pm-brand-soft-2); color: var(--pm-brand-ink); }
.pm-place-here { white-space: nowrap; }
/* The row's one action, "Abrir ›": a quiet button whose target covers the row (::after); the focus ring stays on the button. */
.pm-place-open { min-height: 44px; padding-inline: 12px; white-space: nowrap; }
.pm-place-open::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.pm-place-open:focus-visible { outline: 2px solid var(--pm-focus); outline-offset: 2px; }
.pm-place-rows > li:has(> .pm-row-end .pm-place-open:is(:hover, :focus-visible)) { background: var(--pm-surface-2); border-radius: 10px; }
.pm-place-rows > li:has(> .pm-row-end .pm-place-open:hover), .pm-place-rows > li:has(> .pm-row-end .pm-place-open:hover) + li { border-top-color: transparent; }
.pm-place-rows > li.is-off .pm-row-title { color: var(--pm-ink-2); }
/* What happens to the other tabs, in one line at the foot of the card. */
.pm-place-foot { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; padding: 12px 0 4px; border-top: 1px solid var(--pm-rule); color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.pm-place-foot > i { flex: none; margin-top: 1px; }
/* The drawer (the UX-N2 drawer; the sheet from the bottom on phones): where it leaves, where it goes and, only when the rule
   asks, the password and the code. */
.pm-place-route { display: grid; gap: 0; margin: 0; padding: 4px 16px; border-radius: var(--pm-radius-card); background: var(--pm-support); border: 1px solid var(--pm-support-line); }
.pm-place-route > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 0; }
.pm-place-route > div + div { border-top: 1px solid var(--pm-rule); }
.pm-place-route dt { color: var(--pm-ink-2); font: 600 var(--pm-fs-label)/1.35 var(--pm-font-mono); letter-spacing: .09em; text-transform: uppercase; }
.pm-place-route dd { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.pm-place-route dd .pm-place-icon { width: 32px; height: 32px; font-size: 1rem; }
.pm-place-route dd .pm-place-icon.is-monogram { font-size: .75rem; }
.pm-place-route dd.is-to .pm-place-icon { background: var(--pm-brand); color: var(--pm-on-brand); }
html.dark-mode .pm-place-route dd.is-to .pm-place-icon { background: var(--pm-brand-soft-2); color: var(--pm-brand-ink); }
.pm-place-tabs { display: flex; gap: 8px; margin: 0; color: var(--pm-ink); }
.pm-place-tabs > i { flex: none; color: var(--pm-ink-2); margin-top: 1px; }
.pm-place-fields { display: grid; gap: 16px; }
.pm-place-fields .form-label { font-weight: 600; }
.pm-place-fields .form-control { min-height: 48px; font-size: 1rem; }
.pm-place-fields .form-text { margin: 4px 0 0; color: var(--pm-ink-2); }
.pm-place-window { margin: -8px 0 0; color: var(--pm-ink-2); font-size: var(--pm-fs-sm); }
.pm-place-drawer .alert { margin: 0; }
.pm-place-drawer .alert:empty, .pm-place-drawer .alert.d-none { display: none; }
dialog.pm-drawer .pm-drawer-head h2 { margin: 6px 0 0; font-size: var(--pm-fs-lg); }
@media (min-width: 576px) { dialog.pm-place-drawer .pm-drawer-foot { justify-content: flex-start; flex-direction: row-reverse; } }
/* On a computer the list keeps the reading width (48rem) of the title; the professional's registration sits beside it from
   1200 px. */
@media (min-width: 992px) { .pm-place-page > :is(.pm-place-list, .pm-card-support, .alert, .patient-choice-list, #guardian-choice) { max-width: 48rem; } }
.pm-place-columns > * { max-width: 48rem; }
@media (min-width: 1200px) {
  .pm-place-columns { display: grid; grid-template-columns: minmax(0, 48rem) minmax(0, 1fr); align-items: start; gap: 24px; }
  .pm-place-columns > .pm-card-support { margin-top: 0 !important; }
}
