/* PortuFlow Unified UI v1
   Shared visual layer for every module. Functional/module-specific CSS remains
   responsible for domain layouts; this file standardizes the visual language. */
:root {
  --pf-ui-primary: #0d6efd;
  --pf-ui-primary-hover: #0b5ed7;
  --pf-ui-success: #198754;
  --pf-ui-danger: #dc3545;
  --pf-ui-warning: #b78103;
  --pf-ui-ink: #212529;
  --pf-ui-muted: #6c757d;
  --pf-ui-line: #d9dee3;
  --pf-ui-line-strong: #c9d0d6;
  --pf-ui-surface: #ffffff;
  --pf-ui-surface-soft: #f7f9fb;
  --pf-ui-surface-hover: #f1f5f9;
  --pf-ui-radius: 8px;
  --pf-ui-control-radius: 6px;
  --pf-ui-shadow: 0 1px 3px rgba(20, 28, 38, .06);
  --pf-ui-dialog-shadow: 0 18px 50px rgba(20, 28, 38, .24);
  --pf-ui-control-height: 38px;
  --pf-ui-control-bg: #ffffff;
  --pf-ui-control-border: #b8c1c9;
  --pf-ui-text-strong: #26323c;
  --pf-ui-text-soft: #46535e;
  --pf-ui-row: #ffffff;
  --pf-ui-row-alt: #fbfcfd;
}

/* --------------------------------------------------------------------------
   Page geometry and headings
   -------------------------------------------------------------------------- */
body:not(.login-page) #main {
  padding: 20px 24px 36px;
}

.page-heading,
.billing-page-head {
  min-height: 52px;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.page-heading h1,
.billing-page-head h1 {
  margin: 0;
  color: var(--pf-ui-text-strong);
  font-size: 1.55rem;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.012em;
}

.billing-page-head h1 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.billing-title-icon {
  width: 23px;
  height: 23px;
  color: var(--pf-ui-muted);
}

.breadcrumbs,
.legacy-breadcrumbs {
  margin: 0 0 14px;
  color: var(--pf-ui-muted);
  font-size: .86rem;
}

.breadcrumbs a,
.legacy-breadcrumbs a {
  color: var(--pf-ui-primary);
  text-decoration: none;
}

.breadcrumbs a:hover,
.legacy-breadcrumbs a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Cards / panels: one visual container language throughout PortuFlow
   -------------------------------------------------------------------------- */
.card,
.billing-panel,
.legacy-grid-panel,
body.legacy-resource-page #record-list.legacy-resource-panel {
  border: 1px solid var(--pf-ui-line);
  border-radius: var(--pf-ui-radius);
  background: var(--pf-ui-surface);
  box-shadow: var(--pf-ui-shadow);
}

.card {
  padding: 18px;
  margin-bottom: 20px;
}

.billing-panel,
.legacy-grid-panel,
body.legacy-resource-page #record-list.legacy-resource-panel {
  overflow: hidden;
  margin-bottom: 20px;
}

.billing-panel-title,
.legacy-grid-heading,
body.legacy-resource-page .legacy-resource-heading {
  min-height: 46px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface-soft);
}

.billing-panel-title h2,
.legacy-grid-heading h2,
body.legacy-resource-page .legacy-resource-heading h2 {
  margin: 0;
  color: var(--pf-ui-text-strong);
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 650;
}

.legacy-grid-summary,
body.legacy-resource-page .legacy-resource-summary {
  color: var(--pf-ui-muted);
  font-size: .82rem;
  white-space: nowrap;
}

.legacy-grid-icon,
body.legacy-resource-page .legacy-resource-icon {
  color: var(--pf-ui-muted);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.button,
button.button,
a.button {
  min-height: var(--pf-ui-control-height);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--pf-ui-primary);
  border-radius: var(--pf-ui-control-radius);
  background: var(--pf-ui-primary);
  color: #fff;
  font-size: .875rem;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.button:hover:not(:disabled),
button.button:hover:not(:disabled),
a.button:hover {
  border-color: var(--pf-ui-primary-hover);
  background: var(--pf-ui-primary-hover);
  color: #fff;
}

.button.secondary,
button.button.secondary,
a.button.secondary {
  border-color: var(--pf-ui-control-border);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-text-soft);
}

.button.secondary:hover:not(:disabled),
button.button.secondary:hover:not(:disabled),
a.button.secondary:hover {
  border-color: var(--pf-ui-line-strong);
  background: var(--pf-ui-surface-hover);
  color: var(--pf-ui-text-strong);
}

/* All list-level create actions use one treatment. */
.legacy-add-button,
body.legacy-resource-page .legacy-resource-before .legacy-create,
body.legacy-resource-page .legacy-resource-before .legacy-create[data-legacy-variant="success"],
body.legacy-resource-page .legacy-resource-before .legacy-create[data-legacy-variant="primary"] {
  min-height: var(--pf-ui-control-height);
  padding: 7px 12px;
  border-color: var(--pf-ui-primary);
  border-radius: var(--pf-ui-control-radius);
  background: var(--pf-ui-primary);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
}

.legacy-add-button:hover,
body.legacy-resource-page .legacy-resource-before .legacy-create:hover,
body.legacy-resource-page .legacy-resource-before .legacy-create[data-legacy-variant="success"]:hover,
body.legacy-resource-page .legacy-resource-before .legacy-create[data-legacy-variant="primary"]:hover {
  border-color: var(--pf-ui-primary-hover);
  background: var(--pf-ui-primary-hover);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Forms and dialogs
   -------------------------------------------------------------------------- */
input:not([type=checkbox]):not([type=radio]),
select,
textarea {
  min-height: var(--pf-ui-control-height);
  border-color: var(--pf-ui-control-border);
  border-radius: var(--pf-ui-control-radius);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-ink);
  box-shadow: none;
}

input:not([type=checkbox]):not([type=radio]):focus,
select:focus,
textarea:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 3px rgba(13,110,253,.12);
}

.field label,
.legacy-form .field label {
  color: var(--pf-ui-text-soft);
  font-size: .84rem;
  font-weight: 600;
}

.reference-value,
.field-help,
.muted {
  color: var(--pf-ui-muted);
}

dialog,
.legacy-form-dialog,
.legacy-operation-dialog {
  border: 1px solid var(--pf-ui-line-strong);
  border-radius: 10px;
  background: var(--pf-ui-surface);
  box-shadow: var(--pf-ui-dialog-shadow);
}

.legacy-form-dialog .legacy-dialog-heading,
.legacy-operation-dialog > .dialog-heading,
dialog > .dialog-heading {
  min-height: 56px;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface-soft);
}

.legacy-form-dialog .legacy-dialog-heading h2,
.legacy-operation-dialog > .dialog-heading h2,
dialog > .dialog-heading h2 {
  margin: 0;
  color: var(--pf-ui-text-strong);
  font-size: 1.08rem;
  font-weight: 650;
}

.form-actions {
  gap: 8px;
  align-items: center;
  min-height: 58px;
  margin-top: 16px;
  padding: 10px 0 0;
  border-top: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface);
}

fieldset {
  border-top-color: var(--pf-ui-line);
}

legend {
  color: var(--pf-ui-text-soft);
  font-size: .92rem;
  font-weight: 650;
}

/* --------------------------------------------------------------------------
   List toolbars and filters
   -------------------------------------------------------------------------- */
.list-toolbar,
.standard-filters.list-toolbar,
.legacy-grid-before,
body.legacy-resource-page .legacy-resource-before {
  box-sizing: border-box;
  background: var(--pf-ui-surface);
}

.legacy-grid-before,
body.legacy-resource-page .legacy-resource-before {
  min-height: 54px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--pf-ui-line);
}

.standard-filters.list-toolbar {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pf-ui-line);
}

.standard-filters input,
.standard-filters select,
body.legacy-resource-page #record-list .legacy-resource-filter-row input,
body.legacy-resource-page #record-list .legacy-resource-filter-row select,
body[data-page="users"] .legacy-filter-row input,
body[data-page="users"] .legacy-filter-row select {
  height: var(--pf-ui-control-height);
  min-height: var(--pf-ui-control-height);
  padding: 6px 9px;
  border: 1px solid #b8c1c9;
  border-radius: var(--pf-ui-control-radius);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-ink);
  font-size: .84rem;
}

body.legacy-resource-page #record-list .legacy-resource-filter-row th,
body[data-page="users"] .legacy-filter-row th {
  height: 48px !important;
  padding: 5px 8px 7px !important;
  border-bottom: 1px solid var(--pf-ui-line) !important;
  background: var(--pf-ui-surface) !important;
}

/* --------------------------------------------------------------------------
   Tables: shared density, headers, zebra stripes, action column and pager
   -------------------------------------------------------------------------- */
.table-scroll,
.legacy-grid-body .table-scroll,
body.legacy-resource-page #record-list > .table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

.table-scroll > table,
.legacy-grid-body table,
body.legacy-resource-page #record-list table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
  color: var(--pf-ui-ink);
  font-size: .84rem;
}

.table-scroll > table thead th,
.legacy-grid-body table thead th,
body.legacy-resource-page #record-list table thead th {
  height: 42px;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface-soft);
  color: var(--pf-ui-text-soft);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.table-scroll > table tbody td,
.legacy-grid-body table tbody td,
body.legacy-resource-page #record-list table tbody td {
  height: 50px;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 0;
  border-bottom: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-ink);
  font-size: .84rem;
  line-height: 1.35;
  vertical-align: middle;
  overflow-wrap: break-word;
  word-break: normal;
}

.table-scroll > table tbody tr:nth-child(even) > td,
.legacy-grid-body table tbody tr:nth-child(even) > td,
body.legacy-resource-page #record-list table tbody tr:nth-child(even) > td {
  background: var(--pf-ui-row-alt);
}

.table-scroll > table tbody tr:hover > td,
.legacy-grid-body table tbody tr:hover > td,
body.legacy-resource-page #record-list table tbody tr:hover > td {
  background: var(--pf-ui-surface-hover);
}

.table-scroll > table tbody tr:last-child > td,
.legacy-grid-body table tbody tr:last-child > td,
body.legacy-resource-page #record-list table tbody tr:last-child > td {
  border-bottom-color: transparent;
}

.table-scroll > table .row-actions,
.legacy-grid-body .row-actions,
body.legacy-resource-page #record-list .row-actions {
  width: 1%;
  min-width: 104px;
  max-width: none;
  display: table-cell;
  padding: 6px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow-wrap: normal;
}

.table-scroll > table .row-actions button,
.legacy-grid-body .row-actions button,
body.legacy-resource-page #record-list .row-actions button {
  width: 36px;
  height: 34px;
  min-height: 34px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1px 2px;
  padding: 0;
  border: 1px solid var(--pf-ui-line-strong);
  border-radius: var(--pf-ui-control-radius);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-muted);
  font-size: 0;
  line-height: 1;
  vertical-align: middle;
}

.table-scroll > table .row-actions button:hover,
.legacy-grid-body .row-actions button:hover,
body.legacy-resource-page #record-list .row-actions button:hover {
  background: var(--pf-ui-surface-hover);
}

.table-scroll > table .row-actions svg,
.legacy-grid-body .row-actions svg,
body.legacy-resource-page #record-list .row-actions svg {
  width: 16px;
  height: 16px;
}

/* Preserve semantic action colors, but keep dimensions/layout identical. */
.row-actions button[data-action="Editar"] { border-color: #7ab1ff; color: var(--pf-ui-primary); }
.row-actions button[data-action="Desactivar"] { border-color: #eea8ae; color: var(--pf-ui-danger); }
.row-actions button[data-action="Activar"],
.row-actions button[data-action="Sitios"] { border-color: #8bc8a9; color: var(--pf-ui-success); }

.pager,
.legacy-grid-body .pager,
body.legacy-resource-page #record-list > .pager {
  min-height: 48px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 7px 12px;
  border-top: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-muted);
  font-size: .8rem;
}

.pager .button.secondary,
.legacy-grid-body .pager .button.secondary,
body.legacy-resource-page #record-list > .pager .button.secondary {
  min-height: 34px;
  padding: 6px 10px;
  font-size: .8rem;
}

/* --------------------------------------------------------------------------
   Tabs and statuses
   -------------------------------------------------------------------------- */
#main [role="tablist"],
dialog [role="tablist"] {
  gap: 4px;
}

#main button[role="tab"],
dialog button[role="tab"] {
  min-height: 38px;
  border-radius: 6px 6px 0 0;
  font-size: .85rem;
  font-weight: 600;
}

.billing-status,
.customer-profile-status {
  min-height: 24px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .7rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Messages / empty states
   -------------------------------------------------------------------------- */
.notice,
.billing-alert,
.legacy-module-note,
.billing-empty {
  border-radius: var(--pf-ui-radius);
}

.table-scroll td[colspan],
.legacy-grid-body td[colspan],
body.legacy-resource-page #record-list td[colspan] {
  max-width: none;
  padding: 20px 12px;
  text-align: center;
  color: var(--pf-ui-muted);
}

/* --------------------------------------------------------------------------
   Module-specific harmonization without changing domain layouts
   -------------------------------------------------------------------------- */
.billing-subnav a {
  min-height: 34px;
  border-radius: var(--pf-ui-control-radius);
}

.billing-summary-cell,
.billing-contract-context > div,
.legacy-rental-job-summary-field {
  border-color: var(--pf-ui-line);
  border-radius: var(--pf-ui-control-radius);
  background: var(--pf-ui-surface-soft);
}

body[data-page="users"] #main {
  padding: 20px 24px 36px;
}

body[data-page="users"] .legacy-grid-panel {
  margin-bottom: 20px;
}

body[data-page="users"] .legacy-grid-heading {
  min-height: 46px;
  padding: 9px 14px;
}

body[data-page="users"] .legacy-grid-before {
  min-height: 54px;
  padding: 8px 12px;
}

body[data-page="users"] .legacy-add-button {
  min-height: var(--pf-ui-control-height);
  padding: 7px 12px;
  font-size: .875rem;
}

body[data-page="users"] .legacy-grid-body table {
  min-width: 0;
  font-size: .84rem;
}

body[data-page="users"] .legacy-grid-body thead tr:first-child th {
  height: 42px;
  padding: 8px 9px;
  font-size: .8rem;
}

body[data-page="users"] .legacy-grid-body tbody td {
  height: 50px;
  padding: 8px 9px;
  font-size: .84rem;
}

body[data-page="users"] .legacy-grid-body .pager {
  min-height: 48px;
  padding: 7px 12px;
}

/* Customer dossier keeps its functional compact layout; only align its chrome. */
body[data-page="customers"] #record-dialog.customer-dossier-active .customer-profile-summary {
  border-color: var(--pf-ui-line);
  background: var(--pf-ui-surface-soft);
}

body[data-page="customers"] #record-dialog.customer-dossier-active .customer-tab {
  color: var(--pf-ui-muted);
}

body[data-page="customers"] #record-dialog.customer-dossier-active .customer-tab.active,
body[data-page="customers"] #record-dialog.customer-dossier-active .customer-tab[aria-selected="true"] {
  color: var(--pf-ui-primary);
}

@media (max-width: 991px) {
  body:not(.login-page) #main,
  body[data-page="users"] #main {
    padding: 18px 14px 28px;
  }

  .page-heading,
  .billing-page-head,
  .legacy-grid-heading,
  body.legacy-resource-page .legacy-resource-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .legacy-grid-summary,
  body.legacy-resource-page .legacy-resource-summary {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .page-heading h1,
  .billing-page-head h1 {
    font-size: 1.35rem;
  }

  .page-heading,
  .billing-page-head {
    min-height: 0;
  }

  .card {
    padding: 14px;
  }

  .pager,
  .legacy-grid-body .pager,
  body.legacy-resource-page #record-list > .pager {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}


/* PortuFlow Grid Standard · global source of truth for data-list density.
   Applies to mountList() (including Customers, Sites, Jobs, Rentals, Inventory,
   Recurrence, Catalog, Users, and Billing) and legacy filter toolbars.
   Domain-specific editors/dialogs intentionally remain unchanged. */
:root {
  --pf-grid-control-h: 30px;
  --pf-grid-header-h: 33px;
  --pf-grid-body-h: 38px;
  --pf-grid-pad-x: 8px;
  --pf-grid-pad-y: 4px;
  --pf-grid-text: 12.5px;
  --pf-grid-radius: 5px;
}

/* Shared panel chrome.  Do not enlarge a panel solely because of its module. */
body:not(.login-page) #main { padding-top: 12px; }
body:not(.login-page) .breadcrumbs,
body:not(.login-page) .legacy-breadcrumbs { margin-bottom: 9px; }
body.legacy-resource-page .legacy-resource-heading,
body[data-page="users"] .legacy-grid-heading,
.billing-panel-title,
.legacy-grid-heading { min-height: 38px; padding: 6px 11px; gap: 9px; }
body.legacy-resource-page .legacy-resource-heading h2,
body[data-page="users"] .legacy-grid-heading h2,
.legacy-grid-heading h2, .billing-panel-title h2 { font-size: 14px; line-height: 1.15; }
body.legacy-resource-page .legacy-resource-summary,
body[data-page="users"] .legacy-grid-summary,
.legacy-grid-summary { font-size: 12px; }
body.legacy-resource-page .legacy-resource-before,
body[data-page="users"] .legacy-grid-before,
.legacy-grid-before { min-height: 40px; padding: 5px 10px; gap: 6px; }
body.legacy-resource-page .legacy-resource-before .legacy-create,
body[data-page="users"] .legacy-grid-before .legacy-add-button,
.legacy-grid-before .legacy-add-button { min-height: 30px; padding: 4px 9px; font-size: 12px; }

/* One-line general search + secondary actions, on any module using mountList. */
.pf-data-grid > .column-filter-toolbar,
body.legacy-resource-page #record-list.pf-data-grid > .column-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0;
  min-height: 40px;
  padding: 4px 9px;
  background: var(--pf-ui-surface);
  border-bottom: 1px solid var(--pf-ui-line);
}
.pf-data-grid > .column-filter-toolbar .pf-list-general-search {
  flex: 1 1 220px;
  min-width: 145px;
  width: auto;
  margin: 0;
}
.pf-data-grid > .column-filter-toolbar .pf-list-general-search input {
  width: 100%;
  min-width: 0;
}
.pf-data-grid > .column-filter-toolbar .column-filter-sort {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 11px;
  color: var(--pf-ui-muted);
}
.pf-data-grid > .column-filter-toolbar .column-filter-sort > span { white-space: nowrap; }
.pf-data-grid > .column-filter-toolbar .column-filter-sort select { max-width: 210px; }
.pf-data-grid > .column-filter-toolbar .column-filter-clear { margin: 0; flex: 0 0 auto; }
.pf-data-grid > .column-filter-toolbar .column-filter-orphans {
  flex: 1 1 auto;
  min-width: 145px;
  align-items: center;
  gap: 6px;
}
.pf-data-grid .column-filter-orphan { min-width: 120px; font-size: 11px; }

/* Shared filter dimensions.  Scoped to list interfaces, never form editors. */
.pf-data-grid .column-filter-toolbar :is(input, select, button),
.pf-data-grid .column-filter-row .column-filter-input,
.pf-data-grid .column-filter-orphan .column-filter-input,
body[data-page="users"] .legacy-filter-row :is(input,select),
.standard-filters.list-toolbar :is(input,select,button),
.standard-filters .filter-bar :is(input,select,button) {
  box-sizing: border-box;
  height: var(--pf-grid-control-h);
  min-height: var(--pf-grid-control-h);
  margin: 0;
  padding: 3px 7px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: var(--pf-grid-radius);
}
.pf-data-grid .column-filter-input,
.pf-data-grid .column-filter-toolbar :is(input,select),
body[data-page="users"] .legacy-filter-row :is(input,select) {
  border: 1px solid var(--pf-ui-control-border);
  background: var(--pf-ui-surface);
  color: var(--pf-ui-ink);
}
.pf-data-grid .column-filter-input:focus-visible,
.pf-data-grid .column-filter-toolbar :is(input,select):focus-visible {
  outline: 2px solid var(--pf-ui-primary);
  outline-offset: 0;
}
.pf-data-grid .column-filter-input[aria-invalid="true"] {
  border-color: var(--pf-ui-danger);
}
.pf-data-grid .column-filter-row .column-filter-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.pf-data-grid .column-filter-row input[type="date"] {
  min-width: 126px;
  font-size: 11.5px;
  padding: 2px 3px;
}
.pf-data-grid .column-filter-row input[type="search"],
.pf-data-grid .column-filter-row .column-filter-lookup { min-width: 105px; }
.pf-data-grid .column-filter-row .column-filter-input::placeholder,
.pf-data-grid .column-filter-toolbar input::placeholder { color: var(--pf-ui-muted); opacity: .88; }

/* Filter cells and column labels ALWAYS share the same table grid. */
.pf-data-grid .pf-grid-scroll { overflow-x: auto; width: 100%; max-width: 100%; }
.pf-data-grid .pf-grid-table { width: 100%; table-layout: auto; border-collapse: collapse; }
.pf-data-grid .pf-grid-table thead tr:first-child th,
body[data-page="users"] .legacy-grid-body thead tr:first-child th {
  box-sizing: border-box;
  height: var(--pf-grid-header-h);
  padding: 5px var(--pf-grid-pad-x);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--pf-ui-text-strong);
  background: var(--pf-ui-surface-soft);
  border-bottom: 1px solid var(--pf-ui-line);
}
.pf-data-grid .pf-grid-table thead tr.column-filter-row th,
body.legacy-resource-page #record-list.pf-data-grid .legacy-resource-filter-row th,
body[data-page="users"] .legacy-grid-body .legacy-filter-row th {
  box-sizing: border-box;
  height: 38px !important;
  padding: 3px 5px !important;
  vertical-align: middle !important;
  background: var(--pf-ui-surface) !important;
  border-bottom: 1px solid var(--pf-ui-line) !important;
}
.pf-data-grid .column-filter-row .column-filter,
.pf-data-grid .column-filter-row .column-filter-date,
.pf-data-grid .column-filter-row .pf-grid-date-group {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.pf-data-grid .column-filter-row .legacy-filter-empty,
body[data-page="users"] .legacy-filter-row .legacy-filter-empty { display: block; height: var(--pf-grid-control-h); }
.pf-data-grid .column-filter-row .column-filter + .column-filter { margin-top: 0; }
.pf-data-grid .column-filter-row .column-filter-mini-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* One shared line for a From/To pair, not two stacked filter rows. */
.pf-data-grid .pf-grid-table th.pf-grid-wide-date { min-width: 322px; }
.pf-data-grid .column-filter-row .pf-grid-date-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(155px,1fr));
  gap: 4px;
}
.pf-data-grid .column-filter-row .pf-grid-date-pair .column-filter { margin: 0; }
.pf-data-grid .column-filter-row .pf-grid-date-pair .column-filter-input { min-width: 0; }
.pf-data-grid .column-filter-row .pf-grid-date-pair .column-filter-date {
  display: flex;
  align-items: center;
  gap: 2px;
}
.pf-data-grid .column-filter-row .pf-grid-date-pair .column-filter-mini-label {
  position: static;
  display: inline-block;
  clip: auto;
  overflow: visible;
  width: auto;
  height: auto;
  min-width: 27px;
  margin: 0;
  font-size: 9.5px;
  white-space: nowrap;
  color: var(--pf-ui-muted);
}

/* Standard row typography/height in all paged tables, including Users. */
.pf-data-grid .pf-grid-table tbody td,
body[data-page="users"] .legacy-grid-body tbody td,
.legacy-grid-body .table-scroll > table tbody td {
  box-sizing: border-box;
  height: var(--pf-grid-body-h);
  min-height: 0;
  padding: var(--pf-grid-pad-y) var(--pf-grid-pad-x);
  font-size: var(--pf-grid-text);
  line-height: 1.22;
  vertical-align: middle;
  color: var(--pf-ui-ink);
  border-bottom: 1px solid var(--pf-ui-line);
  overflow-wrap: normal;
}
.pf-data-grid .pf-grid-table .row-actions,
body[data-page="users"] .legacy-grid-body .row-actions {
  min-width: 66px;
  padding: 3px 5px;
  white-space: nowrap;
}
.pf-data-grid .pf-grid-table .row-actions button,
body[data-page="users"] .legacy-grid-body .row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  min-height: 30px;
  margin: 0 2px;
  padding: 0;
}
.pf-data-grid .pf-grid-table .row-actions svg,
body[data-page="users"] .legacy-grid-body .row-actions svg { width: 16px; height: 16px; }
.pf-data-grid > .pager,
body[data-page="users"] .legacy-grid-body .pager,
.legacy-grid-body .pager {
  min-height: 38px;
  padding: 4px 9px;
  gap: 6px;
  font-size: 12px;
}
.pf-data-grid > .pager .button.secondary,
body[data-page="users"] .legacy-grid-body .pager .button.secondary {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 12px;
}
/* Legacy styles use highly specific body+#record-list selectors.  Fix density
   here, once, instead of competing overrides in each module's stylesheet. */
body .pf-data-grid .pf-grid-scroll > .pf-grid-table tbody td,
body.legacy-resource-page #record-list.pf-data-grid .pf-grid-table tbody td,
body[data-page="users"] .legacy-grid-body .pf-grid-table tbody td {
  height: var(--pf-grid-body-h) !important;
  min-height: 0 !important;
  padding: var(--pf-grid-pad-y) var(--pf-grid-pad-x) !important;
  font-size: var(--pf-grid-text) !important;
  line-height: 1.22 !important;
}
body.legacy-resource-page #record-list.pf-data-grid .legacy-resource-filter-row .column-filter-input,
body .pf-data-grid .pf-grid-scroll .column-filter-row .column-filter-input,
body[data-page="users"] .legacy-grid-body .legacy-filter-row :is(input,select) {
  height: var(--pf-grid-control-h) !important;
  min-height: var(--pf-grid-control-h) !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
}
body.legacy-resource-page #record-list.pf-data-grid .legacy-resource-filter-row th,
body .pf-data-grid .pf-grid-scroll .column-filter-row th,
body[data-page="users"] .legacy-grid-body .legacy-filter-row th {
  height: 36px !important;
  min-height: 0 !important;
  padding: 3px 5px !important;
}
body.legacy-resource-page #record-list.pf-data-grid .legacy-resource-filter-row .legacy-filter-empty,
body .pf-data-grid .pf-grid-scroll .column-filter-row .legacy-filter-empty {
  height: var(--pf-grid-control-h) !important;
  min-height: 0 !important;
}
body.legacy-resource-page #record-list.pf-data-grid .pf-grid-table .row-actions button,
body[data-page="users"] .legacy-grid-body .row-actions button {
  width: 30px !important;
  height: 30px !important;
  min-height: 30px !important;
  margin: 0 2px !important;
}
/* Financial/legacy panels that build their own standard-filters use same height. */
.standard-filters.list-toolbar { padding: 5px 9px; gap: 7px; }
.standard-filters .filter-fields { gap: 7px; }
.standard-filters .filter-chips { margin-top: 5px; }
.standard-filters .filter-lookup-name { font-size: 11px; }
/* Long values remain available without crushing the column filters. */
.pf-data-grid .pf-grid-table td { max-width: 380px; }
.pf-data-grid .pf-grid-table td:not(.row-actions) { overflow-wrap: anywhere; }
@media (max-width: 740px) {
  .pf-data-grid > .column-filter-toolbar .pf-list-general-search { flex: 1 1 100%; }
  .pf-data-grid > .column-filter-toolbar .column-filter-sort { flex: 1 1 auto; }
  .pf-data-grid .pf-grid-table { min-width: max-content; }
  .pf-data-grid .pf-grid-table td { max-width: 230px; }
}

/* PF standard filters v2: ONE on-demand, shared filter surface.
   Overrides old per-column filter styles without modifying module-specific tables. */
.pf-data-grid > form.pf-filter-toolbar,
body.legacy-resource-page #record-list.pf-data-grid > form.pf-filter-toolbar,
body[data-page="users"] #record-list.pf-data-grid > form.pf-filter-toolbar {
  position: relative; display: flex !important; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 10px !important; margin: 0 !important;
  border: 0; border-bottom: 1px solid var(--pf-ui-line);
  background: var(--pf-ui-surface); flex-wrap: nowrap;
}
.pf-data-grid .pf-filter-toolbar .pf-list-general-search { display: flex; flex: 1 1 auto; min-width: 0; max-width: none; }
.pf-data-grid .pf-filter-toolbar .pf-list-general-search > input[type="search"] {
  box-sizing: border-box; display: block; width: 100%; flex: 1 1 auto; min-width: 0;
  height: 32px !important; min-height: 32px !important; max-width: none;
  padding: 5px 10px !important; margin: 0; font-size: 13px;
  border: 1px solid var(--pf-ui-control-border); border-radius: 6px;
  color: var(--pf-ui-ink); background: var(--pf-ui-surface);
}
.pf-data-grid .pf-filter-toolbar .pf-filter-toggle,
body.legacy-resource-page #record-list.pf-data-grid .pf-filter-toolbar .pf-filter-toggle {
  flex: 0 0 auto; display: inline-flex; gap: 6px; align-items: center;
  box-sizing: border-box; height: 32px; min-height: 32px; padding: 4px 10px;
  font-size: 12px; font-weight: 600; margin: 0; line-height: 1;
  color: var(--pf-ui-text-strong); background: var(--pf-ui-surface);
  border: 1px solid var(--pf-ui-control-border); border-radius: 6px;
}
.pf-filter-toggle[aria-expanded="true"], .pf-filter-toggle:hover { background: var(--pf-ui-surface-hover) !important; }
.pf-filter-symbol { font-size: 16px; line-height: 1; }
.pf-filter-count { display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; box-sizing: border-box; padding: 0 4px;
  border-radius: 9px; background: var(--pf-ui-primary); color: #fff; font-size: 10px;
}
.pf-filter-count[hidden] { display: none; }
.pf-filter-popover {
  position: fixed; z-index: 10050; box-sizing: border-box; padding: 0;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  background: var(--pf-ui-surface); color: var(--pf-ui-ink);
  border: 1px solid var(--pf-ui-line-strong); border-radius: 10px;
  box-shadow: 0 16px 44px rgba(5,20,38,.22);
  font-size: 13px;
}
.pf-filter-popover[hidden] { display: none !important; }
.pf-filter-panel-heading { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--pf-ui-line); }
.pf-filter-panel-heading strong { font-size: 13px; font-weight: 650; color: var(--pf-ui-text-strong); }
.pf-filter-panel-close { border: 0; background: transparent; color: var(--pf-ui-muted);
  cursor: pointer; font-size: 22px; line-height: 1; padding: 1px 5px; }
.pf-filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px 12px; padding: 13px 14px; }
.pf-filter-field { display: grid; align-content: start; gap: 5px; min-width: 0; margin: 0;
  color: var(--pf-ui-ink); font-size: 12px; font-weight: 500; }
.pf-filter-field > span { color: var(--pf-ui-text-soft); font-size: 12px; }
.pf-filter-field > input:not([type=checkbox]),
.pf-filter-field > select,
.pf-filter-popover .pf-filter-fields input:not([type=checkbox]),
.pf-filter-popover .pf-filter-fields select {
  box-sizing: border-box; display: block; width: 100%; min-width: 0; max-width: none;
  height: 34px; min-height: 34px; margin: 0; padding: 5px 8px;
  border: 1px solid var(--pf-ui-control-border); border-radius: 6px;
  color: var(--pf-ui-ink); background: var(--pf-ui-surface); font-size: 13px;
}
.pf-filter-field input[aria-invalid="true"] { border-color: var(--pf-ui-danger); }
.pf-filter-field input::placeholder { color: var(--pf-ui-muted); opacity: 1; }
.pf-filter-sort, .pf-filter-date-group { grid-column: 1 / -1; }
.pf-filter-date-group { display: grid; gap: 6px; min-width: 0; }
.pf-filter-date-title { font-size: 12px; color: var(--pf-ui-text-soft); font-weight: 600; }
.pf-filter-date-pair { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.pf-filter-panel-actions { position: sticky; bottom: 0; display: flex; gap: 8px;
  justify-content: flex-end; padding: 10px 14px; background: var(--pf-ui-surface);
  border-top: 1px solid var(--pf-ui-line); }
.pf-filter-popover .pf-filter-panel-actions > button { min-height: 32px; padding: 5px 12px;
  font-size: 12px; margin: 0; }
html[data-theme="dark"] .pf-filter-popover {
  background: var(--pf-ui-surface); color: var(--pf-ui-ink);
  border-color: var(--pf-ui-line-strong); box-shadow: 0 16px 44px rgba(0,0,0,.55);
}
html[data-theme="dark"] .pf-filter-count { background: #315d96; color: #fff; }
@media (max-width: 620px) {
  .pf-filter-fields { grid-template-columns: minmax(0,1fr); }
  .pf-filter-date-pair { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
}
/* Main table has exactly one header row. Density still comes from shared grid tokens. */
.pf-data-grid .pf-grid-table thead tr.column-filter-row { display: none !important; }
/* Calendar adopts the same single filter button and shared popover as lists. */
.standard-filters.calendar-unified-toolbar { display: flex !important; justify-content: flex-end;
  padding: 6px 10px !important; min-height: 44px; border: 0; margin: 0;
  background: var(--pf-ui-surface); }
.standard-filters.calendar-unified-toolbar > .pf-filter-toggle { margin-left: auto; }
.pf-filter-popover .pf-filter-calendar-staff { grid-column: 1 / -1; min-width: 0;
  padding: 7px 9px; margin: 0; border: 1px solid var(--pf-ui-line); border-radius: 6px; }
.pf-filter-calendar-staff legend { font-size: 12px; color: var(--pf-ui-text-soft); padding: 0 4px; }
.pf-filter-calendar-staff .calendar-picker-button { min-height: 32px; width: 100%; font-size: 13px; }
.pf-filter-calendar-staff .calendar-picker-panel { position: relative; z-index: 1; max-height: 160px; overflow: auto; }
.pf-filter-popover #map-date-field[hidden], .pf-filter-calendar-staff #technician-picker-panel[hidden] { display: none !important; }

/* 1.23.21 — filter overlays are positioned against the visual viewport.
   Native Popover API puts them above modal dialogs and overflow clipping. */
.pf-filter-popover[popover] {
  position: fixed; inset: auto; margin: 0;
  max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px);
  overscroll-behavior: contain; z-index: 2147483647;
}
.pf-filter-popover[popover]:popover-open { display: block; }
@media (max-width: 620px) {
  .pf-filter-popover[popover] .pf-filter-panel-actions { flex-wrap: wrap; }
}

/* PortuFlow 1.23.23 - compact, consistent data lists.
   Applies only to grid list pages, not editing forms or unrelated modals. */
body.legacy-resource-page .page-heading.pf-list-heading-collapsed { display: none !important; }
body.legacy-resource-page #main { padding-top: 10px; }
body.legacy-resource-page .breadcrumbs { margin-bottom: 9px; }
body.legacy-resource-page #record-list.legacy-resource-panel { margin-bottom: 12px; }
body.legacy-resource-page #record-list .legacy-resource-heading {
  display: flex; flex-direction: row; align-items: center;
  flex-wrap: wrap; gap: 8px 12px; min-height: 43px;
  padding: 6px 10px;
}
body.legacy-resource-page #record-list .legacy-resource-heading h2 { flex: 0 1 auto; min-width: 0; }
body.legacy-resource-page #record-list .legacy-resource-heading .legacy-create {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: auto; min-width: 0; min-height: 30px; box-sizing: border-box;
  margin: 0; padding: 5px 9px; border-radius: 5px;
  font-size: 12px; line-height: 1.2; white-space: nowrap;
}
body.legacy-resource-page #record-list .legacy-resource-heading .legacy-create[hidden] { display: none !important; }
body.legacy-resource-page #record-list .legacy-resource-heading .legacy-create svg {
  width: 15px; height: 15px; fill: currentColor; flex: none;
}
body.legacy-resource-page #record-list .legacy-resource-heading .legacy-resource-summary {
  margin-left: auto; text-align: right;
}
/* Toolbar is the only toolbar row: search | statuses | filters, aligned by control height. */
.pf-data-grid > form.pf-filter-toolbar,
body.legacy-resource-page #record-list.pf-data-grid > form.pf-filter-toolbar {
  display: flex !important; align-items: center; flex-wrap: wrap;
  column-gap: 8px; row-gap: 6px; padding: 6px 10px !important;
  min-height: 44px;
}
.pf-data-grid .pf-filter-toolbar .pf-list-general-search {
  flex: 1 1 240px; min-width: min(100%, 180px); margin: 0;
}
.pf-data-grid .pf-filter-toolbar .pf-status-bar {
  display: inline-flex; flex: 0 0 auto; align-items: center;
  box-sizing: border-box; width: auto; max-width: 100%; min-width: 0;
  margin: 0 0 0 auto; padding: 2px; gap: 2px;
  border: 1px solid var(--pf-ui-line); border-radius: 7px;
  background: var(--pf-ui-surface-soft); flex-wrap: nowrap;
}
.pf-data-grid .pf-filter-toolbar .pf-status-segment {
  box-sizing: border-box; min-height: 28px; min-width: 59px;
  padding: 4px 9px; margin: 0; font-size: 12px; line-height: 1.2;
}
.pf-data-grid .pf-filter-toolbar .pf-filter-toggle,
body.legacy-resource-page #record-list.pf-data-grid .pf-filter-toolbar .pf-filter-toggle {
  flex: 0 0 auto; margin-left: 0; min-height: 32px; height: 32px;
}
.pf-data-grid .pf-filter-toolbar > .pf-status-bar:last-child { margin-left: auto; }
@media (max-width: 740px) {
  .pf-data-grid .pf-filter-toolbar .pf-list-general-search { flex-basis: 100%; }
  .pf-data-grid .pf-filter-toolbar .pf-status-bar { margin-left: 0; flex: 1 1 auto; }
  .pf-data-grid .pf-filter-toolbar .pf-status-segment { min-width: 0; flex: 1 1 auto; }
  .pf-data-grid .pf-filter-toolbar .pf-filter-toggle { margin-left: auto; }
}
@media (max-width: 480px) {
  body.legacy-resource-page #record-list .legacy-resource-heading { gap: 6px; }
  body.legacy-resource-page #record-list .legacy-resource-heading .legacy-resource-summary {
    margin-left: 0; width: 100%; text-align: left;
  }
}

body.legacy-resource-page #record-list .legacy-resource-heading .pf-list-header-extra {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 30px; box-sizing: border-box; margin: 0; padding: 5px 9px;
  font-size: 12px; line-height: 1.2;
}
body.legacy-resource-page #record-list .legacy-resource-heading .pf-list-header-extra[hidden] { display: none !important; }

/* v1.23.25 — Consistent state chips and compact served-jobs tabs. */
.pf-data-grid .pf-record-state {
  display: inline-flex; align-items: center; justify-content: center;
  width: max-content; max-width: 100%; min-height: 23px;
  padding: 2px 9px; box-sizing: border-box; border-radius: 999px;
  font-size: 12px; line-height: 1.35; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.pf-data-grid .pf-record-state--success { color: #14663b; background: #e4f5eb; border-color: #b7e0c7; }
.pf-data-grid .pf-record-state--info { color: #185bb5; background: #e8f2ff; border-color: #c6ddff; }
.pf-data-grid .pf-record-state--warning { color: #8a5800; background: #fff2d5; border-color: #f1d89e; }
.pf-data-grid .pf-record-state--danger { color: #a52d33; background: #fde9e9; border-color: #f1c7c9; }
.pf-data-grid .pf-record-state--muted { color: #526175; background: #eef1f5; border-color: #dae0e9; }
.pf-served-page .pf-served-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 10px; position: relative;
}
.pf-served-page .pf-served-header h1 { margin: 0; font-size: clamp(20px, 2vw, 25px); line-height: 1.25; }
.pf-served-page .pf-served-help { position: relative; margin-left: auto; flex: 0 0 auto; }
.pf-served-page .pf-served-help > summary {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; cursor: pointer; list-style: none;
  box-sizing: border-box; border: 1px solid #c8d3e0; border-radius: 50%;
  background: #fff; color: #305a82; font: 700 15px/1 system-ui, sans-serif;
}
.pf-served-page .pf-served-help > summary::-webkit-details-marker { display: none; }
.pf-served-page .pf-served-help > summary:focus-visible,
.pf-served-page .pf-served-switch button:focus-visible { outline: 2px solid #175fd5; outline-offset: 2px; }
.pf-served-page .pf-served-help-content {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 80;
  width: min(360px, calc(100vw - 40px)); padding: 14px 16px;
  box-sizing: border-box; border-radius: 8px; border: 1px solid #d7e0eb;
  background: #fff; color: #26394c; box-shadow: 0 10px 32px rgb(24 40 62 / 17%);
  font-size: 13px; line-height: 1.5;
}
.pf-served-page .pf-served-help-content p { margin: 8px 0 0; }
.pf-served-page .pf-served-switch {
  display: inline-flex; max-width: 100%; gap: 3px; margin: 0 0 12px;
  padding: 3px; border: 1px solid #d7dfe9; border-radius: 8px;
  background: #f4f7fa;
}
.pf-served-page .pf-served-switch button {
  appearance: none; border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: #415368;
  font: 600 13px/1.35 system-ui, sans-serif; padding: 8px 17px;
  cursor: pointer; min-height: 34px;
}
.pf-served-page .pf-served-switch button[aria-selected="true"] {
  background: #fff; color: #0863d7; border-color: #dbe3ed;
  box-shadow: 0 1px 3px rgb(24 40 62 / 12%);
}
.pf-served-page .pf-served-pane[hidden] { display: none !important; }
.pf-served-page .pf-served-pane { margin: 0; padding: 0; min-width: 0; }
.pf-served-page .pf-served-pane.pf-data-grid { border: 1px solid #dee4ec; border-radius: 8px; overflow: visible; }
@media (max-width: 480px) {
  .pf-served-page .pf-served-switch { display: flex; width: 100%; }
  .pf-served-page .pf-served-switch button { flex: 1 1 0; padding-inline: 9px; }
  .pf-served-page .pf-served-header { align-items: center; }
}

/* PortuFlow 1.23.26 — One accessible, compact pattern for sortable headers.
   The icon belongs to the button, never to the TH itself: no orphaned arrows. */
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable {
  text-decoration: none;
  cursor: default;
}
/* Override the legacy border-triangle on the TABLE CELL, not the new control. */
body.legacy-resource-page #record-list table thead th.legacy-sortable::after,
body[data-page="users"] .legacy-grid-body table thead th.legacy-sortable::after,
.pf-data-grid table thead th.legacy-sortable::after {
  content: none;
  display: none;
}
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable .pf-sort-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: none;
  min-width: 0;
  width: auto;
  min-height: 26px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable .pf-sort-label { white-space: nowrap; }
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable .pf-sort-indicator {
  display: inline-flex;
  flex: 0 0 13px;
  justify-content: center;
  align-items: center;
  width: 13px;
  height: 1.2em;
  color: #7c8797;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}
.pf-sort-indicator::before { content: "↕"; }
th.legacy-sortable.is-asc .pf-sort-indicator::before { content: "↑"; }
th.legacy-sortable.is-desc .pf-sort-indicator::before { content: "↓"; }
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable .pf-sort-trigger:hover { color: #1d4ed8; text-decoration: none; }
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable.is-sorted .pf-sort-trigger {
  color: #1e40af;
  text-decoration: none;
}
th.legacy-sortable.is-sorted .pf-sort-indicator { color: #1e40af !important; }
:is(.pf-data-grid, body.legacy-resource-page #record-list, body[data-page="users"] .legacy-grid-body)
  table thead th.legacy-sortable .pf-sort-trigger:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

/* v1.23.28 — Inventory: keep physical code and action visible on wide tables. */
body[data-page="inventory"] #record-list .pf-grid-table thead th:first-child,
body[data-page="inventory"] #record-list .pf-grid-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--pf-ui-surface);
  box-shadow: 1px 0 0 var(--pf-ui-line);
  white-space: nowrap;
  overflow-wrap: normal;
  min-width: 110px;
}
body[data-page="inventory"] #record-list .pf-grid-table thead th:first-child { z-index: 4; background: var(--pf-ui-row-alt); }
body[data-page="inventory"] #record-list .pf-grid-table tbody tr:nth-child(even) > td:first-child { background: var(--pf-ui-row-alt); }
body[data-page="inventory"] #record-list .pf-grid-table tbody tr:hover > td:first-child { background: var(--pf-ui-surface-hover); }
body[data-page="inventory"] #record-list .pf-grid-table thead th:last-child,
body[data-page="inventory"] #record-list .pf-grid-table tbody td.row-actions {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--pf-ui-surface);
  box-shadow: -1px 0 0 var(--pf-ui-line);
}
body[data-page="inventory"] #record-list .pf-grid-table thead th:last-child { z-index: 4; background: var(--pf-ui-row-alt); }
body[data-page="inventory"] #record-list .pf-grid-table tbody tr:nth-child(even) > td.row-actions { background: var(--pf-ui-row-alt); }
body[data-page="inventory"] #record-list .pf-grid-table tbody tr:hover > td.row-actions { background: var(--pf-ui-surface-hover); }
body[data-page="inventory"] #record-list .pf-inventory-condition {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 999px;
  padding: 4px 9px; font-weight: 600; font-size: .78rem;
  line-height: 1.25; white-space: nowrap;
}
body[data-page="inventory"] #record-list .pf-inventory-condition--ok { background: #d8f2e4; color: #16603b; border-color: #b5dcc8; }
body[data-page="inventory"] #record-list .pf-inventory-condition--danger { background: #fce0e2; color: #9e2431; border-color: #f1b9bc; }
body[data-page="inventory"] #record-list .pf-inventory-condition--pending { background: #fff0d1; color: #815412; border-color: #e9d39e; }
html[data-theme="dark"] body[data-page="inventory"] #record-list .pf-inventory-condition--ok { background: #173b2c; color: #9be2b6; border-color: #28684a; }
html[data-theme="dark"] body[data-page="inventory"] #record-list .pf-inventory-condition--danger { background: #47232a; color: #ffb3b9; border-color: #74404a; }
html[data-theme="dark"] body[data-page="inventory"] #record-list .pf-inventory-condition--pending { background: #493918; color: #f9dc9d; border-color: #79602c; }
@media (max-width: 540px) {
  body[data-page="inventory"] #record-list .pf-grid-table thead th:first-child,
  body[data-page="inventory"] #record-list .pf-grid-table tbody td:first-child { min-width: 94px; }
}

/* The inventory grid is primary; the historical/diagnostic dashboard is opt-in. */
body[data-page="inventory"] #reconciliation-summary {
  margin: 10px 0 18px;
  padding: 0;
  overflow: visible;
}
body[data-page="inventory"] #reconciliation-summary > summary {
  cursor: pointer;
  font-size: .84rem;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 7px;
  color: var(--pf-ui-muted);
}
body[data-page="inventory"] #reconciliation-summary > summary:focus-visible {
  outline: 2px solid var(--pf-ui-primary);
  outline-offset: 2px;
}
body[data-page="inventory"] #reconciliation-summary [data-pf-reconciliation-content] { padding: 4px 14px 12px; }

/* v1.23.61 — Recuento verificable y compacto dentro de la barra de filtros.
   Única fuente: totalElements/content del API; sin sumar todas las páginas. */
.pf-data-grid > form.pf-filter-toolbar > .pf-record-counter,
.rbac-table-filters > .pf-record-counter {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  min-width: 150px;
  min-height: 30px;
  margin: 0;
  padding: 2px 4px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--pf-ui-muted, #536579);
  font-variant-numeric: tabular-nums;
}
.pf-data-grid > form.pf-filter-toolbar > .pf-record-counter { margin-left: auto; }
.pf-data-grid > form.pf-filter-toolbar > .pf-status-bar ~ .pf-record-counter { margin-left: 0; }
@media (max-width: 740px) {
  .pf-data-grid > form.pf-filter-toolbar > .pf-record-counter {
    margin-left: auto;
    min-width: 132px;
  }
}
@media (max-width: 480px) {
  .pf-data-grid > form.pf-filter-toolbar > .pf-record-counter,
  .rbac-table-filters > .pf-record-counter { min-width: 0; font-size: 11px; }
}
/* Pantallas estrechas: conservar las acciones en su fila; el contador ocupa
   una línea de texto secundaria, nunca expulsa el botón Filtros. */
@media (max-width: 740px) {
  .pf-data-grid > form.pf-filter-toolbar > .pf-filter-toggle { order: 1; }
  .pf-data-grid > form.pf-filter-toolbar > .pf-record-counter {
    order: 2;
    flex: 1 0 100%;
    min-width: 0;
    min-height: 16px;
    justify-content: flex-end;
    padding: 0 2px;
    margin: 0;
  }
}

/* v1.23.62 — Solo listados que habilitan exportación.
   Control separado de Filtros, mismo alto y sin modificar otras barras. */
.pf-data-grid .pf-filter-toolbar > :is(.pf-list-export-menu,.pf-list-export-excel) {
  box-sizing:border-box; flex:0 0 auto; min-width:0; margin:0;
  height:32px; min-height:32px; color:var(--pf-ui-text-strong);
  background:var(--pf-ui-surface);border:1px solid var(--pf-ui-control-border);
  border-radius:6px;font-size:12px;font-weight:600;line-height:1;
}
.pf-data-grid .pf-filter-toolbar > .pf-list-export-menu {position:relative;z-index:15;}
.pf-data-grid .pf-filter-toolbar > .pf-list-export-menu[open] {z-index:1050;}
.pf-data-grid .pf-filter-toolbar > .pf-list-export-menu > summary {
  box-sizing:border-box;display:flex;align-items:center;justify-content:center;
  height:30px;min-height:30px;padding:0 10px;cursor:pointer;list-style:none;white-space:nowrap;
}
.pf-data-grid .pf-filter-toolbar > .pf-list-export-menu > summary::-webkit-details-marker {display:none;}
.pf-data-grid .pf-filter-toolbar > .pf-list-export-excel {padding:0 10px;white-space:nowrap;}
.pf-data-grid .pf-filter-toolbar > :is(.pf-list-export-menu,.pf-list-export-excel):hover,
.pf-data-grid .pf-filter-toolbar > .pf-list-export-menu[open] {background:var(--pf-ui-surface-hover);}
.pf-list-export-menu-items {
  position:absolute;right:0;top:calc(100% + 5px);z-index:100;
  width:225px;max-width:calc(100vw - 30px);padding:5px;
  display:grid;gap:2px;background:var(--pf-ui-surface);
  border:1px solid var(--pf-ui-line-strong);border-radius:8px;
  box-shadow:0 12px 36px rgba(8,26,44,.22);
}
.pf-list-export-menu:not([open]) .pf-list-export-menu-items {display:none;}
.pf-list-export-menu-action {display:block;width:100%;border:0;border-radius:5px;
  padding:10px;text-align:left;cursor:pointer;background:transparent;
  color:var(--pf-ui-ink);font-size:12px;font-weight:500;}
.pf-list-export-menu-action:hover,.pf-list-export-menu-action:focus-visible {background:var(--pf-ui-surface-hover);}
@media (max-width:740px) {
  .pf-data-grid .pf-filter-toolbar > :is(.pf-list-export-menu,.pf-list-export-excel) {order:0;}
  .pf-list-export-menu-items {left:0;right:auto;}
}

/* Portuflow 1.23.66 — Exportación compacta, sin alterar listados.
   Encabezado y acciones fijos; el cuerpo es la única zona con scroll. */
dialog.pf-export-dialog {
  box-sizing:border-box; width:min(690px,calc(100vw - 20px));
  max-width:calc(100vw - 20px); max-height: min(90dvh,780px);
  margin:auto; padding:0; color:var(--pf-ui-ink,#26323c);
  background:var(--pf-ui-surface,#fff); border:1px solid var(--pf-ui-line,#d9dee3);
  border-radius:12px;box-shadow:0 18px 55px #0003;overflow:hidden;
  grid-template-rows:auto minmax(0,1fr) auto;
}
dialog.pf-export-dialog[open] {display:grid;animation:pf-export-appear .16s ease-out both;}
dialog.pf-export-dialog::backdrop {background:rgba(12,20,32,.52);}
.pf-export-dialog *, .pf-export-dialog *::before, .pf-export-dialog *::after{box-sizing:border-box;}
.pf-export-header{display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-width:0;padding:12px 16px;border-bottom:1px solid var(--pf-ui-line,#d9dee3);}
.pf-export-header h2{min-width:0;font-size:1rem;line-height:1.3;margin:0;font-weight:700;color:inherit;}
.pf-export-x{flex:0 0 30px;width:30px;height:30px;padding:0;border-radius:7px;
  border:1px solid var(--pf-ui-line,#d9dee3);color:inherit;background:transparent;font-size:20px;cursor:pointer;}
.pf-export-x:hover,.pf-export-x:focus-visible{background:var(--pf-ui-surface-hover,#e9edf2);}
.pf-export-content{display:grid;align-content:start;gap:11px;min-width:0;min-height:0;
  padding:13px 16px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;}
.pf-export-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;margin:0;padding:0;border:0;min-width:0;}
.pf-export-modes legend{display:block;grid-column:1/-1;float:none;width:100%;
  margin:0 0 6px;padding:0;font-weight:650;font-size:.8rem;line-height:22px;color:inherit;}
.pf-export-choice{position:relative;display:flex;align-items:center;justify-content:center;
  width:100%;min-width:0;min-height:35px;padding:7px 9px;margin:0;
  font-size:.79rem;line-height:1.3;font-weight:500;color:inherit;
  background:var(--pf-ui-surface-soft,#f7f9fb);
  border:1px solid var(--pf-ui-line,#d9dee3);border-radius:7px;cursor:pointer;text-align:center;}
.pf-export-choice input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;}
.pf-export-choice:has(input:checked){border-color:var(--pf-ui-primary,#176bcc);
  background:color-mix(in srgb,var(--pf-ui-primary,#176bcc) 8%,var(--pf-ui-surface,#fff));
  font-weight:650;color:var(--pf-ui-ink,#26323c);}
.pf-export-choice:focus-within{outline:2px solid var(--pf-ui-primary,#176bcc);outline-offset:2px;}
.pf-export-filters{display:grid;gap:8px;min-width:0;}
.pf-export-filters[hidden]{display:none!important;}
.pf-export-dates,.pf-export-option-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.pf-export-field{display:grid;gap:4px;min-width:0;font-size:.76rem;font-weight:600;color:inherit;}
.pf-export-field input,.pf-export-field select{width:100%;min-width:0;height:34px;padding:5px 8px;
  font:inherit;color:inherit;background:var(--pf-ui-control-bg,var(--pf-ui-surface,#fff));
  border:1px solid var(--pf-ui-control-border,#bac7d6);border-radius:6px;}
.pf-export-field :is(input,select):focus-visible{outline:2px solid var(--pf-ui-primary,#176bcc);outline-offset:1px;}
.pf-export-preview{padding:9px 11px;min-width:0;border:1px solid var(--pf-ui-line,#d9dee3);
  border-radius:7px;background:var(--pf-ui-surface-soft,#f5f7fa);}
.pf-export-count{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.79rem;}
.pf-export-count strong{font-size:1.05rem;font-variant-numeric:tabular-nums;}
.pf-export-status{font-size:.75rem;line-height:1.35;margin:4px 0 0;}
.pf-export-status:empty{display:none;}
.pf-export-status[data-tone='error']{color:var(--pf-ui-danger,#b33a3a);}
.pf-export-status[data-tone='success']{color:var(--pf-ui-success,#22764c);}
.pf-export-footer{display:flex;align-items:center;justify-content:flex-end;gap:7px;
  padding:10px 16px;border-top:1px solid var(--pf-ui-line,#d9dee3);}
.pf-export-footer button{flex:0 0 auto;min-height:33px;padding:6px 12px;white-space:nowrap;font-size:.78rem;}
.pf-export-footer .pf-export-edit{margin-right:auto;}
.pf-export-footer button[hidden]{display:none!important;}
.pf-export-footer button:disabled{opacity:.45;cursor:not-allowed;}
.pf-export-help{display:inline-flex;align-items:center;justify-content:center;
  margin:0 0 0 5px;padding:0;width:18px;height:18px;vertical-align:middle;
  border:1px solid var(--pf-ui-control-border,#bac7d6);border-radius:50%;
  background:var(--pf-ui-surface,#fff);color:var(--pf-ui-muted,#67758a);
  font-size:11px;font-weight:700;line-height:1;cursor:pointer;}
.pf-export-help:hover,.pf-export-help:focus-visible{border-color:var(--pf-ui-primary,#176bcc);color:var(--pf-ui-primary,#176bcc);}
.pf-export-help-panel[popover]{position:fixed;inset:auto;margin:0;width:max-content;max-width:min(285px,calc(100vw - 16px));
  border:1px solid var(--pf-ui-line,#d9dee3);border-radius:8px;
  padding:9px 11px;background:var(--pf-ui-surface,#fff);color:var(--pf-ui-ink,#26323c);
  box-shadow:0 12px 24px #0003;line-height:1.4;font-size:.76rem;}
@keyframes pf-export-appear{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}
@media(max-width:520px){
  dialog.pf-export-dialog{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 14px);}
  .pf-export-header{padding:10px 12px;}
  .pf-export-content{padding:11px 12px;gap:10px;}
  .pf-export-footer{padding:9px 12px;gap:5px;}
  .pf-export-footer button{padding:6px 9px;font-size:.75rem;}
}
@media(max-width:335px){.pf-export-dates,.pf-export-option-fields{grid-template-columns:1fr;}}
@media(prefers-reduced-motion:reduce){dialog.pf-export-dialog[open]{animation:none;}}

/* Acceso directo a exportar: idéntica altura a Filtros, sin modificar posiciones. */
.pf-data-grid .pf-filter-toolbar > .pf-list-export-open {
  flex:0 0 auto; box-sizing:border-box; min-width:0; height:32px;min-height:32px;
  padding:0 11px;margin:0;white-space:nowrap;border-radius:6px;
  border:1px solid var(--pf-ui-control-border);color:var(--pf-ui-text-strong);
  background:var(--pf-ui-surface);font-size:12px;font-weight:600;
}
.pf-data-grid .pf-filter-toolbar > .pf-list-export-open:hover {background:var(--pf-ui-surface-hover);}
.pf-export-footer button:disabled {opacity:.48;cursor:not-allowed;}


/* v1.23.70 — Selección explícita de registros y datos para el exportador común. */
.pf-export-modes.pf-export-scopes{grid-template-columns:repeat(2,minmax(0,1fr));}
.pf-export-scopes .pf-export-choice{padding-inline:4px;font-size:.73rem;}
.pf-export-fields{min-width:0;border:1px solid var(--pf-ui-line,#d9dee3);border-radius:7px;
  background:var(--pf-ui-surface-soft,#f7f9fb);}
.pf-export-fields>summary{cursor:pointer;padding:9px 11px;font-size:.79rem;font-weight:650;
  list-style-position:inside;line-height:1.4;}
.pf-export-fields>summary:focus-visible{outline:2px solid var(--pf-ui-primary,#176bcc);outline-offset:-2px;}
.pf-export-fields-controls{display:flex;justify-content:flex-end;gap:6px;padding:0 10px 7px;}
.pf-export-fields-controls button{min-height:26px;padding:3px 8px;font-size:.72rem;}
.pf-export-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 9px;
  padding:0 11px 11px;min-width:0;}
.pf-export-column,.pf-export-pick-row{display:flex;align-items:center;gap:8px;min-width:0;
  cursor:pointer;font-size:.77rem;line-height:1.3;color:inherit;}
.pf-export-column span,.pf-export-pick-row span{overflow-wrap:anywhere;min-width:0;}
.pf-export-column input,.pf-export-pick-row input{flex:0 0 16px;inline-size:16px;block-size:16px;
  margin:0;accent-color:var(--pf-ui-primary,#176bcc);}
.pf-export-pick[hidden]{display:none!important;}
.pf-export-pick{display:grid;gap:7px;min-width:0;}
.pf-export-pick-heading,.pf-export-pick-pager{display:flex;align-items:center;justify-content:space-between;gap:8px;}
.pf-export-pick-heading{font-size:.78rem;}
.pf-export-pick-heading span,.pf-export-pick-pager span{color:var(--pf-ui-muted,#67758a);font-size:.73rem;}
/* v1.23.71 — selección sin filtros duplicados ni scroll anidado. */
.pf-export-pick-search{min-width:0;}
.pf-export-pick-search input{box-sizing:border-box;width:100%;min-width:0;height:36px;
  padding:6px 10px;border:1px solid var(--pf-ui-control-border,#bac7d6);border-radius:6px;
  background:var(--pf-ui-control-bg,var(--pf-ui-surface,#fff));color:inherit;font:inherit;font-size:.78rem;}
.pf-export-pick-search input:focus-visible{outline:2px solid var(--pf-ui-primary,#176bcc);outline-offset:1px;}
.pf-export-pick-table{display:grid;min-width:0;gap:0;}
.pf-export-pick-table-heading{display:flex;align-items:center;gap:11px;
  padding:8px 11px;background:var(--pf-ui-surface-soft,#f7f9fb);
  border:1px solid var(--pf-ui-line,#d9dee3);border-radius:7px 7px 0 0;
  color:var(--pf-ui-muted,#67758a);font-size:.73rem;font-weight:650;}
.pf-export-pick-table-heading input{flex:0 0 17px;width:17px;height:17px;margin:0;
  accent-color:var(--pf-ui-primary,#176bcc);cursor:pointer;}
.pf-export-pick-table-heading input:focus-visible{outline:2px solid var(--pf-ui-primary,#176bcc);outline-offset:2px;}
.pf-export-pick-pager button{min-height:29px;padding:4px 9px;font-size:.74rem;}
.pf-export-pick-list{display:grid;align-content:start;gap:0;min-width:0;
  border:1px solid var(--pf-ui-line,#d9dee3);border-top:0;border-radius:0 0 7px 7px;}
.pf-export-pick-row{display:grid;grid-template-columns:17px minmax(0,1fr) auto;
  align-items:center;gap:11px;min-height:59px;padding:8px 11px;
  border-bottom:1px solid var(--pf-ui-line,#d9dee3);}
.pf-export-pick-row:last-child{border-bottom:0;}
.pf-export-pick-row:hover,.pf-export-pick-row:focus-within{background:var(--pf-ui-surface-hover,#eef2f6);}
.pf-export-pick-row.is-selected{background:color-mix(in srgb,var(--pf-ui-primary,#176bcc) 5%,var(--pf-ui-surface,#fff));}
.pf-export-pick-info,.pf-export-pick-main{display:flex;min-width:0;gap:5px 8px;}
.pf-export-pick-info{flex-direction:column;align-items:flex-start;}
.pf-export-pick-main{flex-wrap:wrap;align-items:baseline;}
.pf-export-pick-main strong{font-size:.8rem;font-weight:700;color:inherit;white-space:nowrap;}
.pf-export-pick-customer{font-size:.8rem;font-weight:500;}
.pf-export-pick-details{font-size:.73rem;line-height:1.4;color:var(--pf-ui-muted,#67758a);}
.pf-export-pick-state{justify-self:end;align-self:center;white-space:nowrap;
  padding:3px 7px;border-radius:12px;border:1px solid var(--pf-ui-line,#d9dee3);
  background:var(--pf-ui-surface-soft,#f7f9fb);font-size:.7rem;font-weight:650;}
.pf-export-pick-empty{padding:12px;margin:0;color:var(--pf-ui-muted,#67758a);font-size:.77rem;}
@media(max-width:440px){
  .pf-export-pick-row{grid-template-columns:17px minmax(0,1fr);gap:8px;}
  .pf-export-pick-state{grid-column:2;justify-self:start;}
  .pf-export-pick-heading{align-items:flex-start;}
  .pf-export-pick-heading span{text-align:right;}
}
@media(max-width:335px){.pf-export-columns{grid-template-columns:1fr;}
  .pf-export-scopes .pf-export-choice{font-size:.68rem;padding-inline:2px;}}

/* v1.23.73 — Filtros de Alquileres: tres filas útiles y sin títulos redundantes.
   No afecta otros listados ni los filtros de trabajos dentro de un alquiler. */
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-panel-heading{padding:7px 11px;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-fields{
  grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px;padding:10px 11px;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-sort,
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-date-group{grid-column:auto;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-field{gap:3px;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-date-group{gap:3px;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-date-pair{display:block;min-width:0;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-date-input>span{display:none;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-fields :is(input:not([type=checkbox]),select){
  height:32px;min-height:32px;padding:4px 7px;}
.pf-filter-popover.pf-filter-compact-rentals .pf-filter-panel-actions{padding:7px 11px;}
@media(max-width:360px){
  .pf-filter-popover.pf-filter-compact-rentals .pf-filter-fields{grid-template-columns:minmax(0,1fr);}
}

/* v1.23.75 — Placa + mes, legibles sin columnas adicionales. */
body[data-page="fleet"] .pf-fleet-plate {display:inline-flex; flex-direction:column; align-items:flex-start; gap:1px; line-height:1.25; white-space:nowrap;}
body[data-page="fleet"] .pf-fleet-plate strong {font-weight:650; color:inherit;}
body[data-page="fleet"] .pf-fleet-plate small {font-size:11px; font-weight:500; color:var(--pf-ui-muted,#697987);}
html[data-theme="dark"] body[data-page="fleet"] .pf-fleet-plate small {color:var(--pf-ui-text-soft,#bcc9d5);}

/* v1.23.75 — Uniformidad vertical exclusivamente en filas de controles.
   No alterar textareas, checks, radio, tarjetas ni acciones con texto multilinea. */
:root {--pf-row-control-h:36px;}
body :is(.list-toolbar,.standard-filters.list-toolbar,.pf-filter-toolbar,.legacy-resource-before,.legacy-grid-before,.billing-toolbar,.customer-related-heading) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,button,.button) {
  box-sizing:border-box; height:var(--pf-row-control-h)!important;
  min-height:var(--pf-row-control-h)!important; max-height:var(--pf-row-control-h)!important;
  line-height:1.2; align-self:center;
}
body :is(.list-toolbar,.standard-filters.list-toolbar,.pf-filter-toolbar,.legacy-resource-before,.legacy-grid-before,.billing-toolbar) .pf-status-segment {
  box-sizing:border-box; min-height:var(--pf-row-control-h)!important; height:var(--pf-row-control-h)!important;
}
body .pf-filter-popover .pf-filter-fields :is(input:not([type="checkbox"]),select) {
  box-sizing:border-box; height:var(--pf-row-control-h); min-height:var(--pf-row-control-h);
}
@media (max-width:620px) {body .customer-related-heading :is(a.button,button) {max-height:none!important;}}

/* v1.23.75 — Dossier de clientes: corregir superficies claras residuales en tema oscuro. */
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active :is(
  .customer-tabs,.customer-profile-summary,.customer-tab-buttons,.customer-tab-panel,
  .customer-related-heading,.customer-tab-toolbar,.customer-tab-footer,
  .customer-dossier-body,.customer-dossier-content) {
  background:var(--pf-theme-surface,#1d2833)!important;
  color:var(--pf-theme-text,#e7edf3)!important;
  border-color:var(--pf-theme-border,#40505e)!important;
}
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active :is(
 .customer-profile-name,.customer-related-heading h3,.customer-tab-panel h2,.customer-tab-panel h3) {
 color:var(--pf-theme-text,#e7edf3)!important;
}
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active :is(
 .customer-profile-meta,.customer-related-heading p,.customer-tab-count) {
 color:var(--pf-theme-text-soft,#becad5)!important;
}
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active .customer-tab:not([aria-selected="true"]) {
 background:transparent!important; color:var(--pf-theme-text-soft,#bed0df)!important;
}
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active .customer-tab[aria-selected="true"] {
 background:var(--pf-theme-surface-2,#2b3945)!important;
 color:var(--pf-theme-accent,#84baff)!important;
 border-bottom-color:var(--pf-theme-accent,#84baff)!important;
}
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active .customer-profile-status.is-active {
 background:#163c2a!important; color:#96f1b5!important; border-color:#367a58!important;
}
html[data-theme="dark"] body[data-page="customers"] #record-dialog.customer-dossier-active .customer-tab-count {
 background:var(--pf-theme-surface-2,#2b3945)!important;
}

/* v1.23.81 — compact page size selector, on every mountList pager. */
.pf-data-grid > .pager .pf-pager-size {
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--pf-ui-muted);
}
.pf-data-grid > .pager .pf-pager-size select {
  width: 67px;
  height: 30px;
  min-height: 30px;
  box-sizing: border-box;
  padding: 3px 20px 3px 8px;
  border: 1px solid var(--pf-ui-line);
  border-radius: 5px;
  color: var(--pf-ui-text-strong);
  background-color: var(--pf-ui-surface);
  font: inherit;
  cursor: pointer;
}
.pf-data-grid > .pager .pf-pager-size select:focus-visible {
  outline: 2px solid var(--pf-ui-primary);
  outline-offset: 2px;
}
.pf-data-grid > .pager .pf-pager-size select:disabled { cursor: wait; opacity: .65; }
@media (max-width: 480px) {
  .pf-data-grid > .pager { gap: 5px; }
  .pf-data-grid > .pager .pf-pager-size { margin-right: auto; }
}
