/* Shared content containment, loaded after each surface's component styles.
   Constrain flexible children, never the tracks inside scrollable calendars. */
*, *::before, *::after { box-sizing: border-box; }
html { max-width: 100%; }
body { min-width: 0; margin-inline: 0; overflow-wrap: break-word; }
html, body { overflow-x: clip; }

/* T74 — a quiet scrollbar shared by every web surface. The thumb is
   transparent at rest and is revealed briefly by scrollbars.js. */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
html.is-scrolling * { scrollbar-color: color-mix(in srgb, var(--text-soft) 55%, transparent) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border-radius: var(--radius-sm); background: transparent; }
html.is-scrolling *::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-soft) 55%, transparent); }
body :where(div, section, article, aside, main, nav, header, footer, form, fieldset, label, ul, ol, li, dl, dt, dd) { min-width: 0; }
:where(h1, h2, h3, h4, p, a, button, label, small, strong, span, code, td, th, dt, dd) {
  overflow-wrap: break-word;
  word-break: normal;
}

:where(button, input, select, textarea) { max-width: 100%; font: inherit; }
:where(button, .button, .badge, .status-pill, .su-badge, .pill, .tag) { white-space: normal; height: auto; }
:where(input, select, textarea) { min-width: 0; }
:where(img, video, svg) { max-width: 100%; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}
:where(input, textarea)::placeholder { color: var(--text-muted); opacity: 1; }
:where(.table-wrap, .price-rate-table-wrap, .price-progressive-table-wrap, .unit-calendar-scroll,
  .property-timeline-scroll, .annual-calendar-scroll, .calendar-table-wrap, .su-table-wrap) {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
th, td { white-space: normal; overflow-wrap: break-word; }
:where(.page-heading, .section-heading, .panel-heading, .card-head, .su-listing-heading, .modal-actions, .actions-row) { flex-wrap: wrap; }

/* Controls wrap between words; their containers must not squeeze a word.
   A card implemented as a button still gets normal prose wrapping. */
body :is(button, .button, .su-button, .badge, .status-pill, .su-status, .su-badge, .pill, .tag, summary, time, .date-label) {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
body :is(.button, .su-button, .badge, .status-pill, .su-status, .su-badge, .pill, .tag) {
  min-inline-size: min-content;
  flex-shrink: 0;
}
body :is(.button, .su-button, .badge, .status-pill, .su-status, .su-badge, .pill, .tag) :where(span, small, strong) { overflow-wrap: normal; }
body :is(.nav-item, .page-subnav-item, .su-tab, time, .date-label),
.segmented button, .segmented-control button, .mobile-tabbar button {
  white-space: nowrap;
  overflow-wrap: normal;
  flex-shrink: 0;
}
.segmented, .segmented-control { display: flex; flex-wrap: wrap; max-width: 100%; }
.segmented button, .segmented-control button { flex: 0 0 auto; min-width: max-content; }
.panel-header, .su-card-header, .row-top { flex-wrap: wrap; }
.panel-header > div, .su-card-header > div { flex: 1 1 12rem; }
.panel-header > .panel-actions { flex: 0 1 auto; }
.panel-actions, .su-actions, .pill-row, .reservation-list-pills { flex-wrap: wrap; }
.drive-folder-card .row-top > div { flex-basis: 12rem; }
.drive-folder-card .row-title { overflow-wrap: normal; }
.row-top > .pill { max-width: 100%; }

/* This menu needs one full-width row per action, even inside a flex header. */
.finance-more-actions > div { grid-template-columns: minmax(0, 1fr); }
.finance-more-actions > div .button { min-width: 0; white-space: normal; overflow-wrap: normal; }
.finance-audit-list > div { display: flex; flex-wrap: wrap; align-items: baseline; }
.finance-audit-list .date-label { flex: 0 0 auto; }
.core-channel-node.is-airbnb { width: max-content; min-width: 120px; grid-template-columns: 25px max-content; }
.core-channel-node small, .core-channel-node.is-airbnb small, .core-readiness-ring strong { white-space: nowrap; overflow-wrap: normal; }
.core-readiness-ring > span { min-width: max-content; }
.core-readiness-ring { flex-shrink: 0; }

/* Notices size to their content instead of stretching with neighbouring cards. */
.dashboard-notice-panel { align-self: start; margin-bottom: 18px; }
.dashboard-notice-panel .panel-body { display: grid; align-content: start; gap: 16px; }
.auto-reply-notice { display: grid; justify-items: start; align-content: start; gap: 10px; }
.auto-reply-notice + .auto-reply-notice { padding-top: 18px; border-top: 1px solid var(--line); }
.auto-reply-notice > p, .dashboard-notice-panel h3 { margin: 0; }
.regulation-notice-panel [data-regulation-notice] { display: grid; justify-items: start; gap: 12px; margin: 0; }

/* Native inputs retain Space, focus, mixed state and forced-colour support. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  flex: 0 0 20px;
  margin: 0;
  border: 1.5px solid var(--text-muted);
  border-radius: 5px;
  background: var(--surface);
  vertical-align: middle;
  cursor: pointer;
}
input[type="checkbox"]::after { content: ""; width: 10px; height: 6px; }
input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:checked::after { border: solid var(--surface); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
input[type="checkbox"]:indeterminate::after { height: 2px; background: var(--surface); }
input[type="checkbox"]:disabled { opacity: .55; cursor: not-allowed; }
@media (forced-colors: active) { input[type="checkbox"] { appearance: auto; } input[type="checkbox"]::after { display: none; } }

/* Miguel: quiet navigation, light dividers, a clear active indicator. */
[data-miguel-theme] body { background-image: none; }
.nav-item { border-radius: 10px; }
.nav-item.is-active { color: var(--primary-dark); background: var(--primary-soft); box-shadow: inset 3px 0 var(--accent); }
.lab-banner { color: var(--primary-dark); background: var(--primary-soft); border-color: var(--primary-line); }
.lab-banner strong { color: var(--primary-dark); }
.mobile-header { color: var(--text); background: var(--surface); border-color: var(--primary-line); }
.mobile-app-name, .mobile-sync-status { color: var(--text-soft); }
.mobile-sync-status { background: var(--surface-muted); border-color: var(--line); }
.mobile-header-copy strong, .lab-banner span { white-space: normal; overflow: visible; }
.app-update-banner { background: var(--text); flex-wrap: wrap; }
.app-update-banner button { color: var(--text); }
.brand-mark { flex: 0 0 44px; background: var(--primary-faint); }
.brand-mark img { width: 36px; height: 36px; object-fit: contain; }

.app-shell .managed-reservation-row, .app-shell .managed-reservation-row *,
.app-shell .core-kpi-card, .app-shell .core-kpi-card * { min-width: 0; overflow-wrap: break-word; }
.managed-reservation-row { overflow: visible; border-left-width: 3px; padding: 18px; gap: 16px 20px; box-shadow: var(--shadow-soft); }
.managed-reservation-guest > div { flex: 1 1 6rem; }
.managed-reservation-action { max-width: 100%; }
.managed-reservation-action .button { min-width: min-content; white-space: normal; }
.app-shell .managed-reservation-row :is(.button, .pill, .badge, .status-pill) {
  min-width: min-content;
  overflow-wrap: normal;
  flex-shrink: 0;
}
.app-shell .managed-reservation-dates strong { overflow-wrap: normal; }
.managed-reservation-dates { grid-template-columns: minmax(0, 1fr) auto; }
.managed-reservation-dates strong, .managed-reservation-guest dd, .managed-reservation-contact strong,
.managed-reservation-contact a { font-weight: 600; line-height: 1.5; }
.managed-reservation-guest dt, .managed-reservation-contact > span { font-size: 12px; font-weight: 600; }
.managed-reservation-property { line-height: 1.5; }
.core-action-row.is-green .core-action-icon, .core-setup-list > div.is-ready > span { color: var(--green); background: var(--green-soft); }
.core-setup-list .is-ready small, .is-done .badge { color: var(--green); }

/* Five existing steps, no new actions or business copy. */
.property-wizard { border-radius: 20px; box-shadow: var(--shadow); }
.property-wizard progress { accent-color: var(--primary); height: 6px; }
.property-wizard ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.property-wizard ol li { padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); font-size: 13px; line-height: 1.5; }
.property-wizard [aria-current="step"] { color: var(--primary-dark); background: var(--primary-soft); border-color: var(--primary); font-weight: 700; text-decoration: none; }
.property-wizard-state { border: 1px solid var(--line); background: var(--surface-muted); color: var(--text); font-weight: 500; }
.listing-title { padding: 20px; border: 1px solid var(--primary-line); border-radius: 14px; background: var(--primary-faint); }
.listing-title label { display: grid; gap: 10px; font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.listing-title input { width: 100%; min-height: 52px; font-size: 19px; font-weight: 600; border-color: var(--primary); color: var(--text); background: var(--surface); }
.listing-title small { display: block; margin-top: 8px; color: var(--text-soft); font-size: 13px; }
.property-wizard .modal-actions { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding-block: 14px; }
.property-timeline-bar { height: 44px; min-height: 44px; }
.property-timeline-bar .calendar-bar-label { min-width: 0; }
.miguel-assistant { max-width: calc(100vw - 24px); }
.miguel-assistant :where(button, p, strong, span, textarea) { overflow-wrap: break-word; }
.guide-language { flex-wrap: wrap; }
.guide-times { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }

/* Explicit exceptions only: addresses/identifiers or a single long data token.
   Kept after the card subtree rules so normal names never inherit anywhere. */
body a[href^="mailto:"],
body [data-text-token="email"],
body [data-text-token="url"],
body [data-text-token="identifier"],
.app-shell [data-text-token="unbroken"] {
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 900px), (display-mode: standalone) {
  /* The notice takes its own space: its height can grow with text or zoom. */
  .app-update-banner { position: static; max-width: none; margin: 12px; padding: 12px; border-radius: 12px; }
  .app-update-banner button { min-height: 44px; }
  body :is(button, .button, .icon-button, input:not([type="checkbox"]):not([type="radio"]), select, summary, .download-link) { min-height: 44px; }
  body :is(label, .checkbox-line, .checkbox-row):has(input[type="checkbox"], input[type="radio"]) { min-height: 44px; align-content: center; }
  body :is(label, dt, th, .badge, .status-pill, .su-badge, .pill, .tag) { font-size: 14px; }
  body :is(input, select, textarea) { font-size: 16px; }
  .managed-reservation-row { padding: 14px; }
  .managed-reservation-row :where(small, dt, span), .mobile-app-name, .mobile-sync-status { font-size: 13px; }
  .mobile-tabbar { align-items: stretch; }
  .su-card-header > div { flex: 0 1 auto; }
  body .mobile-tabbar button { font-size: 12px; }
  body small { font-size: 13px !important; line-height: 1.45; }
  .card-head .badge { flex-shrink: 1; }
  .owner-month-week { min-height: calc(80px + (var(--lane-count, 1) * 48px)); }
  .owner-month-bars { grid-auto-rows: 48px; }
  .owner-calendar-event { height: 44px; padding-inline: 5px; }
}
@media (max-width: 600px) {
  .property-wizard ol { grid-template-columns: 1fr; gap: 5px; }
  .property-wizard ol li { padding: 8px 12px; }
  .property-wizard .modal-actions > button { flex: 1 1 120px; }
  .managed-reservation-guest { flex-basis: 100%; }
  .managed-reservation-property, .managed-reservation-contact { flex-basis: 100%; }
}
/* Local font shared by management and neutral public portals. */
html { font-optical-sizing: auto; }
html, body { font-family: var(--font-ui); }
body:has(#mainSidebar) { -webkit-tap-highlight-color: transparent; }

/* T50 — shared glass primitives, after module styles. */
:root body {
  background: radial-gradient(1200px 700px at 10% 0%,var(--gradient-rose),transparent 60%),
    radial-gradient(1000px 700px at 90% 20%,var(--gradient-lilac),transparent 55%),
    radial-gradient(900px 700px at 60% 100%,var(--gradient-mint),transparent 55%),var(--bg);
  background-attachment: fixed; color: var(--text); font-size: 16px;
}
:root body :is(.app-main, .main, .portal-main) { background: transparent; }
:root body :is(.panel, .stat-card, .core-kpi-card, .kpi-card, .statistics-chart, .statistics-report) {
  background: var(--glass-surface); border: 1px solid var(--glass-edge); border-radius: var(--card-radius); box-shadow: var(--shadow-glass);
}
:root body :is(.panel-header, .panel-body) { background: transparent; }
:root body :is(.row-card, .su-list-row, .managed-reservation-row, .stay-row, .invoice-row, .document-row, .request-row),
:root body :is(table, tr, th, td) { box-shadow: none; }
:root body :is(.button, .su-button, .primary-button, .secondary-button, :where(.portal-actions button)) {
  border-radius: var(--radius-md); border: 1px solid var(--glass-edge); background: var(--glass-field); box-shadow: var(--shadow-glass-sm);
}
:root body :is(.button-secondary, .secondary-button) { background: var(--glass-field); color: var(--text); }
:root body :is(.button-primary, .primary-button) { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-primary); }
:root body :is(.pill, .status-pill) { font-size: 11px; }
:root body :is(button, [role="button"], .nav-item):not(#calendarView *):not(.month-calendar *):not(.owner-month-calendar *):not(.property-month-grid *) {
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-press) ease, border-color var(--dur-press) ease;
}
:root body :is(button, [role="button"], .nav-item):not(#calendarView *):not(.month-calendar *):not(.owner-month-calendar *):not(.property-month-grid *):active {
  transform: scale(.97);
}
:root body :is(tbody tr, summary, .su-thread, .row-card.is-clickable, .managed-reservation-row, .stay-row, .invoice-row, .document-row, .request-row):active { background: var(--hover); }
@media (hover: hover) and (pointer: fine) {
  :root body tbody tr:hover { background: var(--hover); }
  :root body :is(.button-primary, .primary-button):hover { background: var(--primary-hover); }
}
:root body :is(.button, .su-button, .primary-button, .secondary-button):active { box-shadow: none; }
:root body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]), select, textarea) {
  background: var(--glass-field); color: var(--text); border: 1px solid var(--glass-edge); border-radius: 12px; box-shadow: none;
}
:root body :is(input[type=checkbox], input[type=radio]) { box-shadow: none; accent-color: var(--primary); }
:root body input[type=checkbox]:checked::after { border-color: var(--on-primary); }
:root body input[type=checkbox]:indeterminate::after { background: var(--on-primary); }
:root body :is(dialog, .modal, .core-owner-drawer, .detail-drawer, .calendar-selection-panel) { background: var(--glass-dense); color: var(--text); box-shadow: var(--shadow-overlay); }
:root body dialog::backdrop {
  background: var(--backdrop);
  -webkit-backdrop-filter: var(--backdrop-filter);
  backdrop-filter: var(--backdrop-filter);
}
:root body :is(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
:root body a:not(.button):not(.primary-button):not(.secondary-button) { color: var(--link); }
:root body :is(.today-grid, .core-work-grid, .core-kpi-grid, .finance-top-metrics, .statistics-metrics, .statistics-comparison, .statistics-charts, .kpi-grid, .dashboard-grid, .core-properties-grid) { gap: 24px; }
:root body :is(.statistics-metrics, .statistics-comparison) article { background: var(--glass-surface); border: 1px solid var(--glass-edge); border-radius: var(--card-radius); box-shadow: var(--shadow-glass); padding: 16px; }
:root body .panel + .panel { margin-top: 24px; }
:root body :is(.toolbar, .modal-actions, .actions-row, .panel-actions) { gap: 14px; }
:root body #mainSidebar { background: var(--glass-menu); border: 0; border-right: 1px solid var(--glass-edge); box-shadow: none; }
:root body #navList { gap: 6px; }
:root body #navList .nav-section-label {
  display: block;
  margin: 8px 10px 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
}
:root body #navList .nav-section-label:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
:root body.sidebar-collapsed #navList .nav-section-label { display: none; }
:root body #navList .nav-item { min-height: 44px; border-radius: 14px; color: var(--text); background: transparent; box-shadow: none; }
:root body #navList .nav-item.is-active { background: transparent; box-shadow: none; font-weight: 600; }
:root body :is(.portal-nav, .settings-index) button:is(.is-active, [aria-current=page]) { box-shadow: none; background: var(--bg); color: var(--text); }

/* Shared tab geometry. Liquid glass reads existing ARIA states; date selections stay independent. */
:root body :is(#billingView .finance-tabs, .segmented, .segmented-control, .page-subnav, .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs, .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs, .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters, .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices, [role=tablist]) {
  display: flex; flex-wrap: wrap; max-width: 100%; min-width: 0; gap: 6px; padding: 4px; margin-block: 10px 18px;
  background: transparent; border: 0; border-radius: var(--radius-md); box-shadow: none;
  overflow-x: clip;
}
:root body :is(#billingView .finance-tabs, .segmented, .segmented-control, .page-subnav, .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs, .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs, .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters, .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices, [role=tablist]) > :is(button, [role=tab]) {
  flex: 0 0 auto; min-width: max-content; min-height: 44px; height: auto; padding: 10px 12px; margin: 0;
  border: 0; border-radius: var(--radius-sm); background: transparent; box-shadow: none; color: var(--tab-text); font-weight: 500;
  white-space: nowrap; overflow-wrap: normal; word-break: normal;
}
:root body :is(#billingView .finance-tabs, .segmented, .segmented-control, .page-subnav, .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs, .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs, .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters, .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices, [role=tablist]) > :is(button, [role=tab]):is(.is-active, [aria-selected=true], [aria-pressed=true], [aria-current=page]) {
  color: var(--text); font-weight: 700; background: transparent; box-shadow: none;
}
:root body :is(.segmented, .segmented-control, .page-subnav, .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs, .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs, .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters, .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices, [role=tablist]) > :is(button, [role=tab]):focus-visible { outline-offset: -3px; }
/* T49 preference controls retain their behavior; T50 shares their selection. */
:root body .appearance-modes { display: flex; max-width: 100%; width: fit-content; padding: 4px; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
:root body .appearance-modes button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
:root body .appearance-modes button[aria-pressed=true] { background: var(--glass-pill); color: var(--text); box-shadow: none; }
:root body .appearance-modes svg, :root body .theme-toggle svg { width: 18px; height: 18px; flex: 0 0 18px; }
:root body .theme-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-glass-sm); cursor: pointer; }
:root body :is(.theme-toggle, .appearance-modes button):focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
:root body .sidebar-theme-control { display:flex; margin-top:8px; }
:root body .sidebar-theme-control .theme-toggle { border-color:transparent; background:transparent; box-shadow:none; }
:root body.sidebar-collapsed .sidebar-theme-control { justify-content:center; }
:root body .sidebar-footer { display: flex; align-items: center; gap: 12px; }
:root body.sidebar-collapsed .sidebar-footer { justify-content: center; padding-inline: 0; }
:root body.sidebar-collapsed .sidebar-footer .lab-mention { display: none; }
:root body .portal-header > .theme-toggle { margin-left: auto; }

/* T58 — compact global actions and anchored menus. */
.topbar-tools, .mobile-header-actions { display: flex; align-items: center; gap: 6px; }
@media (min-width:901px) {
  body:not([data-current-view="calendar"]) .topbar { position:relative; }
  body:not([data-current-view="calendar"], [data-current-view="dashboard"]) .topbar {
    --topbar-tools-width:232px;
    --topbar-tools-gap:8px;
    box-sizing:border-box;
    padding-right:calc(var(--topbar-tools-width) + var(--topbar-tools-gap));
  }
  body:not([data-current-view="calendar"]) .topbar > .topbar-tools { position:absolute; top:0; right:0; }
  body:not([data-current-view="calendar"], [data-current-view="dashboard"]) .topbar > .topbar-tools { width:var(--topbar-tools-width); justify-content:flex-end; }
  body[data-current-view="dashboard"] .topbar {
    display:grid; grid-template-columns:minmax(0,1fr) 190px; grid-template-rows:auto auto;
    align-items:start; column-gap:10px; padding-right:210px;
  }
  body[data-current-view="dashboard"] .topbar > div:first-child { grid-column:1; grid-row:1; }
  body[data-current-view="dashboard"] .topbar > #dashboardPeriod { grid-column:1 / -1; grid-row:2; justify-self:start; margin:4px 0 0; }
  body[data-current-view="dashboard"] .topbar-actions { grid-column:2; grid-row:1; width:190px; justify-content:flex-end; }
  body:not([data-current-view="calendar"]):has(.topbar > .page-subnav:not([hidden])) .topbar {
    display:grid; grid-template-columns:auto minmax(0,1fr) auto; grid-template-rows:auto auto; align-items:start;
  }
  body:not([data-current-view="calendar"]):has(.topbar > .page-subnav:not([hidden])) .topbar > div:first-child { grid-column:1; grid-row:1; align-self:center; }
  body:not([data-current-view="calendar"]):has(.topbar > .page-subnav:not([hidden])) .page-subnav { grid-column:1 / 3; grid-row:2; justify-self:start; }
  body:not([data-current-view="calendar"]):has(.topbar > .page-subnav:not([hidden])) .topbar-actions {
    grid-column:3; grid-row:1; display:flex; align-items:center; gap:10px; margin-left:0;
  }
  body:not([data-current-view="calendar"]):has(.topbar > .page-subnav:not([hidden])) #openNewDossier:not([hidden]) { order:0; align-self:center; }
  body[data-current-view="dashboard"] .topbar-actions { display:flex; align-items:center; gap:10px; }
}
@media (min-width:901px) and (max-width:1100px) {
  body[data-current-view="dashboard"] #pageTitle .today-date { display:block; margin-left:0; }
}
.topbar-tool-button, .topbar-profile-button, .topbar-panel-close {
  position: relative; display: inline-grid; place-items: center; flex: 0 0 42px; width: 42px; min-height: 42px;
  padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer;
  box-shadow: var(--shadow-glass-sm);
}
.topbar-tool-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
.topbar-tool-button:hover, .topbar-profile-button:hover, .topbar-panel-close:hover { border-color: var(--line-strong); background: var(--surface-muted); }
}
.topbar-help-button { display: inline-flex; width: auto; flex-basis: auto; gap: 7px; padding-inline: 12px; font-size: 13px; font-weight: 700; }
.topbar-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border: 2px solid var(--surface); border-radius: 50%; background: var(--red); color: white; font-size: 11px; font-weight: 700; line-height: 15px; text-align: center; }
.topbar-profile-button, .topbar-profile-avatar { overflow: hidden; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; font-weight: 700; letter-spacing: normal; }
.topbar-profile-button [data-company-avatar] { width: 100%; height: 100%; display: grid; place-items: center; }
[data-company-avatar] img { width: 100%; height: 100%; object-fit: cover; }
.topbar-popover { position: fixed; z-index: 120; width: min(360px, calc(100vw - 24px)); max-height: min(560px, calc(100dvh - 90px)); margin: 0; padding: 0; overflow: auto; border: 1px solid var(--glass-edge); border-radius: 16px; background: var(--glass-surface); color: var(--text); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.topbar-popover[hidden] { display: none; }
.topbar-popover > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--glass-surface) 92%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.topbar-popover > header > div { min-width: 0; flex: 1; }
.topbar-popover header h2, .topbar-popover header strong, .topbar-popover header small { margin: 0; }
.topbar-popover header h2 { font-size: 18px; }
.topbar-popover header small { display: block; color: var(--text-soft); font-size: 11px; }
.topbar-panel-close { flex-basis: 36px; width: 36px; min-height: 36px; border: 0; box-shadow: none; font-size: 22px; }
.topbar-popover > nav { display: grid; padding: 8px; }
.topbar-popover > nav > :is(button, a) { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
.topbar-popover > nav > :is(button, a):hover { background: var(--surface-muted); }
}
.topbar-popover > footer { padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.topbar-popover > footer .button { width: 100%; }
.topbar-notification-list { display: grid; padding: 6px 8px; }
.topbar-notification-list > button { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.topbar-notification-list > button:last-child { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) {
.topbar-notification-list > button:hover { background: var(--surface-muted); }
}
.topbar-notification-list > button > i { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.topbar-notification-list > button.is-unread > i { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.topbar-notification-list strong, .topbar-notification-list small { display: block; }
.topbar-notification-list strong { font-size: 13px; }
.topbar-notification-list small { margin-top: 2px; color: var(--text-soft); font-size: 11px; line-height: 1.35; }
.topbar-notification-list > button > span:last-child { color: var(--text-muted); }
.topbar-empty { margin: 0; padding: 30px 18px; color: var(--text-soft); text-align: center; }
.topbar-profile-heading { position: static !important; }
.topbar-profile-avatar { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; }
.topbar-profile-heading > div { display: grid; }
.topbar-profile-heading > div strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.topbar-profile-heading .topbar-panel-close { margin-left: auto; }

@media (max-width: 600px) {
  :root body .appearance-modes { width: 100%; box-sizing: border-box; }
  :root body .appearance-modes button { flex: 1 1 auto; min-width: max-content; padding-inline: 5px; gap: 4px; font-size: 12px; }
}

/* Navigation icons stay monochrome; the product accent marks only the active destination. */
[data-view="dashboard"] { --nav-color: var(--nav-dashboard); }
[data-view="calendar"] { --nav-color: var(--nav-calendar); }
[data-view="reservations"] { --nav-color: var(--nav-reservations); }
[data-view="inbox"] { --nav-color: var(--nav-inbox); }
[data-view="reviews"] { --nav-color: var(--nav-reviews); }
[data-view="coreProperties"] { --nav-color: var(--nav-coreProperties); }
[data-view="billing"] { --nav-color: var(--nav-billing); }
[data-view="cleaning"] { --nav-color: var(--nav-cleaning); }
[data-view="documents"] { --nav-color: var(--nav-documents); }
[data-view="settings"] { --nav-color: var(--nav-settings); }
[data-view="tools"] { --nav-color: var(--nav-tools); }
[data-view="contracts"], [data-view="documentInvoices"], [data-view="documentTemplates"] { --nav-color: var(--nav-documents); }
:root body :is(#navList, #mobileMoreDialog) :is([data-view], [data-topbar-toggle]) > svg,
:root body .mobile-tabbar button.is-active > svg {
  box-sizing: content-box; width: 16px; height: 16px; flex: 0 0 16px; padding: 5px; border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--text-soft);
}
:root body :is(#navList, #mobileMoreDialog) [data-view]:is(.is-active, [aria-current=page]) > svg,
:root body .mobile-tabbar button.is-active > svg { background: transparent; color: var(--primary-dark); }
:root body .mobile-tabbar button:not(.is-active) > svg { background: transparent; color: var(--text-soft); }
:root body .mobile-tabbar button.is-active { color: var(--primary-dark); background: var(--primary-soft); box-shadow: none; }
@media (max-width: 900px) {
  :root body .cleaning-header { gap: 10px; }
  :root body .cleaning-header .segmented { gap: 12px; margin-block: 0; }
  :root body .cleaning-header .segmented button { font-size: 12px; padding-inline: 2px; }
}

:root body #toolsDrawer > summary > svg { box-sizing: content-box; width: 16px; height: 16px; flex: 0 0 16px; padding: 5px; border-radius: var(--radius-sm); background: var(--surface-muted); color: var(--text-soft); }
:root body #toolsDrawer > summary.is-active > svg { background: var(--primary-soft); color: var(--primary-dark); }
:root body #mobileMoreDialog nav button { justify-content: flex-start; gap: 12px; }
:root body #mobileMoreDialog nav button > span:last-child { margin-left: auto; }
:root body .finance-top-metrics article { background: var(--glass-surface); border: 1px solid var(--glass-edge); border-radius: var(--card-radius); box-shadow: var(--shadow-glass); padding: 14px; }

:root body .today-compact .core-kpi-grid { border: 0; padding-block: 12px; }
:root body .today-compact .core-kpi-card + .core-kpi-card { border-left: 0; }
:root body .property-view-cards .su-property-list { gap: 24px; }
:root body .su-button:not(.is-secondary):not(.is-danger) { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-primary); }
@media (hover: hover) and (pointer: fine) {
  :root body .su-button:not(.is-secondary):not(.is-danger):hover { background: var(--primary-hover); }
}
:root body .su-button:active { box-shadow: none; }
:root body .su-drawer { background: var(--glass-dense); color: var(--text); box-shadow: var(--shadow-overlay); }

:root body .modal-backdrop { background: var(--backdrop); }
:root body #toolsDrawer > summary.is-active { box-shadow: none; background: transparent; color: var(--text); }
:root body .property-month-day[class*="rule-tint-"] :is(.month-night-select, .month-night-select span, .month-night-select small) { color: var(--calendar-ink); }

:root body .today-link { color: var(--link); }
:root body .property-view-cards .su-property-row { border-radius: 20px; box-shadow: var(--shadow-glass); }
:root body .property-view-list .su-property-row { box-shadow: none; }
/* Match the icon strokes in the sidebar; the mobile More menu has its own SVGs. */
:root body #mobileMoreDialog nav svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

:root body #mobileMoreButton { --nav-color: var(--nav-settings); }

:root body #toolsDrawer > summary { min-height: 44px; }
/* Match the immediate theme change of the sidebar: interpolating the old ink
   over the new background briefly drops these disclosure labels below AA. */
:root body :is(#toolsDrawer, #reserveDrawer) > summary { transition: none; }

/* T61b keeps the desktop controls unchanged while exposing compact phone
   variants for controls that need an icon or an overflow menu. */
.dashboard-period-short,
.finance-mobile-menu { display: none; }
.calendar-search-control { display: flex; flex: 1 1 120px; min-width: 0; max-width: 280px; }
.calendar-search-control > [data-calendar-search-toggle] { display: none; }
.calendar-search-control > input { width: 100%; min-width: 0; }
.list-filter-field { flex: 0 1 220px; min-width: 140px; max-width: 280px; }
.su-property-catalog-controls { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .list-filter-field { flex: 1 1 100%; max-width: none; min-height: 44px; }
  .su-property-catalog-controls { width: 100%; }
  .su-property-catalog-heading { flex-wrap: wrap; }
}

/* T50 — blur only the shared containers, never table/calendar rows or their buttons. */
:root body :is(.panel, .stat-card, .core-kpi-card, .kpi-card, .statistics-chart, .statistics-report, .finance-top-metrics, .statistics-metrics, .statistics-comparison,
  #mainSidebar, .portal-sidebar, .portal-topbar, .portal-header, .mobile-header, .mobile-tabbar, .mobile-nav,
  dialog, .modal, .su-drawer, .core-owner-drawer, .detail-drawer, .calendar-selection-panel,
  .calendar-side-panel, .calendar-rules-menu, .command-dialog, .dropdown-menu, .doc-period > div, .address-suggestions, .calendar-display-menu, .welcome-card, .status-card) {
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: var(--glass-edge);
}
:root body :is(.panel, .stat-card, .core-kpi-card, .kpi-card, .modal, dialog) :is(.stat-card, .status-card, .welcome-card, .modal, dialog) {
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root body :is(.portal-sidebar, .portal-topbar, .portal-header, .mobile-header, .mobile-tabbar, .mobile-nav) {
  background: var(--glass-menu); border-color: var(--glass-edge); box-shadow: var(--shadow-glass-sm);
}
:root body :is(.intervention, .status-card, .welcome-card, .cleaning-card) {
  background: var(--glass-surface); border-color: var(--glass-edge); border-radius: var(--card-radius); box-shadow: var(--shadow-glass);
}
:root body :is(.table-wrap, .su-table-wrap, .finance-table, .calendar-side-panel, .calendar-rules-menu, .dropdown-menu, .doc-period > div, .address-suggestions, .calendar-display-menu) {
  background: var(--glass-dense); color: var(--text);
}
:root body :is(th, td) { border-color: var(--line); }

/* T57c — native dialogs keep their semantics while display/overlay leave the
   top layer only after the short visual exit. Calling close() stays immediate. */
:root body dialog {
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transform-origin: center;
  transition: opacity var(--dur-exit) var(--ease-out), transform var(--dur-exit) var(--ease-out), display var(--dur-exit) allow-discrete, overlay var(--dur-exit) allow-discrete;
  transition-behavior: allow-discrete;
}
:root body dialog[open] {
  opacity: 1;
  transform: translateY(0);
  transition-duration: var(--dur-dialog);
  transition-timing-function: var(--ease-out);
}
:root body dialog::backdrop {
  opacity: 0;
  transition: opacity 200ms ease, display 200ms allow-discrete, overlay 200ms allow-discrete,
    -webkit-backdrop-filter 200ms ease, backdrop-filter 200ms ease;
  transition-behavior: allow-discrete;
}
:root body dialog[open]::backdrop { opacity: 1; transition-duration: 200ms; transition-timing-function: ease-out; }
@starting-style {
  :root body dialog[open] { opacity: 0; transform: translateY(8px) scale(.98); }
  :root body dialog[open]::backdrop { opacity: 0; }
}
:root body dialog.command-dialog,
:root body dialog.command-dialog::backdrop { transition: none !important; }
:root body dialog.command-dialog { opacity: 1; transform: none; }
:root body dialog.command-dialog::backdrop { opacity: 1; }
@starting-style {
  :root body dialog.command-dialog[open] { opacity: 1; transform: none; }
  :root body dialog.command-dialog[open]::backdrop { opacity: 1; }
}
:root body .mobile-more-dialog { transform: translateY(100%); }
:root body .mobile-more-dialog[open] { transform: translateY(var(--mobile-more-offset, 0px)); transition: transform var(--dur-sheet) var(--ease-drawer), opacity var(--dur-dialog) ease, display var(--dur-sheet) allow-discrete, overlay var(--dur-sheet) allow-discrete; }
@starting-style { :root body .mobile-more-dialog[open] { transform: translateY(100%); } }
:root body .finance-side-panel { transform: translateX(28px); }
:root body .finance-side-panel[open] { transform: translateX(0); }
@starting-style { :root body .finance-side-panel[open] { transform: translateX(28px); } }

@keyframes t57a-reduced-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t57a-reduced-fade-out { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .phone-widget[draggable=true] { animation:none !important; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 150ms !important;
    transition-property: opacity, color, background-color, border-color, box-shadow !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  :root body[data-current-view="dashboard"] #openNewDossier.dashboard-add-property,
  :root body[data-current-view="dashboard"] #openNewDossier .dashboard-add-property-label { transition:none !important; }
  :is(dialog[open], .modal.is-open, .calendar-side-panel, .su-drawer, .core-owner-drawer, .detail-drawer.is-open, .miguel-assistant.is-open .miguel-assistant-panel) {
    animation-name: t57a-reduced-fade !important;
    animation-duration: 200ms !important;
    animation-timing-function: ease !important;
    transform: none !important;
  }
  dialog { transition-property: opacity, display, overlay !important; transition-behavior: allow-discrete !important; }
  dialog::backdrop { transition-property: opacity, display, overlay !important; transition-behavior: allow-discrete !important; }
  .mobile-more-dialog, .mobile-more-dialog[open], .topbar-popover { transform: none !important; }
  :root body:has(#mainSidebar) .toast, :root body:has(#mainSidebar) .toast.is-closing,
  :root body :is(.su-drawer, .core-owner-drawer, .calendar-side-panel, .detail-drawer, .miguel-assistant-panel) { transform: none !important; }
  :is(.calendar-side-panel.is-closing, .su-drawer-backdrop.is-closing, .su-drawer-backdrop.is-closing .su-drawer, .core-owner-drawer-backdrop.is-closing, .core-owner-drawer-backdrop.is-closing .core-owner-drawer) {
    animation-name: t57a-reduced-fade-out !important;
    animation-duration: 150ms !important;
    animation-timing-function: ease !important;
    transform: none !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  :root body dialog::backdrop,
  :root body :is(.modal-backdrop, .su-drawer-backdrop, .core-owner-drawer-backdrop, .drawer-backdrop) {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
:root body :is(.modal-backdrop, .su-drawer-backdrop, .core-owner-drawer-backdrop, .drawer-backdrop) {
  background: var(--backdrop);
  -webkit-backdrop-filter: var(--backdrop-filter);
  backdrop-filter: var(--backdrop-filter);
  transition: opacity 200ms ease, background-color 200ms ease,
    -webkit-backdrop-filter 200ms ease, backdrop-filter 200ms ease;
  animation-duration: 200ms;
}
:root body :is(dialog, .modal, .su-drawer, .detail-drawer) { border: 1px solid var(--glass-edge); border-radius: var(--card-radius); }
:root body :is(option, optgroup) { background: var(--surface); color: var(--text); }

/* T73 lot 1 — one geometry family, native switches and quieter hierarchy. */
:root body :is(.panel, .card, .su-card, .stat-card, .core-kpi-card, .kpi-card, .statistics-chart, .statistics-report, .dashboard-widget) {
  border-radius: var(--radius-group);
  box-shadow: none;
}
:root body :is(.topbar-popover, .command-dialog, dialog:not(.mobile-more-dialog), .modal, .su-drawer, .core-owner-drawer, .detail-drawer) {
  border-radius: var(--radius-popover);
}
:root body :is(.row-card, .su-list-row, .managed-reservation-row, .stay-row, .invoice-row, .document-row, .request-row, .review-row, .settings-connection-row, .today-notice) {
  border-left-width: 0;
  border-radius: var(--radius-row);
}
:root body :is(.button, .su-button, .primary-button, .secondary-button, input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]), select, textarea) {
  border-radius: var(--radius-control);
}
:root body :is(.button, .su-button, .primary-button, .secondary-button) { box-shadow: none; }
:root body :is(input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]):not([type=file]), select, textarea) {
  border-color: var(--line-strong);
}
:root body :is(.pill, .status-pill, .badge, [class$="-badge"]) { border-radius: var(--radius-pill); }
:root body :is(.topbar-tool-button, .topbar-profile-button, .topbar-panel-close, .mobile-primary-action, .mobile-more-close) {
  width: var(--round-button);
  min-width: var(--round-button);
  height: var(--round-button);
  min-height: var(--round-button);
  padding: 0;
  border-radius: var(--radius-pill);
}
:root body .mobile-header > button,
:root body .mobile-header-actions > button {
  width: var(--round-button);
  min-width: var(--round-button);
  height: var(--round-button);
  min-height: var(--round-button);
  border-radius: var(--radius-pill);
}

/* A switch is reserved for a yes/no setting applied immediately. */
:root body input[type="checkbox"][role="switch"] {
  appearance: none;
  position: relative;
  box-sizing: border-box;
  flex: 0 0 var(--switch-w);
  width: var(--switch-w) !important;
  height: var(--switch-h) !important;
  min-height: var(--switch-h) !important;
  margin: 0;
  padding: 2px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  cursor: pointer;
  transition: background-color var(--dur-press) var(--ease-out);
}
:root body input[type="checkbox"][role="switch"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: var(--switch-knob);
  height: var(--switch-knob);
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transform: translateX(0);
  transition: width var(--dur-press) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
:root body input[type="checkbox"][role="switch"]::after { display: none; }
:root body input[type="checkbox"][role="switch"]:checked { background: var(--primary); }
:root body input[type="checkbox"][role="switch"]:checked::before { transform: translateX(20px); }
:root body input[type="checkbox"][role="switch"]:active::before { width: 31px; }
:root body input[type="checkbox"][role="switch"]:checked:active::before { transform: translateX(16px); }
:root body input[type="checkbox"][role="switch"]:disabled { cursor: wait; opacity: .6; }

/* The active tab is marked by tint only; the tab strip never becomes a pill. */
:root body :is(#billingView .finance-tabs, .segmented, .segmented-control, .page-subnav, .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs, .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs, .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters, .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices, [role="tablist"]) > :is(button, [role="tab"]):is(.is-active, [aria-selected="true"], [aria-pressed="true"], [aria-current="page"]) {
  color: var(--primary-dark);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* The mobile More sheet is one grouped list with a handle and a round close. */
:root body .mobile-more-dialog {
  border-radius: var(--radius-group) var(--radius-group) 0 0;
  box-shadow: var(--shadow-overlay);
}
:root body .mobile-more-dialog::before { border-radius: var(--radius-pill); }
:root body .mobile-more-dialog .dialog-heading { flex-wrap: nowrap; }
:root body .mobile-more-dialog .dialog-heading h2 { margin-right: auto; }
:root body .mobile-more-close {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
  font-size: 24px;
  line-height: 1;
}
:root body .mobile-more-dialog nav {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-popover);
  background: var(--surface);
}
:root body .mobile-more-dialog nav button {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: initial;
  background: transparent;
}
:root body .mobile-more-dialog nav button:last-child { border-bottom: 0; }
/* End T73 lot 1 source audit. */
/* Calendar cells keep opaque semantic fills, so sticky names/dates never show text through. */
:root body :is(.calendar-toolbar, .calendar-side-panel-header) { background: var(--glass-dense); }
/* T52 — quiet CSS-only selection. */
:root body :is(#navList .nav-item, #toolsDrawer > summary, .settings-index button,
  .portal-nav button, .mobile-tabbar button, .mobile-nav button, #mobileMoreDialog nav button):is(.is-active, [aria-current=page]),
:root body :is(#billingView .finance-tabs, .segmented, .segmented-control, .page-subnav,
  .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs,
  .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs,
  .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters,
  .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters,
  .widget-studio-devices, .appearance-modes, [role=tablist]) > :is(button, [role=tab]):is(.is-active, [aria-selected=true], [aria-pressed=true], [aria-current=page]) {
  color: var(--selection-text); background: var(--selection-surface);
  border-color: var(--selection-edge); box-shadow: var(--selection-shadow); font-weight: 700;
}
/* T52 capture follow-up: every first- and second-level selector uses the same
   visible selection, including groups whose local component CSS is more specific. */
:root body #pageSubnav > button[aria-current="page"],
:root body #reservationsView :is(.reservation-state-tabs, .reservation-view-switch) > button[aria-pressed="true"],
:root body #corePropertiesView .segmented > button[aria-pressed="true"],
:root body #billingView .finance-tabs > button[aria-pressed="true"],
:root body #settingsView .settings-index > button[aria-current="page"],
:root body :is(.segmented, .segmented-control, .su-tabs, .su-property-detail-tabs, .reservation-dossier-tabs,
  .review-tabs, .statistics-segmented, .doc-template-tabs, .filter-strip, .channel-tabs,
  .message-filters, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices,
  [role="tablist"]) > :is(button, [role="tab"]):is(.is-active, [aria-selected="true"], [aria-pressed="true"], [aria-current="page"]) {
  color: var(--selection-text); background: var(--selection-surface);
  border-color: var(--selection-edge); box-shadow: var(--selection-shadow); font-weight: 700;
}
@media (forced-colors: active) {
  :root body :is(.is-active, [aria-selected=true], [aria-pressed=true], [aria-current=page]) { border: 2px solid Highlight; color: CanvasText; }
}
/* One blur for the entire intervention list, rather than for every card/photo. */
:root body #portal { -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
@media (min-width: 901px) { :root body .settings-index[data-liquid-static] { position: sticky; } }

/* T61 cascade guard: layout.css is loaded last, so these phone-only density
   choices must win over older component-level mobile rules. */
@media (max-width: 900px) {
  :root body[data-current-view="dashboard"] .mobile-primary-action {
    display:inline-grid; place-items:center; width:44px; min-width:44px; height:44px; min-height:44px; flex:0 0 44px;
    padding:0; border-radius:50%;
  }
  :root body[data-current-view="dashboard"] .mobile-primary-action[hidden] { display:none; }
  :root body:not([data-current-view="calendar"]):not([data-current-view="inbox"]) .main-area { padding: 8px 16px 16px; }
  :root body :is(.dashboard-grid, .core-today, .core-work-grid, .core-side-stack, .su-shell, .su-grid) { gap: 8px; }
  :root body :is(.panel, .card, .su-card) { width: 100%; border-radius: 12px; }
  :root body :is(.panel-header, .panel-body, .form-grid, .su-card) { padding-right: 12px; padding-left: 12px; }
  :root body .core-welcome-banner { padding: 12px; border-radius: 14px; }
  :root body .core-welcome-copy h2 { font-size: 22px; }
  :root body .core-banner-meta { margin-top: 8px; }
  :root body :is(.core-kpi-grid, .reservation-kpis, .finance-top-metrics, .core-owners-metrics) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  :root body .core-kpi-card { min-height: 88px; padding: 10px; border-radius: 12px; }
  :root body .core-kpi-card strong { font-size: 25px; }
  :root body .core-action-row { min-height: 44px; padding-block: 6px; }
  :root body .core-work-grid .panel-header { padding: 10px 12px; }
  :root body .core-work-grid .panel-body { padding: 0 12px 12px; }
  :root body :is(.su-card-header, .su-listing-heading) { gap: 8px; }
  :root body :is(.su-property-row, .su-thread) { min-height: 56px; padding: 10px; }
  :root body .core-owners-intro { padding: 12px; }
  :root body .core-owner-grid { gap: 8px; }
  :root body .finance-toolbar { margin-bottom: 8px; }
  :root body .finance-top-metrics { margin-bottom: 10px; }
  :root body .finance-top-metrics article { padding: 6px 0 8px; }
  :root body .finance-top-metrics strong { margin-top: 4px; font-size: 17px; }
  :root body .cleaning-header { padding: 8px; }
  :root body .cleaning-workspace > .panel-body { padding: 8px; }
  :root body .cleaning-today { gap: 10px; }
  :root body .settings-index button { min-height: 48px; padding: 8px 12px; }

  /* Aujourd'hui: the mobile header already carries the page title. */
  :root body[data-current-view="dashboard"] .today-month-mobile {
    min-height: 44px;
    justify-content: flex-start;
    margin-bottom: 0;
  }
  :root body[data-current-view="dashboard"] .today-mobile-greeting { display: none; }
  :root body[data-current-view="dashboard"] .today-compact { gap: 6px; }
  :root body[data-current-view="dashboard"] .today-compact .core-kpi-grid { padding-block: 0; }
  :root body[data-current-view="dashboard"] .dashboard-period-full { display: inline; }
  :root body[data-current-view="dashboard"] .dashboard-period-short { display: none; }
  :root body[data-current-view="dashboard"] .dashboard-period button { min-width: 72px; min-height: 44px; padding: 6px 12px; }

  /* Calendrier: one navigation row, then five complete actions. */
  :root body[data-current-view="calendar"] .calendar-toolbar {
    grid-template-columns: auto 44px 44px minmax(0, 1fr) auto auto;
    grid-template-rows: 44px 44px;
    gap: 4px;
    margin-bottom: 4px;
  }
  :root body[data-current-view="calendar"] .calendar-toolbar > [data-calendar-today] { grid-column: 1; grid-row: 1; min-height: 44px; }
  :root body[data-current-view="calendar"] .calendar-toolbar > [data-calendar-prev] { grid-column: 2; grid-row: 1; width: 44px; height: 44px; }
  :root body[data-current-view="calendar"] .calendar-toolbar > [data-calendar-next] { grid-column: 3; grid-row: 1; width: 44px; height: 44px; }
  :root body[data-current-view="calendar"] .calendar-toolbar .calendar-month-control { grid-column: 4 / 7; grid-row: 1; min-height: 44px; }
  :root body[data-current-view="calendar"] .calendar-search-control {
    grid-column: 1;
    grid-row: 2;
    width: 44px;
    max-width: none;
    min-height: 44px;
  }
  :root body[data-current-view="calendar"] .calendar-search-control > [data-calendar-search-toggle] {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-grid;
    place-items: center;
  }
  :root body[data-current-view="calendar"] .calendar-search-control > input { display: none; min-height: 44px; font-size: 16px; }
  :root body[data-current-view="calendar"] .calendar-search-control.is-open { grid-column: 1 / -1; width: 100%; }
  :root body[data-current-view="calendar"] .calendar-search-control.is-open > input { display: block; flex: 1; }
  :root body[data-current-view="calendar"] .calendar-toolbar:has(.calendar-search-control.is-open) :is(.calendar-filter-menu, .calendar-toolbar-actions) { display: none; }
  :root body[data-current-view="calendar"] .calendar-filter-menu { grid-column: 2 / 4; grid-row: 2; }
  :root body[data-current-view="calendar"] .calendar-filter-menu > [data-calendar-filters] { width: 100%; min-height: 44px; }
  :root body[data-current-view="calendar"] .calendar-toolbar-actions { grid-column: 4 / 7; grid-row: 2; gap: 4px; }
  :root body[data-current-view="calendar"] .calendar-toolbar-actions .button { min-height: 44px; padding-inline: 8px; font-size: 11px; }
  :root body[data-current-view="calendar"] .calendar-toolbar-actions .calendar-panel-toggle { width: 44px; height: 44px; flex-basis: 44px; }
  :root body[data-current-view="calendar"] .calendar-filter-panel { left: 4px; right: 4px; width: auto; max-width: none; }
  :root body[data-current-view="calendar"] .calendar-reorder-toggle { width: 100%; min-height: 44px; margin-top: 4px; }
  :root body[data-current-view="calendar"] .stay-timeline { --name-width: 110px; --night-width: 48px; }
  :root body[data-current-view="calendar"] .calendar-order-handle { display: none; }
  :root body[data-current-view="calendar"] .stay-timeline-desktop.is-reordering .calendar-order-handle { display: inline-grid; place-items: center; min-height: 44px; }
  :root body[data-current-view="calendar"] .calendar-property-name strong {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.25;
  }
  :root body[data-current-view="calendar"] .calendar-property-name small { display: none; }

  /* Finances: give the month its own line on phones. */
  :root body[data-current-view="billing"] .finance-overview > .finance-links { display: none; }
  :root body[data-current-view="billing"] .finance-toolbar { flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 6px; }
  :root body[data-current-view="billing"] .finance-month-picker { flex: 1 1 100%; min-width: 0; gap: 2px; }
  :root body[data-current-view="billing"] .finance-month-picker select { width: auto; min-width: 0; flex: 1 1 auto; height: 44px; padding-inline: 5px; }
  :root body[data-current-view="billing"] .finance-month-picker .button { width: 44px; min-width: 44px; min-inline-size: 44px; min-height: 44px; }
  :root body[data-current-view="billing"] .finance-toolbar-actions { width: auto; flex: 0 0 auto; flex-wrap: nowrap; gap: 4px; }
  :root body[data-current-view="billing"] .finance-toolbar-actions > .finance-close .button { min-height: 44px; padding: 6px 8px; font-size: 11px; }
  :root body[data-current-view="billing"] .finance-mobile-menu { position: relative; display: block; }
  :root body[data-current-view="billing"] .finance-mobile-menu > summary { width: 44px; min-height: 44px; display: grid; place-items: center; list-style: none; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 22px; }
  :root body[data-current-view="billing"] .finance-mobile-menu > summary::-webkit-details-marker { display: none; }
  :root body[data-current-view="billing"] .finance-mobile-menu > div { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-overlay); }
  :root body[data-current-view="billing"] .finance-mobile-menu .finance-links { display: grid; gap: 0; margin: 0; }
  :root body[data-current-view="billing"] .finance-mobile-menu .finance-links button { min-height: 44px; text-align: left; }
  :root body[data-current-view="billing"] .finance-top-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 0 6px; }
  :root body[data-current-view="billing"] .finance-top-metrics article:last-child { grid-column: 1 / -1; }
  :root body[data-current-view="billing"] .finance-top-metrics article { min-height: 62px; padding: 7px 5px; border-radius: 10px; }
  :root body[data-current-view="billing"] .finance-top-metrics article > span { font-size: 11px; }
  :root body[data-current-view="billing"] .finance-top-metrics strong { margin-top: 2px; font-size: 15px; line-height: 1.15; }
  :root body[data-current-view="billing"] .finance-tabs { margin-block: 6px; }

  /* Logements: four compact cards remain visible in a phone viewport. */
  :root body[data-current-view="coreProperties"] .su-property-catalog { gap: 6px; }
  :root body[data-current-view="coreProperties"] .su-property-catalog-heading { min-height: 44px; margin: 0; }
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-list { gap: 6px; }
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row { min-height: 0; padding: 0; gap: 0; }
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row-visual,
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row-visual .property-cover,
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row-visual img { height: 96px; }
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row-copy { gap: 2px; padding: 7px 10px; }
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row-copy strong { font-size: 13px; }
  :root body[data-current-view="coreProperties"] .property-view-cards .su-property-row-copy small { font-size: 11px; }

  /* Secondary destinations follow the same compact rhythm without shrinking
     interactive rows below the 44 px touch target. */
  :root body[data-current-view="inbox"] .messages-workspace,
  :root body[data-current-view="cleaning"] .cleaning-workspace,
  :root body[data-current-view="settings"] .settings-layout,
  :root body[data-current-view="coreProperties"] .core-owners-page { gap: 8px; margin-top: 0; }
  :root body[data-current-view="cleaning"] .cleaning-header { min-height: 44px; padding-block: 4px; }
  :root body[data-current-view="cleaning"] .cleaning-header :is(button, .button) { min-height: 44px; }
  :root body[data-current-view="coreProperties"] .core-owners-intro-copy { margin-bottom: 0; }
  :root body[data-current-view="coreProperties"] .core-owners-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root body[data-current-view="settings"] .settings-index { margin-top: 0; }
}

/* T73 lot 1 cascade guard — layout.css contains older capture fixes below the
   shared rules; the canonical geometry and tint remain the final word. */
:root body :is(.panel, .card, .su-card, .dashboard-widget) { border-radius: var(--radius-group); box-shadow: none; }
:root body :is(.button, .su-button, .primary-button, .secondary-button) { border-radius: var(--radius-control); box-shadow: none; }
:root body :is(.topbar-tool-button, .topbar-profile-button, .topbar-panel-close, .mobile-primary-action, .mobile-more-close) { border-radius: var(--radius-pill); }
:root body :is(#billingView .finance-tabs, .segmented, .segmented-control, .page-subnav, .su-tabs, .su-property-detail-tabs, .calendar-view-tabs, .reservation-state-tabs, .reservation-dossier-tabs, .review-tabs, .statistics-segmented, .doc-template-tabs, .widget-studio-segmented, .filter-strip, .channel-tabs, .message-filters, .reservation-view-switch, .calendar-occupancy-switch, .core-owner-filters, .widget-studio-devices, [role="tablist"]) > :is(button, [role="tab"]):is(.is-active, [aria-selected="true"], [aria-pressed="true"], [aria-current="page"]) { color:var(--primary-dark); background:transparent; border-color:transparent; box-shadow:none; }

/* T80d — the property action shares the header controls' rounded rectangle. */
@media (min-width: 901px) {
  :root body[data-current-view="dashboard"] .topbar > .topbar-tools > :is(#openNewDossier, .topbar-tool-button) {
    height:var(--round-button); min-height:var(--round-button); border-radius:var(--radius-control);
  }
}
:root body[data-current-view="dashboard"] .mobile-primary-action { border-radius:var(--radius-control); }

/* T80e — reserve the expanded property action and keep Help textual. */
:root body .topbar-tools > .topbar-help-button {
  width:auto; min-width:max-content; height:var(--round-button); min-height:var(--round-button);
  flex:0 0 auto; padding-inline:12px; border-radius:var(--radius-control); white-space:nowrap;
}

/* T68: denser phone calendar rows; desktop and reorder touch targets stay intact. */
@media (max-width: 900px) {
  :root body[data-current-view="calendar"] .stay-timeline-row { min-height: 40px; }
  :root body[data-current-view="calendar"] .stay-timeline-track { grid-auto-rows: minmax(40px, auto); }
  :root body[data-current-view="calendar"] .stay-timeline-name { min-height: 40px; padding-block: 3px; }
  :root body[data-current-view="calendar"] .calendar-property-name { min-height: 34px; }
  :root body[data-current-view="calendar"] .calendar-property-name strong { font-size: 11px; }
  :root body[data-current-view="calendar"] .stay-night-price { min-height: 40px; font-size: 11px; line-height: 1.15; }
  :root body[data-current-view="calendar"] .stay-bar { min-height: 28px; margin-block: 3px; font-size: 11px; }
}

/* T73 lot 2 — a single keyboard ring and spatial motion for occasional overlays. */
:root body :is(button, a, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible {
  outline: 2px solid var(--link) !important;
  outline-offset: 2px !important;
}
:root body :is(.segmented, .segmented-control, .page-subnav, .su-tabs, .mobile-tabbar, [role="tablist"]) > :is(button, [role="tab"]):focus-visible { outline-offset: -3px !important; }
:root body .topbar-popover:not([hidden]) { opacity: 1; transform: scale(1); transform-origin: top right; transition: opacity var(--dur-small) var(--ease-out), transform var(--dur-small) var(--ease-out); }
:root body .topbar-popover.is-closing:not([hidden]) { opacity: 0; transform: scale(.97); transition-duration: 120ms; }
@starting-style { :root body .topbar-popover:not([hidden]) { opacity: 0; transform: scale(.97); } }
:root body:has(#mainSidebar) .toast { transition: transform 260ms var(--ease-out), opacity 200ms ease; }
:root body:has(#mainSidebar) .toast.is-closing { opacity: 0; transform: translateY(100%); transition-duration: 180ms; }
@starting-style { :root body:has(#mainSidebar) .toast { opacity: 0; transform: translateY(100%); } }
/* T71b: phone navigation surfaces. Desktop geometry is intentionally untouched. */
.phone-today { display:none; }
@media (max-width: 900px), (display-mode: standalone) {
  body[data-current-view="dashboard"] .mobile-header-copy { visibility:hidden; }
  body[data-current-view="dashboard"] .mobile-header-logo { visibility:hidden; }
  #dashboardView .phone-today { display:block; margin:0; }
  .phone-today-header { margin:0 0 12px; }
  .phone-today-header > small { display:block; color:var(--text-soft); font-size:12px; }
  .phone-today-header > div { display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .phone-today-header h1 { margin:2px 0; font-size:30px; }
  .phone-today-header button,.phone-month-header button { border:0; background:transparent; color:var(--primary-dark); min-height:44px; font:inherit; }
  .phone-widget-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:calc((100vw - 46px)/2); grid-auto-flow:dense; column-gap:14px; row-gap:14px; }
  .phone-widget { box-sizing:border-box; position:relative; min-width:0; min-height:0; overflow:hidden; border:1px solid var(--glass-edge); border-radius:var(--card-radius); background:var(--glass-surface); box-shadow:var(--shadow-glass); padding:12px; }
  .phone-widget.is-small { aspect-ratio:1; }
  .phone-widget.is-medium { grid-column:span 2; grid-row:span 1; }
  .phone-widget.is-large { grid-column:span 2; grid-row:span 2; }
  .phone-widget h2 { font-size:14px; margin:0 0 8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .phone-widget-content { display:flex; flex-direction:column; gap:4px; min-width:0; max-height:calc(100% - 20px); overflow:hidden; cursor:pointer; }
  .phone-widget-content > span,.phone-widget-content > small { white-space:normal; overflow-wrap:break-word; line-height:1.25; }
  .phone-widget-content > strong:not(.phone-widget-number) { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .phone-widget-content small[title] { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .phone-widget-number { font-size:34px; line-height:1.1; }
  .phone-widget-empty { color:var(--text-soft); font-size:12px; }
  .phone-widget-controls { display:flex; gap:4px; }
  .phone-widget.is-editing h2 { padding-left:30px; }
  .phone-widget-controls { position:absolute; top:7px; left:7px; right:7px; justify-content:space-between; pointer-events:none; }
  .phone-widget-controls button { pointer-events:auto; }
  .phone-widget-controls button:not(:first-child) { border-radius:8px; }
  .phone-widget-controls button,.phone-edit-tools button { min-width:36px; min-height:36px; border:0; border-radius:50%; background:var(--surface-muted); color:var(--text); }
  .phone-edit-tools { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
  .phone-day-timeline { display:flex; flex-direction:column; min-height:0; flex:1; overflow:hidden; }
  .phone-day-hours { display:flex; justify-content:space-between; padding-left:78px; font-size:10px; color:var(--text-soft); }
  .phone-day-rows { min-height:0; flex:1; display:flex; flex-direction:column; justify-content:space-around; overflow:hidden; }
  .phone-day-row { display:grid; grid-template-columns:74px minmax(0,1fr); gap:4px; align-items:center; min-height:22px; }
  .phone-day-row > strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:10px; }
  .phone-day-lane { position:relative; height:21px; border-bottom:1px solid var(--line); }
  .phone-day-now { position:absolute; z-index:2; top:-1px; bottom:-2px; width:2px; background:var(--danger); }
  .phone-day-event { position:absolute; top:0; box-sizing:border-box; max-width:46%; min-width:50px; height:20px; padding:2px 5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border:1px solid var(--line-strong); border-radius:7px; font-size:11px; line-height:14px; color:var(--text); background:var(--surface-strong); }
  .phone-day-event.is-cleaning { min-width:76px; background:var(--green-faint); border-color:var(--green); }
  .phone-day-event.is-arrival { background:var(--rose); border-color:var(--red); }
  .phone-day-event.is-unassigned { border-style:dashed; }
  .phone-month-facts { display:grid; gap:5px; min-width:0; }
  .phone-month-facts > span { display:flex; justify-content:space-between; gap:8px; min-width:0; font-size:12px; }
  .phone-month-facts strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .phone-month-facts .phone-month-platforms { align-items:start; }
  .phone-month-facts .phone-month-platforms strong { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:break-word; text-align:right; }
  .phone-month-actions { display:flex; gap:8px; flex-wrap:wrap; }
  .phone-widget.is-large .phone-widget-content { max-height:none; }
  .phone-widget.is-large .phone-month-actions button { min-height:44px; padding:8px 9px; font-size:11px; }
  .phone-widget[draggable=true] { touch-action:none; }
  .phone-widget.is-pointer-dragging { opacity:.55; }
  .phone-fortnight { display:flex; gap:3px; height:62px; align-items:end; }
  .phone-fortnight i { flex:1; height:var(--fill); min-height:2px; border-radius:3px 3px 0 0; background:var(--primary); }
  .phone-add-sheet { position:fixed; z-index:65; inset:auto 0 0; max-height:70vh; overflow:auto; padding:20px 16px calc(80px + env(safe-area-inset-bottom)); background:var(--surface); border-radius:26px 26px 0 0; box-shadow:var(--shadow-glass); }
  .phone-add-sheet > button[data-phone-add] { display:flex; flex-direction:column; width:100%; min-height:58px; text-align:left; background:transparent; border:0; border-bottom:1px solid var(--line); color:var(--text); }
  .phone-add-sheet > button small { color:var(--text-soft); }
  .phone-issues { position:fixed; inset:0 0 calc(68px + env(safe-area-inset-bottom)); z-index:54; overflow:auto; padding:16px; background:var(--surface); }
  .phone-month-header { padding:0 16px; }
  .phone-widget[draggable=true] { animation:phone-widget-wiggle .28s ease-in-out infinite alternate; }
  @keyframes phone-widget-wiggle { from { transform:rotate(-.4deg); } to { transform:rotate(.4deg); } }
}
.reservation-new-plus, .reservation-mobile-print { display:none; }
@media (max-width: 900px), (display-mode: standalone) {
  #reservationsView .reservation-toolbar { display:block; padding:0 12px 8px; }
  :root body #reservationsView .reservation-state-tabs { width:100%; overflow-x:visible; flex-wrap:wrap; margin:0; padding:0; }
  :root body #reservationsView .reservation-state-tabs > button { min-height:44px; flex:1 1 30%; }
  #reservationsView .reservation-toolbar-actions { display:flex; flex-wrap:nowrap; align-items:center; width:100%; gap:8px; padding-top:8px; margin:0; }
  #reservationsView .reservation-toolbar-actions input { flex:1 1 auto; min-width:0; width:0; }
  #reservationsView .reservation-toolbar-actions [data-reservation-search-toggle] { flex:0 0 44px; width:44px; min-height:44px; }
  #reservationsView .reservation-toolbar-actions [data-reservation-filters] { flex:0 0 auto; width:max-content; max-width:none; min-height:44px; white-space:nowrap; }
  :root body #reservationsView .reservation-toolbar-actions .reservation-view-switch,
  #reservationsView .reservation-toolbar-actions > [data-print-week-arrivals] { display:none; }
  #reservationsView .reservation-toolbar-actions [data-new-reservation] { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; min-height:44px; margin-left:auto; padding:0; border-radius:50%; }
  #reservationsView .reservation-new-plus { display:block; font-size:26px; line-height:1; }
  #reservationsView .reservation-new-label { display:none; }
  #reservationsView .reservation-mobile-print { display:inline-flex; }
  body > #reservationJourneyModal.is-inline-dossier { position:fixed; inset:0 0 calc(68px + env(safe-area-inset-bottom)); z-index:54; display:block; width:100%; padding:0; background:var(--surface); }
  #reservationJourneyModal.is-inline-dossier .reservation-journey-modal { box-sizing:border-box; width:100%; height:100%; max-height:none; overflow:auto; border:0; border-radius:0; padding:12px 16px; }
  #reservationJourneyModal:is(.is-inline-dossier, .is-open) .modal-header { flex-wrap:wrap; }
  #reservationJourneyModal:is(.is-inline-dossier, .is-open) .reservation-journey-header-actions { order:-1; flex-basis:100%; justify-content:space-between; }
  #reservationJourneyModal.is-inline-dossier #closeReservationJourneyModal { display:grid; place-items:center; width:44px; height:44px; min-width:44px; min-height:44px; padding:4px; border-radius:50%; }
  #reservationJourneyModal:is(.is-inline-dossier, .is-open) #closeReservationJourneyModal { order:-1; margin-right:auto; }
  #reservationJourneyModal.is-open:not(.is-inline-dossier) { z-index:54; inset:0 0 calc(68px + env(safe-area-inset-bottom)); align-items:stretch; padding:0; background:var(--surface); }
  #reservationJourneyModal.is-open:not(.is-inline-dossier) > .reservation-journey-modal { width:100%; height:100%; max-height:none; border:0; border-radius:0; }
  #reservationJourneyModal.is-open:not(.is-inline-dossier) #closeReservationJourneyModal { display:grid; place-items:center; width:44px; height:44px; min-width:44px; min-height:44px; padding:4px; border-radius:50%; }
  #reservationsView .reservation-compact-row > button > [data-request-past-dates] { grid-column:2 / 4; grid-row:3; justify-self:start; max-width:100%; }
  .modal-backdrop:not(#reservationJourneyModal) { align-items:flex-end; padding:0; }
  .modal-backdrop:not(#reservationJourneyModal) > .modal { box-sizing:border-box; width:100%; max-width:none; max-height:92dvh; overflow:auto; border-radius:26px 26px 0 0; padding-bottom:env(safe-area-inset-bottom); }
  .modal-backdrop:not(#reservationJourneyModal) > .modal::before { content:""; display:block; width:36px; height:5px; margin:8px auto; border-radius:5px; background:var(--line); }
  dialog:not(.property-page):not(.mobile-more-dialog):not(.command-dialog) { inset:auto 0 0; width:100%; max-width:none; max-height:92dvh; margin:0; border-radius:26px 26px 0 0; padding-bottom:calc(12px + env(safe-area-inset-bottom)); overflow:auto; }
  dialog:not(.property-page):not(.mobile-more-dialog):not(.command-dialog)::before { content:""; display:block; width:36px; height:5px; margin:8px auto; border-radius:5px; background:var(--line); }
}

/* T98 — one creation control, before header icons on both surfaces. */
:root body .primary-creation-action {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  flex:0 0 auto; width:auto; min-width:44px; height:44px; min-height:44px;
  padding:0 12px; border:1px solid var(--primary-line); border-radius:var(--radius-control); white-space:nowrap;
  background:var(--primary); color:var(--on-primary); box-shadow:var(--shadow-primary);
}
:root body .primary-creation-action[hidden] { display:none; }
:root body .primary-creation-action::before { display:none; content:none; }
:root body .primary-creation-plus { font-size:26px; line-height:1; }
:root body .primary-creation-label { font-size:13px; font-weight:700; }
:root body .primary-creation-action:focus-visible { outline:2px solid var(--link); outline-offset:2px; }
@media (min-width:901px) {
  :root body .topbar { --topbar-tools-width:460px; }
  :root body:not([data-current-view="calendar"]) .topbar { padding-right:468px; }
  :root body .topbar > .topbar-tools { width:460px; justify-content:flex-end; }
  :root body[data-current-view="dashboard"] .topbar { grid-template-columns:minmax(0,1fr) auto; }
  :root body[data-current-view="dashboard"] .topbar-actions { width:auto; }
  :root body[data-current-view="calendar"] .calendar-toolbar { --calendar-topbar-tools-width:460px; }
  :root body .topbar-tools > #openNewDossier.primary-creation-action { width:auto; min-width:44px; height:44px; flex:0 0 auto; border-radius:var(--radius-control); }
}
@media (max-width:900px), (display-mode:standalone) {
  :root body #openNewDossier.primary-creation-action { display:none; }
  :root body .finance-toolbar [data-open-finance-event] { display:inline-flex; }
  :root body .mobile-header .primary-creation-action {
    display:inline-flex; align-items:center; justify-content:center; flex:0 0 44px;
    width:44px; min-width:44px; height:44px; min-height:44px; padding:0;
    border-radius:var(--radius-control);
  }
  :root body .mobile-header .primary-creation-action[hidden] { display:none; }
  :root body .mobile-primary-action > .primary-creation-label { display:none; }
  :root body .mobile-primary-action > .primary-creation-plus { position:static; width:auto; min-width:0; height:auto; font-size:26px; line-height:1; }
  :root body .mobile-primary-action > .primary-creation-plus::before,
  :root body .mobile-primary-action > .primary-creation-plus::after { display:none; }
}

/* T100 — phone finishing pass; desktop rules stay unchanged. */
@media (max-width:900px) {
  /* Equal hit areas and a shared inset above all header controls. */
  :root body .mobile-header {
    min-height:calc(60px + env(safe-area-inset-top, 0px));
    padding-top:calc(8px + env(safe-area-inset-top, 0px));
    padding-bottom:8px;
    align-items:center;
  }
  :root body .mobile-header > button,
  :root body .mobile-header-actions > button {
    box-sizing:border-box; width:44px; min-width:44px; height:44px; min-height:44px; flex:0 0 44px;
    margin-block:0; align-self:center; border-radius:50%;
  }
  :root body .mobile-header .primary-creation-action { border-radius:50%; }
  /* T100b: override shared tab geometry (whose :is() includes an ID). */
  :root body[data-current-view="cleaning"] #cleaningView .cleaning-header {
    display:flex; flex-wrap:nowrap; align-items:center; gap:10px;
  }
  :root body[data-current-view="cleaning"] #cleaningView .cleaning-header :is(button, .button) {
    box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center;
    height:44px; min-height:44px; max-height:44px; padding-block:0; padding-inline:6px; margin-block:0; align-self:center; line-height:1.2;
  }
  :root body[data-current-view="cleaning"] #cleaningView .cleaning-header .segmented {
    padding:0; margin-block:0; height:44px; align-items:center; flex-wrap:nowrap;
  }
  /* T100b: whole labels in each 75px cell at 375px, active or inactive. */
  :root body .mobile-tabbar button {
    min-width:0; white-space:nowrap; overflow-wrap:normal; word-break:normal; line-height:14px;
    font-size:11px; letter-spacing:normal; padding-inline:2px;
  }
  :root body .mobile-tabbar button > span {
    min-width:0; max-width:100%; white-space:nowrap; overflow-wrap:normal; word-break:normal;
  }
  /* At 375px: 164.5px card, 113.5px below padding/border/title.
     Hours (12) + gap (4) + four rows (88) + gaps (6) + bottom inset (3) = 113px. */
  .phone-widget[data-phone-widget="day"] { display:flex; flex-direction:column; }
  .phone-widget[data-phone-widget="day"] h2 { flex:0 0 auto; line-height:17px; }
  .phone-widget[data-phone-widget="day"] .phone-widget-content { flex:1; min-height:0; max-height:none; }
  .phone-day-hours { flex:0 0 12px; line-height:12px; }
  .phone-day-timeline { gap:4px; }
  .phone-day-rows { flex:0 0 auto; justify-content:flex-start; gap:2px; padding-bottom:3px; }
  .phone-day-row { flex:0 0 22px; }
  .phone-day-more { flex:0 0 22px; line-height:22px; font-size:12px; color:var(--primary-dark); }
}

/* T102 — desktop finishing; mobile layout and standalone surfaces stay intact. */
.reservation-print-short { display:none; }
@media (min-width:901px) and (display-mode:browser) {
  /* Only the list can shrink and scroll; branding and the bottom control stay put. */
  :root body #mainSidebar { height:100dvh; min-height:0; overflow:hidden; padding-block:16px; }
  :root body #mainSidebar > :not(#navList) { flex-shrink:0; }
  :root body #navList { flex:1 1 0; min-height:0; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; gap:4px; padding-block:12px; }
  :root body #navList .nav-item { min-height:36px; padding:6px 10px; }
  :root body #navList .nav-section-label { margin-top:4px; padding-top:6px; }
  :root body #navList #toolsDrawer { margin-top:auto; padding-top:8px; }
  :root body #navList #toolsDrawer > summary { min-height:36px; padding-block:6px; }
  :root body #mainSidebar > .sidebar-theme-control { margin-top:auto; }

  /* Explicit tracks prevent content in a selected view from changing header height. */
  :root body[data-current-view="calendar"] .calendar-toolbar {
    display:grid; grid-template-columns:auto auto 32px 32px minmax(130px,1fr) auto auto;
    grid-template-rows:44px 44px 44px; gap:8px 6px; padding-right:0;
  }
  :root body[data-current-view="calendar"] .calendar-toolbar > .topbar-tools { grid-column:1 / -1; grid-row:1; position:static; justify-self:end; }
  :root body[data-current-view="calendar"] .calendar-title { grid-column:1; grid-row:2; }
  :root body[data-current-view="calendar"] [data-calendar-today] { grid-column:2; grid-row:2; }
  :root body[data-current-view="calendar"] [data-calendar-prev] { grid-column:3; grid-row:2; }
  :root body[data-current-view="calendar"] [data-calendar-next] { grid-column:4; grid-row:2; }
  :root body[data-current-view="calendar"] .calendar-month-control { grid-column:5 / -1; grid-row:2; }
  :root body[data-current-view="calendar"] .calendar-view-switcher { grid-column:1 / 3; grid-row:3; width:auto; flex-wrap:nowrap; margin:0; }
  :root body[data-current-view="calendar"] .calendar-search-control { grid-column:3 / 6; grid-row:3; min-width:0; }
  :root body[data-current-view="calendar"] .calendar-filter-menu { grid-column:6; grid-row:3; }
  :root body[data-current-view="calendar"] .calendar-toolbar-actions { grid-column:7; grid-row:3; margin:0; flex-wrap:nowrap; }

  :root body[data-current-view="calendar"] .calendar-view-switcher > button { min-height:36px; padding:6px 9px; }

  :root body #reservationsView .reservation-toolbar { display:block; }
  :root body #reservationsView .reservation-toolbar-actions { width:100%; flex-wrap:nowrap; gap:6px; }
  :root body #reservationsView .reservation-toolbar-actions input { width:140px; flex:0 1 140px; }
  :root body #reservationsView .reservation-state-tabs { flex:1 1 auto; flex-wrap:nowrap; margin:0; overflow-x:auto; }
  :root body #reservationsView .reservation-state-tabs button { min-height:36px; padding:6px 8px; }
  :root body #reservationsView .reservation-view-switch { flex-wrap:nowrap; margin:0; }
  :root body #reservationsView .reservation-view-switch > button { min-height:36px; padding:6px 8px; }
  :root body #reservationsView .reservation-print-label { display:none; }
  :root body #reservationsView .reservation-print-short { display:inline-flex; }
  :root body #reservationsView .reservation-toolbar-actions > [data-print-week-arrivals] { padding-inline:8px; white-space:nowrap; }
}
@media (min-width:1200px) and (display-mode:browser) {
  :root body[data-current-view="calendar"] .calendar-toolbar {
    grid-template-columns:auto auto 32px 32px 130px minmax(0,1fr) auto;
    grid-template-rows:44px 44px;
  }
  :root body[data-current-view="calendar"] .calendar-toolbar > .topbar-tools { grid-column:6 / -1; }
  :root body[data-current-view="calendar"] :is(.calendar-title,[data-calendar-today],[data-calendar-prev],[data-calendar-next],.calendar-month-control) { grid-row:1; }
  :root body[data-current-view="calendar"] .calendar-month-control { grid-column:5; }
  :root body[data-current-view="calendar"] :is(.calendar-view-switcher,.calendar-search-control,.calendar-filter-menu,.calendar-toolbar-actions) { grid-row:2; }
}
