/*
 * Parqking shared UI primitives.
 *
 * Add .pq-ui to a page or modal root, then opt into the component classes
 * below. Nothing in this file targets an unscoped Bootstrap element.
 */
.pq-ui .pq-coverage {
  margin-block: 12px 20px;
}

.pq-ui .pq-coverage__track {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  height: 9px;
  margin: 9px 0 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3edf2;
}

.pq-ui .pq-coverage__track::-webkit-progress-bar {
  background: #e3edf2;
  border-radius: inherit;
}

.pq-ui .pq-coverage__track::-webkit-progress-value {
  border-radius: inherit;
  background: linear-gradient(90deg, #16a36b, #43c48b);
}

.pq-ui .pq-coverage__track::-moz-progress-bar {
  border-radius: inherit;
  background: linear-gradient(90deg, #16a36b, #43c48b);
}

.pq-ui {
  /* Typography */
  --pq-font-family-sans: "Poppins", "Segoe UI", Arial, sans-serif;
  --pq-font-size-xs: 11px;
  --pq-font-size-sm: 12px;
  --pq-font-size-md: 14px;
  --pq-font-size-lg: 18px;
  --pq-font-size-xl: 26px;
  --pq-font-weight-regular: 400;
  --pq-font-weight-semibold: 600;
  --pq-font-weight-bold: 700;
  --pq-line-height-tight: 1.2;
  --pq-line-height-normal: 1.4;
  --pq-line-height-relaxed: 1.5;

  /* Semantic color roles */
  --pq-color-brand: #f47d27;
  --pq-color-brand-soft: #fff4eb;
  --pq-color-brand-strong: #d96516;
  --pq-color-accent: #f19f4d;
  --pq-color-heading: #243041;
  --pq-color-text: #334760;
  --pq-color-muted: #6a7c92;
  --pq-color-border: #dce7ef;
  --pq-color-border-strong: #b9c9d7;
  --pq-color-surface: #fff;
  --pq-color-surface-muted: #f7fafc;
  --pq-color-page: #f4f7fa;
  --pq-color-evidence-header: #1f3338;
  --pq-color-evidence-title: #bdd5df;
  --pq-color-info: #2477d1;
  --pq-color-info-soft: #e9f3fb;
  --pq-color-success: #248451;
  --pq-color-success-soft: #e7f6ed;
  --pq-color-warning: #a96513;
  --pq-color-warning-soft: #fff3dc;
  --pq-color-danger: #b44949;
  --pq-color-danger-soft: #fcecec;
  --pq-color-audit: #7654b5;
  --pq-color-audit-soft: #f1ebfb;
  --pq-color-hover: #fbfdff;
  --pq-color-selected: #e9f3fb;
  --pq-color-disabled: #9aabba;
  --pq-color-disabled-surface: #eef2f6;
  --pq-color-row-divider: #e9eff3;
  --pq-color-overlay: rgba(255, 255, 255, .86);

  /* Shape and elevation */
  --pq-radius-sm: 7px;
  --pq-radius-md: 10px;
  --pq-radius-lg: 12px;
  --pq-radius-pill: 999px;
  --pq-shadow-panel: 0 5px 16px rgba(33, 51, 79, .07);
  --pq-shadow-soft: 0 3px 12px rgba(33, 51, 79, .06);
  --pq-shadow-modal: 0 18px 50px rgba(33, 51, 79, .18);
  --pq-focus-ring: 0 0 0 3px rgba(36, 119, 209, .2);

  /* Density and component dimensions */
  --pq-content-max-width: 1540px;
  --pq-control-height-sm: 36px;
  --pq-control-height: 42px;
  --pq-control-height-lg: 48px;
  --pq-control-height-xl: 64px;
  --pq-control-padding-inline: 12px;
  --pq-table-header-height: 46px;
  --pq-table-row-height: 44px;
  --pq-table-cell-padding-block: 11px;
  --pq-table-cell-padding-inline: 12px;
  --pq-table-cell-padding-block-compact: 8px;
  --pq-table-cell-padding-inline-compact: 10px;
  --pq-table-column-xs: 72px;
  --pq-table-column-sm: 112px;
  --pq-table-column-md: 168px;
  --pq-table-column-lg: 240px;
  --pq-table-column-actions: 144px;
  --pq-hit-target: 36px;
  --pq-tabs-panel-gap: 14px;

  /* Motion and stacking */
  --pq-motion-fast: 150ms;
  --pq-motion-normal: 220ms;
  --pq-ease-standard: cubic-bezier(.2, 0, 0, 1);
  --pq-z-content: 1;
  --pq-z-sticky: 20;
  --pq-z-dropdown: 1060;
  --pq-z-modal: 1070;
  --pq-z-tooltip: 1080;

  /* Spacing */
  --pq-space-1: 4px;
  --pq-space-2: 8px;
  --pq-space-3: 12px;
  --pq-space-4: 16px;
  --pq-space-5: 20px;
  --pq-space-6: 24px;
  color: var(--pq-color-text);
}

/*
 * Responsive reference points. CSS custom properties cannot be used in media
 * query conditions, so shared components use this documented set only:
 * compact 600px, mobile 767px, tablet 1024px, wide 1280px.
 */

.pq-ui,
.pq-ui *,
.pq-ui *::before,
.pq-ui *::after {
  box-sizing: border-box;
}

/* Page shell, heading, and panels */
/* pq-page-shell, pq-page-header, pq-page-title, and pq-page-subtitle are legacy aliases. */
.pq-ui.pq-page,
.pq-ui .pq-page,
.pq-ui .pq-page-shell {
  --pq-page-outer-gutter: var(--pq-space-6);
  min-height: 100%;
  padding: var(--pq-page-outer-gutter);
  background: var(--pq-color-page);
  color: var(--pq-color-text);
  font-family: var(--pq-font-family-sans);
  font-size: var(--pq-font-size-md);
  line-height: var(--pq-line-height-normal);
}

.pq-ui.pq-page--white,
.pq-ui .pq-page--white,
.pq-ui .pq-page-shell--white {
  background: var(--pq-color-surface);
}

.pq-ui.pq-page--dashboard,
.pq-ui .pq-page--dashboard {
  background: linear-gradient(180deg, #f7fbfd 0%, #edf4f8 100%);
}

.pq-ui .pq-page__header,
.pq-ui .pq-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--pq-space-4);
  margin-bottom: 14px;
}

.pq-ui .pq-page-header__content {
  min-width: 0;
}

.pq-ui .pq-page__container,
.pq-ui .pq-page__content {
  width: 100%;
  max-width: var(--pq-content-max-width);
  margin-right: auto;
  margin-left: auto;
}

/*
 * A migrated page may retain a legacy container and grid for its internal
 * layout. The shared page shell owns the outer gutter, so the semantic bridge
 * below removes any second, framework-owned inset.
 */
.pq-ui.pq-page .pq-page__container--legacy-grid,
.pq-ui .pq-page .pq-page__container--legacy-grid {
  padding: 0;
}

.pq-ui .pq-page__header > .pq-page-header__content,
.pq-ui .pq-page__header > .pq-page__actions {
  padding-right: 0;
  padding-left: 0;
}

.pq-ui .pq-page__body {
  min-width: 0;
  margin-right: 0;
  margin-left: 0;
}

.pq-ui .pq-page__body > .pq-page__body-content {
  padding-right: 0;
  padding-left: 0;
}

.pq-ui .pq-page__eyebrow,
.pq-ui .pq-eyebrow,
.pq-ui .pq-field-label,
.pq-ui .pq-field__label {
  display: block;
  color: var(--pq-color-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pq-ui .pq-page__eyebrow,
.pq-ui .pq-eyebrow {
  margin-bottom: var(--pq-space-1);
}

.pq-ui .pq-page__title,
.pq-ui .pq-page-title {
  margin: 0;
  color: var(--pq-color-heading);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.pq-ui .pq-page__description,
.pq-ui .pq-page-subtitle {
  max-width: 780px;
  margin: var(--pq-space-1) 0 0;
  color: var(--pq-color-muted);
  line-height: 1.45;
}

.pq-ui .pq-panel {
  padding: var(--pq-space-5);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-lg);
  background: var(--pq-color-surface);
  box-shadow: var(--pq-shadow-panel);
}

.pq-ui .pq-panel--flat {
  box-shadow: none;
}

.pq-ui .pq-panel + .pq-panel {
  margin-top: var(--pq-space-4);
}

.pq-ui .pq-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--pq-space-3);
  margin-bottom: var(--pq-space-4);
}

.pq-ui .pq-panel__title {
  margin: 0;
  color: var(--pq-color-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.pq-ui .pq-panel__description {
  margin: var(--pq-space-1) 0 0;
  color: var(--pq-color-muted);
  line-height: 1.4;
}

.pq-ui .pq-panel__body {
  min-width: 0;
}

.pq-ui .pq-panel__body--flush {
  margin-right: calc(0px - var(--pq-space-5));
  margin-bottom: calc(0px - var(--pq-space-5));
  margin-left: calc(0px - var(--pq-space-5));
}

.pq-ui .pq-panel__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pq-space-2);
}

.pq-ui .pq-panel__footer {
  margin: var(--pq-space-4) calc(0px - var(--pq-space-5)) calc(0px - var(--pq-space-5));
  padding: var(--pq-space-3) var(--pq-space-5);
  border-top: 1px solid var(--pq-color-border);
  border-radius: 0 0 var(--pq-radius-lg) var(--pq-radius-lg);
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-page__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pq-space-2);
}

.pq-ui .pq-page__header > .pq-page__actions {
  margin-left: auto;
}

/* Shared layout composition. Components never need page-named spacing rules. */
.pq-ui .pq-stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--pq-stack-gap, var(--pq-space-4));
}

.pq-ui .pq-stack--sm {
  --pq-stack-gap: var(--pq-space-2);
}

.pq-ui .pq-stack--lg {
  --pq-stack-gap: var(--pq-space-6);
}

.pq-ui .pq-stack > .pq-panel + .pq-panel {
  margin-top: 0;
}

.pq-ui .pq-stack--full-width {
  width: 100%;
  margin-inline: 0;
  align-self: stretch;
}

.pq-ui .pq-stack--separated { margin-block-start: var(--pq-space-6); }
.pq-ui .pq-chart { position: relative; width: 100%; min-width: 0; height: 420px; }

.pq-ui .pq-cluster {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--pq-cluster-gap, var(--pq-space-2));
}

.pq-ui .pq-cluster--end {
  justify-content: flex-end;
}

.pq-ui .pq-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(var(--pq-grid-columns, 12), minmax(0, 1fr));
  gap: var(--pq-grid-gap, var(--pq-space-4));
}

.pq-ui .pq-grid--2 {
  --pq-grid-columns: 2;
}

.pq-ui .pq-grid--3 {
  --pq-grid-columns: 3;
}

.pq-ui .pq-grid--4 {
  --pq-grid-columns: 4;
}

.pq-ui .pq-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--pq-grid-item-min, 220px)), 1fr));
}

.pq-ui .pq-grid--spacious {
  --pq-grid-gap: var(--pq-space-6);
}

.pq-ui .pq-grid__item,
.pq-ui [class*="pq-grid__item--span-"] {
  min-width: 0;
}

.pq-ui .pq-grid__item--span-2 { grid-column: span 2; }
.pq-ui .pq-grid__item--span-3 { grid-column: span 3; }
.pq-ui .pq-grid__item--span-4 { grid-column: span 4; }
.pq-ui .pq-grid__item--span-6 { grid-column: span 6; }
.pq-ui .pq-grid__item--span-8 { grid-column: span 8; }
.pq-ui .pq-grid__item--span-12 { grid-column: 1 / -1; }

/* Filter and search toolbars */
.pq-ui .pq-toolbar,
.pq-ui .pq-filter-toolbar,
.pq-ui .pq-command-bar {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: var(--pq-space-3);
  padding: var(--pq-space-3) var(--pq-space-4);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface);
}

.pq-ui .pq-command-bar--borderless {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pq-ui .pq-filter-toolbar__query {
  grid-column: span 6;
}

.pq-ui .pq-field,
.pq-ui .pq-filter-toolbar__field {
  grid-column: span 3;
  min-width: 0;
}

.pq-ui .pq-filter-toolbar__actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pq-space-2);
}

.pq-ui .pq-filter-toolbar__actions--start {
  justify-content: flex-start;
}

.pq-ui .pq-filter-toolbar > .pq-filter-toolbar__action--span-1 {
  grid-column: span 1;
}

.pq-ui .pq-filter-toolbar--split > .pq-filter-toolbar__actions.pq-filter-toolbar__actions--span-5 {
  grid-column: 8 / -1;
}

.pq-ui .pq-field-label,
.pq-ui .pq-field__label {
  margin-bottom: 7px;
}

.pq-ui .pq-control,
.pq-ui .pq-filter-toolbar .form-control {
  width: 100%;
  min-height: var(--pq-control-height);
  height: var(--pq-control-height);
  padding: 8px var(--pq-control-padding-inline);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface);
  box-shadow: inset 0 1px 2px rgba(36, 48, 65, .04);
  color: var(--pq-color-text);
  font-family: inherit;
  font-size: var(--pq-font-size-md);
  line-height: var(--pq-line-height-normal);
  transition: border-color var(--pq-motion-fast) var(--pq-ease-standard), box-shadow var(--pq-motion-fast) var(--pq-ease-standard), background-color var(--pq-motion-fast) var(--pq-ease-standard);
}

.pq-ui .pq-control:hover:not(:disabled):not([readonly]),
.pq-ui .pq-filter-toolbar .form-control:hover:not(:disabled):not([readonly]) {
  border-color: var(--pq-color-border-strong);
}

.pq-ui .pq-control::placeholder {
  color: var(--pq-color-muted);
  opacity: .82;
}

.pq-ui textarea.pq-control {
  height: auto;
  min-height: 120px;
  padding-top: var(--pq-space-3);
  padding-bottom: var(--pq-space-3);
  overflow: auto;
  line-height: var(--pq-line-height-relaxed);
  resize: vertical;
}

.pq-ui input[type="file"].pq-control {
  height: auto;
  min-height: var(--pq-control-height);
  padding: var(--pq-space-1) var(--pq-space-2);
}

.pq-ui .pq-control--sm {
  min-height: var(--pq-control-height-sm);
  height: var(--pq-control-height-sm);
  font-size: var(--pq-font-size-sm);
}

.pq-ui .pq-control--lg {
  min-height: var(--pq-control-height-lg);
  height: var(--pq-control-height-lg);
}

.pq-ui .pq-control:disabled,
.pq-ui .pq-control[aria-disabled="true"] {
  border-color: var(--pq-color-border);
  background: var(--pq-color-disabled-surface);
  color: var(--pq-color-disabled);
  cursor: not-allowed;
  opacity: 1;
}

.pq-ui .pq-control[readonly] {
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-text);
}

.pq-ui .pq-control[aria-invalid="true"],
.pq-ui .pq-field--invalid .pq-control {
  border-color: var(--pq-color-danger);
}

.pq-ui .pq-control[aria-invalid="true"]:focus,
.pq-ui .pq-field--invalid .pq-control:focus {
  box-shadow: 0 0 0 3px rgba(180, 73, 73, .18);
}

.pq-ui .pq-input-group,
.pq-ui .pq-query-line {
  display: flex;
  align-items: stretch;
  gap: var(--pq-space-2);
}

.pq-ui .pq-input-group .pq-control,
.pq-ui .pq-input-group .form-control,
.pq-ui .pq-query-line .pq-control,
.pq-ui .pq-query-line .form-control {
  min-width: 0;
  flex: 1 1 auto;
}

.pq-ui .pq-control:focus,
.pq-ui .pq-filter-toolbar .form-control:focus,
.pq-ui .pq-btn:focus,
.pq-ui .pq-action:focus,
.pq-ui .pq-control:focus-visible,
.pq-ui .pq-btn:focus-visible,
.pq-ui .pq-action:focus-visible {
  border-color: var(--pq-color-info);
  outline: 0;
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-btn,
.pq-ui .pq-action { /* Deprecated action alias: use pq-btn plus pq-actions. */
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--pq-color-border-strong);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface);
  color: var(--pq-color-text);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--pq-motion-fast) var(--pq-ease-standard), background-color var(--pq-motion-fast) var(--pq-ease-standard), color var(--pq-motion-fast) var(--pq-ease-standard), box-shadow var(--pq-motion-fast) var(--pq-ease-standard), transform var(--pq-motion-fast) var(--pq-ease-standard);
}

.pq-ui .pq-btn--pill {
  border-radius: var(--pq-radius-pill);
}

.pq-ui .pq-input-group .pq-btn,
.pq-ui .pq-query-line .pq-btn {
  min-height: var(--pq-control-height);
  padding-right: 18px;
  padding-left: 18px;
}

.pq-ui .pq-btn--primary,
.pq-ui .pq-action--primary {
  border-color: var(--pq-color-brand);
  background: var(--pq-color-brand);
  color: #fff;
}

.pq-ui .pq-btn--info {
  border-color: var(--pq-color-info);
  background: var(--pq-color-info);
  color: #fff;
}

.pq-ui .pq-btn--secondary {
  border-color: var(--pq-color-border-strong);
  background: var(--pq-color-surface);
  color: var(--pq-color-text);
}

.pq-ui .pq-btn--communication {
  border-color: var(--pq-color-brand);
  background: var(--pq-color-brand-soft);
  color: var(--pq-color-brand-strong);
}

.pq-ui .pq-btn--danger {
  border-color: var(--pq-color-danger);
  background: var(--pq-color-danger);
  color: #fff;
}

.pq-ui .pq-btn--quiet,
.pq-ui .pq-btn--ghost { /* Deprecated alias: use pq-btn--quiet. */
  border-color: transparent;
  background: transparent;
  color: var(--pq-color-info);
}

.pq-ui .pq-btn--quiet.pq-btn--neutral {
  color: var(--pq-color-text);
}

.pq-ui .pq-btn--sm,
.pq-ui .pq-action--sm {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 12px;
}

.pq-ui .pq-btn--icon {
  flex: 0 0 var(--pq-hit-target);
  width: var(--pq-hit-target);
  padding-right: 0;
  padding-left: 0;
}

.pq-ui .pq-btn__icon,
.pq-ui .pq-action__icon,
.pq-ui .pq-icon {
  flex: 0 0 auto;
  line-height: 1;
}

.pq-ui .pq-btn__label {
  min-width: 0;
}

.pq-ui .pq-visually-hidden,
.pq-ui .pq-btn__label--sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.pq-ui .pq-btn:hover,
.pq-ui .pq-action:hover {
  border-color: var(--pq-color-info);
  color: var(--pq-color-heading);
  text-decoration: none;
}

.pq-ui .pq-btn:active:not([disabled]):not([aria-disabled="true"]),
.pq-ui .pq-action:active:not([disabled]):not([aria-disabled="true"]) {
  transform: translateY(1px);
}

.pq-ui .pq-btn--primary:hover,
.pq-ui .pq-action--primary:hover {
  border-color: var(--pq-color-brand-strong);
  background: var(--pq-color-brand-strong);
  color: #fff;
}

.pq-ui .pq-btn--info:hover {
  border-color: #1d63ae;
  background: #1d63ae;
  color: #fff;
}

.pq-ui .pq-btn--communication:hover {
  border-color: var(--pq-color-brand-strong);
  background: #ffe8d7;
  color: #b9530d;
}

.pq-ui .pq-btn--secondary:hover {
  border-color: var(--pq-color-info);
  background: var(--pq-color-info-soft);
  color: var(--pq-color-heading);
}

.pq-ui .pq-btn--danger:hover,
.pq-ui .pq-btn--danger:focus,
.pq-ui .pq-btn--danger:focus-visible {
  border-color: #943b3b;
  background: #943b3b;
  color: #fff;
}

.pq-ui .pq-btn--quiet:hover,
.pq-ui .pq-btn--quiet:focus,
.pq-ui .pq-btn--ghost:hover,
.pq-ui .pq-btn--ghost:focus {
  border-color: transparent;
  background: var(--pq-color-info-soft);
  color: var(--pq-color-info);
}

/* Quiet destructive actions retain the standard icon-button footprint. */
.pq-ui .pq-btn--quiet.pq-btn--danger {
  border-color: transparent;
  background: transparent;
  color: var(--pq-color-danger);
}

.pq-ui .pq-btn--quiet.pq-btn--danger:hover,
.pq-ui .pq-btn--quiet.pq-btn--danger:focus,
.pq-ui .pq-btn--quiet.pq-btn--danger:focus-visible {
  border-color: transparent;
  background: var(--pq-color-danger-soft);
  color: var(--pq-color-danger);
}

.pq-ui .pq-btn--info:focus {
  color: #fff;
}

.pq-ui .pq-btn[disabled],
.pq-ui .pq-action[disabled],
.pq-ui [aria-disabled="true"].pq-btn,
.pq-ui [aria-disabled="true"].pq-action {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.pq-ui .pq-btn[aria-busy="true"],
.pq-ui .pq-action[aria-busy="true"] {
  cursor: progress;
}

.pq-ui .pq-filter-note {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--pq-color-muted);
  font-size: 12px;
}

.pq-ui .pq-toolbar__field,
.pq-ui .pq-command-bar__field {
  min-width: 0;
  grid-column: span 3;
}

.pq-ui .pq-filter-toolbar__field--span-2 {
  grid-column: span 2;
}

.pq-ui .pq-toolbar__field--span-4,
.pq-ui .pq-filter-toolbar__field--span-4,
.pq-ui .pq-command-bar__field--span-4 {
  grid-column: span 4;
}

.pq-ui .pq-toolbar__field--span-6,
.pq-ui .pq-filter-toolbar__field--span-6,
.pq-ui .pq-command-bar__field--span-6 {
  grid-column: span 6;
}

.pq-ui .pq-toolbar__field--span-8,
.pq-ui .pq-filter-toolbar__field--span-8,
.pq-ui .pq-command-bar__field--span-8 {
  grid-column: span 8;
}

.pq-ui .pq-toolbar__field--full,
.pq-ui .pq-filter-toolbar__field--full,
.pq-ui .pq-command-bar__field--full {
  grid-column: 1 / -1;
}

.pq-ui .pq-command-bar__main,
.pq-ui .pq-command-bar__filters {
  display: grid;
  min-width: 0;
  grid-column: span 9;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: var(--pq-space-3);
}

.pq-ui .pq-toolbar--split > .pq-filter-toolbar__actions,
.pq-ui .pq-filter-toolbar--split > .pq-filter-toolbar__actions,
.pq-ui .pq-command-bar--split > .pq-command-bar__actions,
.pq-ui .pq-command-bar__actions,
.pq-ui .pq-command-bar__aside {
  display: flex;
  min-width: 0;
  grid-column: span 3;
  align-items: stretch;
  align-self: stretch;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  padding-left: var(--pq-space-5);
  border-left: 1px solid var(--pq-color-border);
}

.pq-ui .pq-command-bar__actions.pq-command-bar__actions--top {
  justify-content: flex-start;
}

.pq-ui .pq-command-bar__label,
.pq-ui .pq-filter-toolbar__action-label {
  margin: 0;
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-xs);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .08em;
  line-height: var(--pq-line-height-tight);
  text-transform: uppercase;
}

.pq-ui .pq-command-bar__buttons,
.pq-ui .pq-filter-toolbar__action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pq-space-2);
}

/* Tabs: visual state follows the ARIA state managed by the shared lifecycle. */
.pq-ui .pq-tabs {
  min-width: 0;
}

.pq-ui .pq-tabs__list {
  display: flex;
  min-width: 0;
  margin: 0 0 var(--pq-tabs-panel-gap);
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--pq-color-border);
  list-style: none;
  scrollbar-width: thin;
}

.pq-ui .pq-tabs__tab {
  display: inline-flex;
  min-height: var(--pq-table-row-height);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: var(--pq-space-2);
  margin: 0 0 -1px;
  padding: var(--pq-space-3) var(--pq-space-4);
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--pq-color-muted);
  font: inherit;
  font-weight: var(--pq-font-weight-bold);
  line-height: var(--pq-line-height-tight);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--pq-motion-fast) var(--pq-ease-standard), color var(--pq-motion-fast) var(--pq-ease-standard);
}

.pq-ui .pq-tabs__tab:hover:not(:disabled) {
  background: transparent;
  color: var(--pq-color-heading);
}

.pq-ui .pq-tabs__tab[aria-selected="true"] {
  border-bottom-color: var(--pq-color-brand);
  color: var(--pq-color-heading);
}

.pq-ui .pq-tabs--strong-indicator .pq-tabs__tab[aria-selected="true"] {
  border-bottom-width: 4px;
  box-shadow: inset 0 -1px 0 var(--pq-color-brand);
}

.pq-ui .pq-tabs__tab:focus,
.pq-ui .pq-tabs__tab:focus-visible {
  position: relative;
  z-index: var(--pq-z-content);
  outline: 0;
  background: transparent;
  box-shadow: inset var(--pq-focus-ring);
}

.pq-ui .pq-tabs__tab:disabled,
.pq-ui .pq-tabs__tab[aria-disabled="true"] {
  color: var(--pq-color-disabled);
  cursor: not-allowed;
}

.pq-ui .pq-tabs__panel {
  min-width: 0;
}

.pq-ui .pq-tabs__panel[hidden] {
  display: none !important;
}

/* Native-checkbox switch. Keep the input as the state and focus authority. */
.pq-ui .pq-switch {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: var(--pq-space-3);
  margin: 0;
  padding: var(--pq-space-3);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-text);
  cursor: pointer;
}

/* Use when a composed parent already owns the card surface and spacing. */
.pq-ui .pq-switch--embedded {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pq-ui .pq-setting-card {
  min-width: 0;
  padding: var(--pq-space-3);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-setting-card__content {
  min-width: 0;
  margin-top: var(--pq-space-2);
  padding-left: 54px;
}

.pq-ui .pq-switch__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.pq-ui .pq-switch__control {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  margin-top: 1px;
  border: 1px solid var(--pq-color-border-strong);
  border-radius: 999px;
  background: #d7e0e8;
  transition: border-color var(--pq-motion-fast) var(--pq-ease-standard), background-color var(--pq-motion-fast) var(--pq-ease-standard);
}

.pq-ui .pq-switch__control::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--pq-color-surface);
  box-shadow: 0 1px 3px rgba(36, 48, 65, .22);
  content: "";
  transition: transform var(--pq-motion-fast) var(--pq-ease-standard);
}

.pq-ui .pq-switch__input:checked + .pq-switch__control {
  border-color: var(--pq-color-brand);
  background: var(--pq-color-brand);
}

.pq-ui .pq-switch__input:checked + .pq-switch__control::after {
  transform: translateX(18px);
}

.pq-ui .pq-switch__input:focus + .pq-switch__control,
.pq-ui .pq-switch__input:focus-visible + .pq-switch__control {
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-switch__input:disabled + .pq-switch__control {
  border-color: var(--pq-color-border);
  background: var(--pq-color-disabled-surface);
}

.pq-ui .pq-switch--disabled,
.pq-ui .pq-switch[aria-disabled="true"] {
  color: var(--pq-color-disabled);
  cursor: not-allowed;
  opacity: .72;
}

.pq-ui .pq-switch__content,
.pq-ui .pq-switch__label,
.pq-ui .pq-switch__description {
  min-width: 0;
}

.pq-ui .pq-switch__label {
  display: block;
  color: var(--pq-color-heading);
  font-weight: var(--pq-font-weight-bold);
  line-height: var(--pq-line-height-tight);
}

.pq-ui .pq-switch__description {
  display: block;
  margin-top: 3px;
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-sm);
  line-height: var(--pq-line-height-normal);
}

/* Operational metrics and ordered task steps. */
.pq-ui .pq-stats,
.pq-ui .pq-stat-grid, /* Compatibility alias. */
.pq-ui .pq-steps,
.pq-ui .pq-step-grid { /* Compatibility alias. */
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--pq-space-3);
}

.pq-ui .pq-stat,
.pq-ui .pq-step-card {
  min-width: 0;
  padding: var(--pq-space-4);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface);
}

.pq-ui .pq-stat__label {
  display: block;
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-xs);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .06em;
  line-height: var(--pq-line-height-tight);
  text-transform: uppercase;
}

.pq-ui .pq-stat__value {
  display: block;
  margin-top: var(--pq-space-1);
  color: var(--pq-color-heading);
  font-size: 24px;
  font-weight: var(--pq-font-weight-bold);
  line-height: var(--pq-line-height-tight);
  overflow-wrap: anywhere;
}

.pq-ui .pq-stat__meta {
  display: block;
  margin-top: var(--pq-space-1);
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-sm);
  line-height: var(--pq-line-height-normal);
}

/* Signed financial summaries and proportional allocation. */
.pq-ui .pq-stat--emphasis { background: var(--pq-color-heading); border-color: var(--pq-color-heading); }
.pq-ui .pq-stat--emphasis .pq-stat__value { color: #fff; }
.pq-ui .pq-stat--emphasis .pq-stat__label,
.pq-ui .pq-stat--emphasis .pq-stat__meta { color: #d8e8f3; }
.pq-ui .pq-amount-list { margin: 0 0 var(--pq-space-4); }
.pq-ui .pq-amount-list__row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--pq-space-4); padding: var(--pq-space-4) 0; border-bottom: 1px solid var(--pq-color-border); }
.pq-ui .pq-amount-list__row > dt { min-width: 0; font-weight: 600; }
.pq-ui .pq-amount-list__row[hidden] { display: none; }
.pq-ui .pq-amount-list__row > dt .pq-help-text { display: block; font-weight: 400; }
.pq-ui .pq-amount-list__row > dd { margin: 0; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.pq-ui .pq-amount-list__row--total { border-bottom: 0; color: var(--pq-color-heading); font-size: 20px; }
.pq-ui .pq-amount-list--compact .pq-amount-list__row { padding: var(--pq-space-2) 0; border: 0; }
.pq-ui .pq-ledger-key { font-size: 12px; color: var(--pq-color-muted); background: transparent; padding: 0; }
.pq-ui .pq-ledger-key:not([hidden]) { display: block; margin-top: var(--pq-space-1); }
.pq-ui .pq-allocation { display: block; width: 100%; height: 16px; margin: var(--pq-space-4) 0; border-radius: var(--pq-radius-md); overflow: hidden; }
.pq-ui .pq-allocation--empty { display: none; }
.pq-ui .pq-allocation__key { display: inline-block; width: 9px; height: 9px; margin-right: var(--pq-space-2); border-radius: 50%; }
.pq-ui .pq-allocation [data-category="net"], .pq-ui .pq-allocation__key[data-category="net"] { fill: #167b76; background: #167b76; }
.pq-ui .pq-allocation [data-category="fees"], .pq-ui .pq-allocation__key[data-category="fees"] { fill: #fb873c; background: #fb873c; }
.pq-ui .pq-allocation [data-category="merchant_fee"], .pq-ui .pq-allocation__key[data-category="merchant_fee"] { fill: #7a9bb8; background: #7a9bb8; }
.pq-ui .pq-allocation [data-category="ledger_tax"], .pq-ui .pq-allocation__key[data-category="ledger_tax"] { fill: #c9a253; background: #c9a253; }
.pq-ui .pq-allocation [data-category="refund_cb"], .pq-ui .pq-allocation__key[data-category="refund_cb"] { fill: #ce6970; background: #ce6970; }

.pq-ui .pq-stat__action {
  display: inline-flex;
  align-items: center;
  gap: var(--pq-space-1);
  margin-top: var(--pq-space-2);
  color: var(--pq-color-info);
  font-size: var(--pq-font-size-xs);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pq-ui .pq-stat--interactive {
  width: 100%;
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--pq-motion-fast) var(--pq-ease-standard), box-shadow var(--pq-motion-fast) var(--pq-ease-standard), transform var(--pq-motion-fast) var(--pq-ease-standard);
}

.pq-ui .pq-stat--interactive:hover {
  border-color: var(--pq-color-border-strong);
  box-shadow: var(--pq-shadow-sm);
  transform: translateY(-1px);
}

.pq-ui .pq-stat--interactive:focus,
.pq-ui .pq-stat--interactive:focus-visible {
  outline: 0;
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-stat--interactive::after {
  content: none;
}

/* Shared dashboard composition for operational and portfolio workspaces. */
.pq-ui .pq-dashboard-context {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pq-space-2) var(--pq-space-4);
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-sm);
}

.pq-ui .pq-dashboard-context > span + span {
  position: relative;
  padding-left: var(--pq-space-4);
}

.pq-ui .pq-dashboard-context > span + span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: var(--pq-radius-pill);
  background: var(--pq-color-border-strong);
  content: '';
  transform: translateY(-50%);
}

.pq-ui .pq-dashboard-stats {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--pq-space-3);
}

.pq-ui .pq-stat--with-icon {
  position: relative;
  min-height: 104px;
  padding-left: 76px;
}

.pq-ui .pq-stat__icon {
  position: absolute;
  top: 50%;
  left: var(--pq-space-4);
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--pq-radius-pill);
  background: var(--pq-color-info-soft);
  color: var(--pq-color-info);
  font-size: 17px;
  transform: translateY(-50%);
}

.pq-ui .pq-stat--with-icon[data-tone="success"] .pq-stat__icon {
  background: var(--pq-color-success-soft);
  color: var(--pq-color-success);
}

.pq-ui .pq-stat--with-icon[data-tone="warning"] .pq-stat__icon {
  background: var(--pq-color-warning-soft);
  color: var(--pq-color-warning);
}

.pq-ui .pq-stat--with-icon[data-tone="danger"] .pq-stat__icon {
  background: var(--pq-color-danger-soft);
  color: var(--pq-color-danger);
}

.pq-ui .pq-dashboard-summary-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, .9fr) minmax(280px, 1fr);
  gap: var(--pq-grid-gap, var(--pq-space-4));
}

.pq-ui .pq-dashboard-summary-grid--primary-wide {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .62fr);
}

.pq-ui .pq-dashboard-card {
  min-width: 0;
  padding: var(--pq-space-4);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface);
}

.pq-ui .pq-dashboard-card__header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--pq-space-3);
  margin-bottom: var(--pq-space-3);
}

.pq-ui .pq-dashboard-card__header h3 {
  margin: 0;
  color: var(--pq-color-heading);
  font-size: var(--pq-font-size-md);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.pq-ui .pq-dashboard-card__header p {
  margin: var(--pq-space-1) 0 0;
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-sm);
}

.pq-ui .pq-attention-list {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: var(--pq-space-2);
}

.pq-ui .pq-attention-list__item {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--pq-space-2);
  padding: var(--pq-space-2) var(--pq-space-3);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-attention-list__icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--pq-radius-pill);
  background: var(--pq-color-info-soft);
  color: var(--pq-color-info);
}

.pq-ui .pq-attention-list__item[data-tone="warning"] .pq-attention-list__icon {
  background: var(--pq-color-warning-soft);
  color: var(--pq-color-warning);
}

.pq-ui .pq-attention-list__item[data-tone="success"] .pq-attention-list__icon {
  background: var(--pq-color-success-soft);
  color: var(--pq-color-success);
}

.pq-ui .pq-attention-list__item[data-tone="danger"] .pq-attention-list__icon {
  background: var(--pq-color-danger-soft);
  color: var(--pq-color-danger);
}

.pq-ui .pq-attention-list__label {
  min-width: 0;
  color: var(--pq-color-text);
  font-size: var(--pq-font-size-sm);
}

.pq-ui .pq-attention-list__value {
  color: var(--pq-color-heading);
  font-size: var(--pq-font-size-md);
  font-weight: var(--pq-font-weight-bold);
  text-align: right;
}

.pq-ui .pq-table .pq-cell--empty {
  height: 96px;
  color: var(--pq-color-muted);
  text-align: center;
}

@media (max-width: 1199px) {
  .pq-ui .pq-dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pq-ui .pq-dashboard-summary-grid > :last-child {
    grid-column: 1 / -1;
  }

  .pq-ui .pq-dashboard-summary-grid--primary-wide {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  }

  .pq-ui .pq-dashboard-summary-grid--primary-wide > :last-child {
    grid-column: auto;
  }
}

@media (max-width: 899px) {
  .pq-ui .pq-dashboard-stats,
  .pq-ui .pq-dashboard-summary-grid,
  .pq-ui .pq-dashboard-summary-grid--primary-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .pq-ui .pq-dashboard-summary-grid > :last-child {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .pq-ui .pq-dashboard-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .pq-ui .pq-dashboard-context > span + span {
    padding-left: 0;
  }

  .pq-ui .pq-dashboard-context > span + span::before {
    content: none;
  }

  .pq-ui .pq-dashboard-card__header {
    flex-direction: column;
  }
}

.pq-ui .pq-step-card {
  position: relative;
  padding-left: 64px;
}

.pq-ui .pq-step-card__number {
  position: absolute;
  top: var(--pq-space-4);
  left: var(--pq-space-4);
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--pq-color-info-soft);
  color: var(--pq-color-info);
  font-weight: var(--pq-font-weight-bold);
}

.pq-ui .pq-step-card__header,
.pq-ui .pq-step-card__body,
.pq-ui .pq-step-card__actions {
  min-width: 0;
}

.pq-ui .pq-step-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--pq-space-2);
  margin-top: var(--pq-space-4);
}

.pq-ui .pq-step-card__title {
  margin: 0;
  color: var(--pq-color-heading);
  font-size: var(--pq-font-size-lg);
  font-weight: var(--pq-font-weight-bold);
  line-height: var(--pq-line-height-tight);
}

.pq-ui .pq-step-card__description {
  margin: var(--pq-space-1) 0 0;
  color: var(--pq-color-muted);
  line-height: var(--pq-line-height-normal);
}

/*
 * Description-list component. pq-detail-grid/pq-detail aliases are retained
 * temporarily for adopted evidence modals; new markup uses pq-description-*.
 */
.pq-ui .pq-description-list,
.pq-ui .pq-detail-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: var(--pq-space-3);
  margin: 0;
}

.pq-ui .pq-description-list__item,
.pq-ui .pq-detail {
  min-width: 0;
  padding: var(--pq-space-3);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-description-list__label,
.pq-ui .pq-detail__label {
  margin: 0;
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-xs);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .06em;
  line-height: var(--pq-line-height-tight);
  text-transform: uppercase;
}

.pq-ui .pq-description-list__value,
.pq-ui .pq-detail__value {
  margin: var(--pq-space-1) 0 0;
  color: var(--pq-color-heading);
  font-weight: var(--pq-font-weight-semibold);
  line-height: var(--pq-line-height-normal);
  overflow-wrap: anywhere;
}

.pq-ui .pq-description-list__item--wide {
  grid-column: 1 / -1;
}

/* Bootstrap-compatible modal shells */
/* Native-dialog adapter: browser supplies focus trapping, Escape and top layer. */
.pq-ui.pq-modal--native { width: calc(100% - 32px); max-width: 720px; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.pq-ui.pq-modal--native:not([open]) { display: none; }
.pq-ui.pq-modal--native::backdrop { background: rgba(36, 48, 65, .5); }
.pq-ui.pq-modal--native .pq-modal__dialog { margin: 0; }
.pq-ui.pq-modal--native .pq-modal__content { max-height: calc(100dvh - 32px); }
.pq-ui.pq-modal--native .pq-modal__title { margin: 0; font-size: var(--pq-font-size-lg); }
.pq-ui.pq-modal--native .pq-modal__header { position: relative; padding-right: 56px; }
.pq-ui.pq-modal--native .pq-modal__close { position: absolute; top: 12px; right: 12px; }
.pq-ui.pq-modal--native .pq-modal__footer { display: flex; justify-content: flex-end; gap: var(--pq-space-2); border-top: 1px solid var(--pq-color-border); }
.pq-ui.pq-modal,
.pq-ui .pq-modal {
  z-index: var(--pq-z-modal);
  color: var(--pq-color-text);
  font-family: var(--pq-font-family-sans);
  font-size: var(--pq-font-size-md);
  line-height: var(--pq-line-height-normal);
}

.pq-ui.pq-modal .modal-dialog,
.pq-ui .pq-modal .modal-dialog,
.pq-ui .pq-modal__dialog {
  width: auto;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.pq-ui.pq-modal--standard .modal-dialog,
.pq-ui .pq-modal--standard .modal-dialog,
.pq-ui .pq-modal--standard .pq-modal__dialog {
  max-width: 720px;
}

.pq-ui.pq-modal--confirm .modal-dialog,
.pq-ui .pq-modal--confirm .modal-dialog,
.pq-ui .pq-modal--confirm .pq-modal__dialog {
  max-width: 480px;
}

.pq-ui.pq-modal--wide .modal-dialog,
.pq-ui .pq-modal--wide .modal-dialog,
.pq-ui .pq-modal--wide .pq-modal__dialog {
  max-width: 1040px;
}

.pq-ui.pq-modal--full .modal-dialog,
.pq-ui .pq-modal--full .modal-dialog,
.pq-ui .pq-modal--full .pq-modal__dialog {
  width: calc(100% - 32px);
  max-width: 1440px;
}

.pq-ui.pq-modal .modal-content,
.pq-ui .pq-modal .modal-content,
.pq-ui .pq-modal__content {
  overflow: hidden;
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-lg);
  background: var(--pq-color-surface);
  box-shadow: var(--pq-shadow-modal);
}

.pq-ui.pq-modal .modal-header,
.pq-ui.pq-modal .modal-footer,
.pq-ui .pq-modal .modal-header,
.pq-ui .pq-modal .modal-footer,
.pq-ui .pq-modal__header,
.pq-ui .pq-modal__footer {
  padding: var(--pq-space-4) var(--pq-space-5);
  border-color: var(--pq-color-border);
}

.pq-ui.pq-modal .modal-body,
.pq-ui .pq-modal .modal-body,
.pq-ui .pq-modal__body {
  max-height: calc(100vh - 210px);
  padding: var(--pq-space-5);
  overflow-y: auto;
  background: var(--pq-color-surface);
}

.pq-ui.pq-modal .modal-title,
.pq-ui .pq-modal .modal-title,
.pq-ui .pq-modal__title {
  color: var(--pq-color-heading);
  font-weight: 700;
}

.pq-ui.pq-modal .pq-modal__description,
.pq-ui .pq-modal .pq-modal__description,
.pq-ui .pq-modal__description {
  margin: 6px 0 0;
  color: var(--pq-color-muted);
  font-size: 14px;
  line-height: 1.45;
}

.pq-ui .pq-modal__figure {
  margin: 0;
}

.pq-ui .pq-modal__image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.pq-ui .pq-modal__caption {
  margin-top: var(--pq-space-3);
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-sm);
  line-height: var(--pq-line-height-normal);
  text-align: center;
}

/* Standard form modal: fixed header/footer, scrollable body, responsive form grid. */
.pq-ui.pq-modal--form .pq-modal__dialog,
.pq-ui .pq-modal--form .pq-modal__dialog {
  width: calc(100% - 32px);
  margin: 20px auto;
}

.pq-ui.pq-modal--form .pq-modal__content,
.pq-ui .pq-modal--form .pq-modal__content {
  display: flex;
  max-height: calc(100vh - 40px);
  flex-direction: column;
}

.pq-ui.pq-modal--form .pq-modal__header,
.pq-ui.pq-modal--form .pq-modal__footer,
.pq-ui .pq-modal--form .pq-modal__header,
.pq-ui .pq-modal--form .pq-modal__footer {
  position: relative;
  flex: 0 0 auto;
}

.pq-ui.pq-modal--form .pq-modal__header,
.pq-ui .pq-modal--form .pq-modal__header {
  padding-right: 56px;
  background: var(--pq-color-surface);
  color: var(--pq-color-text);
}

.pq-ui.pq-modal--form .pq-modal__title,
.pq-ui .pq-modal--form .pq-modal__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.pq-ui.pq-modal--form .pq-modal__close,
.pq-ui .pq-modal--form .pq-modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  margin: 0;
  color: var(--pq-color-heading);
  font-size: 21px;
  line-height: 1;
}

.pq-ui.pq-modal--form .pq-modal__body,
.pq-ui .pq-modal--form .pq-modal__body {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.pq-ui.pq-modal--form .pq-modal__footer,
.pq-ui .pq-modal--form .pq-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pq-space-2);
  background: var(--pq-color-surface);
}

.pq-ui.pq-modal--form[aria-busy="true"] .pq-modal__body,
.pq-ui .pq-modal--form[aria-busy="true"] .pq-modal__body {
  cursor: progress;
}

.pq-ui .pq-form {
  position: relative;
}

/* Opt-in touch density leaves compact administrative forms unchanged. */
.pq-ui .pq-form--touch {
  --pq-control-height: 48px;
  --pq-font-size-md: 16px;
}

.pq-ui .pq-control.pq-control--plate {
  height: var(--pq-control-height-xl);
  min-height: var(--pq-control-height-xl);
  color: var(--pq-color-heading);
  font-size: var(--pq-font-size-xl);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .04em;
}

.pq-ui .pq-control--plate + * > .pq-btn {
  width: 52px;
  height: var(--pq-control-height-xl);
  min-height: var(--pq-control-height-xl);
  padding: 0;
  font-size: 18px;
}

.pq-ui .pq-modal__close--touch {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--pq-radius-sm);
  background: transparent;
  cursor: pointer;
}

.pq-ui .pq-modal__close--touch:hover,
.pq-ui .pq-modal__close--touch:focus-visible {
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--pq-space-4);
}

.pq-ui .pq-form-grid > .pq-field {
  grid-column: 1 / -1;
}

.pq-ui .pq-form-grid > .pq-form-grid__span-3 {
  grid-column: span 3;
}

.pq-ui .pq-form-grid > .pq-form-grid__span-4 {
  grid-column: span 4;
}

.pq-ui .pq-form-grid > .pq-form-grid__span-6 {
  grid-column: span 6;
}

.pq-ui .pq-form-grid > .pq-form-grid__span-8 {
  grid-column: span 8;
}

.pq-ui .pq-form-grid > .pq-form-grid__span-12 {
  grid-column: 1 / -1;
}

.pq-ui .pq-form .pq-field,
.pq-ui .pq-form .form-group {
  margin-bottom: var(--pq-space-4);
}

.pq-ui .pq-form .pq-field--flush {
  margin-bottom: 0;
}

.pq-ui .pq-form .bootstrap-select {
  width: 100% !important;
}

.pq-ui .pq-form .bootstrap-select > .dropdown-toggle {
  min-height: var(--pq-control-height);
  border-color: var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface);
  box-shadow: inset 0 1px 2px rgba(36, 48, 65, .04);
  color: var(--pq-color-text);
}

.pq-ui .pq-form .bootstrap-select.open > .dropdown-toggle,
.pq-ui .pq-form .bootstrap-select > .dropdown-toggle:focus {
  border-color: var(--pq-color-info);
  outline: 0 !important;
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-form-section {
  min-width: 0;
  margin: var(--pq-space-2) 0 var(--pq-space-4);
  padding: var(--pq-space-4) var(--pq-space-4) 0;
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
}

.pq-ui.pq-checkout {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  max-width: 960px;
  margin-inline: auto;
  padding: var(--pq-space-5);
}

.pq-ui .pq-btn[hidden] {
  display: none;
}

.pq-ui .pq-form-section--padded {
  padding-bottom: var(--pq-space-4);
}

.pq-ui .pq-form-section legend {
  width: auto;
  margin: 0;
  padding: 0 7px;
  border: 0;
  color: var(--pq-color-heading);
  font-size: 13px;
  font-weight: 700;
}

.pq-ui .pq-help-text,
.pq-ui .pq-field__help,
.pq-ui .pq-field-help { /* Deprecated alias: use pq-field__help. */
  margin: 6px 0 0;
  color: var(--pq-color-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

/* Stacked settings sections use the parent stack for separation and retain
 * an equal inset beneath fields, switches, and other final-row controls. */
.pq-ui .pq-form-section--stacked {
  margin: 0;
  padding-bottom: var(--pq-space-4);
}

.pq-ui .pq-form-section--stacked > .pq-help-text {
  margin: 0 0 var(--pq-space-4);
}

.pq-ui .pq-form-section--stacked > .pq-form-grid {
  row-gap: var(--pq-space-4);
}

.pq-ui .pq-form-section--stacked > .pq-form-grid > .pq-field {
  margin-bottom: 0;
}

.pq-ui .pq-field__required {
  color: var(--pq-color-danger);
  font-weight: var(--pq-font-weight-bold);
}

.pq-ui .pq-field__error {
  margin: 6px 0 0;
  color: var(--pq-color-danger);
  font-size: var(--pq-font-size-sm);
  font-weight: var(--pq-font-weight-semibold);
  line-height: var(--pq-line-height-normal);
}

.pq-ui .pq-field__error[hidden] {
  display: none !important;
}

.pq-ui .pq-validation-summary {
  margin: 0 0 var(--pq-space-4);
  padding: var(--pq-space-3) var(--pq-space-4);
  border: 1px solid var(--pq-color-danger);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-danger-soft);
  color: var(--pq-color-danger);
}

.pq-ui .pq-check {
  display: inline-flex;
  min-width: 0;
  align-items: flex-start;
  gap: var(--pq-space-2);
  color: var(--pq-color-text);
  cursor: pointer;
}

.pq-ui .pq-check > input {
  flex: 0 0 auto;
  margin-top: 3px;
}

.pq-ui .pq-check > input:focus-visible {
  outline: 2px solid var(--pq-color-info);
  outline-offset: 2px;
}

.pq-ui .pq-check--disabled {
  color: var(--pq-color-disabled);
  cursor: not-allowed;
}

.pq-ui .pq-input-affix .input-group-addon,
.pq-ui .pq-input-affix__addon {
  border-color: var(--pq-color-border);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-muted);
  font-weight: 700;
}

/* Password input with an inline, keyboard-accessible visibility control. */
.pq-ui .pq-password {
  position: relative;
}

.pq-ui .pq-password > .pq-control {
  padding-right: 48px;
}

.pq-ui .pq-password__toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  bottom: 2px;
  width: 42px;
  min-height: 0;
  padding: 0;
}

.pq-ui .pq-form__loading {
  position: absolute;
  z-index: 10;
  inset: 0;
}

.pq-ui .pq-form__loading > .background {
  display: flex;
  height: 100%;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  border-radius: var(--pq-radius-md);
  background: rgba(255, 255, 255, .86);
}

@media (max-width: 767px) {
  /* One outer gutter for compact, top-aligned native modals; no nested inset. */
  .pq-ui.pq-modal--native.pq-modal--edge-aligned {
    width: calc(100% - 32px);
    margin: 16px auto auto;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }
  .pq-ui.pq-modal--native.pq-modal--edge-aligned .pq-modal__dialog {
    width: 100%;
    margin: 0;
  }
  .pq-ui.pq-modal--native.pq-modal--edge-aligned .pq-modal__content {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .pq-ui.pq-modal--form .pq-modal__dialog,
  .pq-ui .pq-modal--form .pq-modal__dialog {
    width: calc(100% - 20px);
    margin: 10px auto;
  }

  .pq-ui.pq-modal--form .pq-modal__content,
  .pq-ui .pq-modal--form .pq-modal__content {
    max-height: calc(100vh - 20px);
  }

  .pq-ui.pq-modal--form .pq-modal__header,
  .pq-ui.pq-modal--form .pq-modal__body,
  .pq-ui.pq-modal--form .pq-modal__footer,
  .pq-ui .pq-modal--form .pq-modal__header,
  .pq-ui .pq-modal--form .pq-modal__body,
  .pq-ui .pq-modal--form .pq-modal__footer {
    padding: var(--pq-space-4);
  }

  .pq-ui.pq-modal--form .pq-modal__header,
  .pq-ui .pq-modal--form .pq-modal__header {
    padding-right: 48px;
  }

  .pq-ui.pq-modal--form .pq-modal__close,
  .pq-ui .pq-modal--form .pq-modal__close {
    top: 12px;
    right: 14px;
  }

  .pq-ui .pq-form-grid > .pq-form-grid__span-3,
  .pq-ui .pq-form-grid > .pq-form-grid__span-4,
  .pq-ui .pq-form-grid > .pq-form-grid__span-6,
  .pq-ui .pq-form-grid > .pq-form-grid__span-8,
  .pq-ui .pq-form-grid > .pq-form-grid__span-12 {
    grid-column: 1 / -1;
  }

  /* Keep only short, explicitly opted-in fields paired on narrow screens. */
  .pq-ui .pq-form-grid > .pq-form-grid__span-mobile-6 {
    grid-column: span 6;
  }
}

.pq-ui .pq-check--card {
  margin: 0;
  padding: var(--pq-space-3);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface);
}

@media (max-width: 600px) {
  .pq-ui .pq-setting-card__content {
    padding-left: 0;
  }

  .pq-ui.pq-modal--form .pq-modal__footer > .pq-btn,
  .pq-ui .pq-modal--form .pq-modal__footer > .pq-btn {
    min-width: 0;
    flex: 1 1 140px;
  }
}

.pq-ui.pq-modal--evidence .modal-content,
.pq-ui .pq-modal--evidence .modal-content,
.pq-ui .pq-modal--evidence .pq-modal__content {
  border-color: #4a5e62;
}

.pq-ui.pq-modal--evidence .modal-header,
.pq-ui .pq-modal--evidence .modal-header,
.pq-ui .pq-modal--evidence .pq-modal__header {
  border-bottom: 0;
  background: var(--pq-color-evidence-header);
  color: var(--pq-color-evidence-title);
}

.pq-ui.pq-modal--evidence .modal-title,
.pq-ui .pq-modal--evidence .modal-title,
.pq-ui .pq-modal--evidence .pq-modal__title,
.pq-ui.pq-modal--evidence .modal-header .close,
.pq-ui .pq-modal--evidence .modal-header .close {
  color: var(--pq-color-evidence-title);
}

.pq-ui.pq-modal--evidence .pq-modal__description,
.pq-ui .pq-modal--evidence .pq-modal__description {
  color: rgba(229, 246, 255, 0.82);
}

.pq-ui.pq-modal--evidence .modal-footer,
.pq-ui .pq-modal--evidence .modal-footer,
.pq-ui .pq-modal--evidence .pq-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--pq-space-2);
  border-top-color: #d2d2d2;
  background: #e5e5e5;
}

.pq-ui .pq-modal__status {
  min-width: 0;
  flex: 1 1 260px;
  margin-right: auto;
  text-align: left;
}

.pq-ui .pq-modal__footer > .pq-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.pq-ui .pq-data-table__status {
  margin-bottom: var(--pq-space-4);
}

/* Reusable evidence and audit presentation. */
.pq-ui .pq-text--muted {
  color: var(--pq-color-muted);
}

.pq-ui .pq-table-shell--viewport {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.pq-ui .pq-table--wide {
  min-width: 1240px;
}

.pq-ui .pq-table--fit {
  min-width: 0;
  table-layout: fixed;
}

.pq-ui .pq-table--fit th {
  overflow-wrap: anywhere;
  white-space: normal;
}

.pq-ui .pq-table--fit td {
  overflow-wrap: anywhere;
}

.pq-ui .pq-table--fit .pq-table__cell--actions {
  white-space: normal;
}

.pq-ui .pq-table--fit .pq-table__cell--actions .pq-actions,
.pq-ui .pq-table--fit .pq-table__cell--actions .pq-table__actions {
  flex-wrap: wrap;
}

.pq-ui .pq-table--sticky-header thead th {
  position: sticky;
  z-index: var(--pq-z-sticky);
  top: 0;
}

.pq-ui .pq-disclosure {
  min-width: 0;
}

/* Touch-friendly record cards, grouped disclosures and compact portal navigation. */
.pq-ui .pq-pass-card { overflow: hidden; }
.pq-ui .pq-pass-card__header {
  --pq-pass-card-header-inset: var(--pq-space-5);
  align-items: center;
  flex-wrap: wrap;
  margin: calc(0px - var(--pq-pass-card-header-inset)) calc(0px - var(--pq-pass-card-header-inset)) 0;
  padding: var(--pq-space-4) var(--pq-pass-card-header-inset);
  border-top: 4px solid var(--pq-color-border-strong);
  color: var(--pq-color-heading);
}
.pq-ui .pq-pass-card__header--resident { background: var(--pq-color-page); }
.pq-ui .pq-pass-card__header--guest { background: var(--pq-color-brand-soft); border-top-color: var(--pq-color-brand); }
.pq-ui .pq-pass-card__type { min-width: 0; flex-wrap: nowrap; overflow-wrap: anywhere; }
.pq-ui .pq-pass-card__header--guest .pq-icon { color: var(--pq-color-brand-strong); }
.pq-ui .pq-pass-card__header > .pq-badge { flex-shrink: 0; }
.pq-ui .pq-icon--line { width: 20px; height: 20px; vertical-align: middle; }
.pq-ui .pq-btn--lg { min-height: 48px; font-size: var(--pq-font-size-md); }
.pq-ui .pq-section-label { margin: 0 0 var(--pq-space-3); color: var(--pq-color-muted); font-size: var(--pq-font-size-sm); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pq-ui .pq-pass-card__location { display: flex; align-items: center; gap: var(--pq-space-2); margin: var(--pq-space-5) 0 var(--pq-space-3); color: var(--pq-color-muted); overflow-wrap: anywhere; }
.pq-ui .pq-pass-card__plate { margin: 0; color: var(--pq-color-heading); font-size: clamp(30px, 4vw, 40px); line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.pq-ui .pq-pass-card__state { font-size: var(--pq-font-size-lg); font-weight: 400; }
.pq-ui .pq-pass-card__vehicle { margin: var(--pq-space-2) 0 var(--pq-space-6); color: var(--pq-color-text); font-size: var(--pq-font-size-lg); overflow-wrap: anywhere; }
.pq-ui .pq-pass-card__validity { display: flex; gap: var(--pq-space-3); align-items: center; margin: 0; padding: var(--pq-space-5) 0; border-top: 1px solid var(--pq-color-border); }
.pq-ui .pq-disclosure-group { width: 100%; min-width: 0; border: 1px solid var(--pq-color-border); border-radius: var(--pq-radius-lg); background: var(--pq-color-surface); box-shadow: var(--pq-shadow-panel); overflow: hidden; }
.pq-ui .pq-disclosure-group > .pq-disclosure + .pq-disclosure { border-top: 1px solid var(--pq-color-border); }
.pq-ui .pq-disclosure--row > .pq-disclosure__summary { display: flex; align-items: center; gap: var(--pq-space-3); min-height: 56px; padding: var(--pq-space-4) var(--pq-space-5); color: var(--pq-color-text); font-weight: 500; list-style: none; }
.pq-ui .pq-disclosure--row > .pq-disclosure__summary::-webkit-details-marker { display: none; }
.pq-ui .pq-disclosure--row > .pq-disclosure__summary::after { content: ''; width: 8px; height: 8px; flex-shrink: 0; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.pq-ui .pq-disclosure--row[open] > .pq-disclosure__summary::after { transform: rotate(225deg); }
.pq-ui .pq-disclosure--row > .pq-disclosure__summary:hover { background: var(--pq-color-surface-muted); }
.pq-ui .pq-disclosure--row > .pq-disclosure__summary:focus-visible { outline: 2px solid var(--pq-color-info); outline-offset: -3px; }
.pq-ui .pq-disclosure__body { padding: 0 var(--pq-space-5) var(--pq-space-5); }
.pq-ui .pq-disclosure__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pq-ui .pq-disclosure__value { flex-shrink: 0; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.pq-ui .pq-pass-card__details { margin: 0 calc(0px - var(--pq-space-5)) calc(0px - var(--pq-space-5)); border-top: 1px solid var(--pq-color-border); }
.pq-ui .pq-bottom-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pq-space-2); padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--pq-color-border); background: var(--pq-color-surface); }
.pq-ui .pq-bottom-nav--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pq-ui .pq-bottom-nav--mobile-fixed { display: none; }
.pq-ui .pq-bottom-nav__link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 58px; border-radius: var(--pq-radius-md); color: var(--pq-color-muted); font-size: var(--pq-font-size-sm); text-decoration: none; }
.pq-ui .pq-bottom-nav__link[aria-current="page"] { color: var(--pq-color-info); background: var(--pq-color-selected); font-weight: 600; }
.pq-ui .pq-bottom-nav__link:focus-visible { outline: 2px solid var(--pq-color-info); }

@media (max-width: 640px) {
  .pq-ui.pq-page--with-bottom-nav {
    padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  }

  .pq-ui .pq-bottom-nav--mobile-fixed {
    position: fixed;
    z-index: var(--pq-z-sticky);
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    box-shadow: 0 -8px 24px rgba(36, 48, 65, .12);
  }
}

.pq-ui .pq-disclosure--preview {
  min-width: 220px;
  max-width: 360px;
}

.pq-ui .pq-disclosure__summary {
  color: var(--pq-color-info);
  font-weight: var(--pq-font-weight-bold);
  cursor: pointer;
}

.pq-ui .pq-code-block {
  max-height: 220px;
  margin: var(--pq-space-2) 0 0;
  padding: var(--pq-space-3);
  overflow: auto;
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-text);
  font: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.pq-ui .pq-data-table__footer.pq-data-table__footer--embedded {
  margin: 0;
  border-radius: 0 0 var(--pq-radius-lg) var(--pq-radius-lg);
  background: #f5f8fa;
}

.pq-ui .pq-data-table__footer-controls--actions {
  width: 100%;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
}

.pq-ui .pq-data-table__footer-actions {
  grid-column: 3;
  justify-self: end;
}

@media (max-width: 767px) {
  .pq-ui.pq-modal--full .modal-dialog,
  .pq-ui .pq-modal--full .modal-dialog,
  .pq-ui .pq-modal--full .pq-modal__dialog {
    width: auto;
  }

  .pq-ui .pq-table-shell--viewport {
    max-height: calc(100vh - 420px);
  }

  .pq-ui .pq-data-table__footer-controls--actions {
    grid-template-columns: 1fr;
  }

  .pq-ui .pq-data-table__footer-actions {
    width: 100%;
    grid-column: 1;
    justify-content: flex-end;
    justify-self: stretch;
  }
}

/* Server-backed data-table composition */
.pq-ui .pq-data-table {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.pq-ui .pq-data-table--split {
  overflow: visible;
}

.pq-ui .pq-data-table--split > .pq-data-table__filters {
  margin-bottom: 0;
}

.pq-ui .pq-data-table--split > .pq-panel {
  width: 100%;
  min-width: 0;
}

.pq-ui .pq-data-table[aria-busy="true"] {
  cursor: progress;
}

.pq-ui .pq-data-table[aria-busy="true"] .pq-data-table__table {
  opacity: .62;
}

.pq-ui .pq-data-table__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--pq-space-3);
  margin-bottom: var(--pq-space-4);
}

.pq-ui .pq-data-table__heading {
  min-width: 0;
}

.pq-ui .pq-data-table__title {
  margin: 0;
  color: var(--pq-color-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.pq-ui .pq-data-table__description {
  margin: var(--pq-space-1) 0 0;
  color: var(--pq-color-muted);
  line-height: 1.4;
}

.pq-ui .pq-data-table__count {
  flex: 0 0 auto;
}

.pq-ui .pq-data-table__filters {
  margin-bottom: var(--pq-space-4);
}

.pq-ui .pq-data-table__filters:empty {
  display: none;
}

.pq-ui .pq-data-table__filters .pq-filter-toolbar__actions {
  grid-column: auto;
  align-self: end;
}

.pq-ui .pq-data-table__filters .pq-filter-toolbar__actions--start {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.pq-ui .pq-data-table__body {
  width: 100%;
  min-width: 0;
}

.pq-ui .pq-data-table__shell {
  width: 100%;
  min-width: 0;
  padding: 0;
}

.pq-ui .pq-data-table__footer {
  margin: var(--pq-space-4) calc(0px - var(--pq-space-5)) calc(0px - var(--pq-space-5));
  padding: var(--pq-space-4) var(--pq-space-5);
  border-top: 1px solid var(--pq-color-border);
  border-radius: 0 0 var(--pq-radius-lg) var(--pq-radius-lg);
  background: #f5f8fa;
}

.pq-ui .pq-data-table__footer[hidden] {
  display: none !important;
}

.pq-ui .pq-data-table__footer-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: end;
  gap: var(--pq-space-4);
}

.pq-ui .pq-data-table__page-size {
  display: flex;
  grid-column: 1;
  align-items: flex-end;
  gap: var(--pq-space-2);
  justify-self: start;
}

.pq-ui .pq-data-table__page-size .pq-field-label {
  margin: 0 0 12px;
  white-space: nowrap;
}

.pq-ui .pq-data-table__page-size .pq-control,
.pq-ui .pq-data-table__page-size .form-control {
  width: 88px;
}

.pq-ui .pq-data-table__pagination {
  grid-column: 2;
  justify-self: center;
  max-width: 100%;
}

.pq-ui .pq-pagination {
  display: flex;
  max-width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
}

.pq-ui .pq-pagination__item {
  flex: 0 0 auto;
}

.pq-ui .pq-pagination__item + .pq-pagination__item {
  margin-left: -1px;
}

.pq-ui .pq-pagination__button,
.pq-ui .pq-pagination__ellipsis {
  display: inline-flex;
  min-width: 40px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--pq-color-border);
  background: var(--pq-color-surface);
  color: var(--pq-color-text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
}

.pq-ui .pq-pagination__item:first-child .pq-pagination__button {
  border-radius: var(--pq-radius-sm) 0 0 var(--pq-radius-sm);
}

.pq-ui .pq-pagination__item:last-child .pq-pagination__button {
  border-radius: 0 var(--pq-radius-sm) var(--pq-radius-sm) 0;
}

.pq-ui .pq-pagination__button {
  cursor: pointer;
}

.pq-ui .pq-pagination__button:hover,
.pq-ui .pq-pagination__button:focus {
  position: relative;
  z-index: 1;
  border-color: var(--pq-color-info);
  outline: 0;
  color: var(--pq-color-info);
}

.pq-ui .pq-pagination__button:focus {
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-pagination__button[aria-current="page"],
.pq-ui .pq-pagination__item.is-active .pq-pagination__button { /* Deprecated state alias. */
  position: relative;
  z-index: 2;
  border-color: var(--pq-color-info);
  background: var(--pq-color-info);
  color: #fff;
}

.pq-ui .pq-pagination__item.is-disabled .pq-pagination__button,
.pq-ui .pq-pagination__button[disabled] {
  background: var(--pq-color-surface-muted);
  color: #9aabba;
  cursor: not-allowed;
}

.pq-ui .pq-pagination__ellipsis {
  color: var(--pq-color-muted);
}

.pq-ui .pq-data-table__summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--pq-space-2);
  margin-top: var(--pq-space-3);
}

.pq-ui .pq-data-table__page-label {
  display: inline-flex;
  min-width: 76px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #7d7f82;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.pq-ui .pq-data-table__range {
  color: #526c87;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

/* Semantic pager and search-field adapters for table implementations. */
.pq-ui .pq-data-table__pagination .footable-pagination-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.pq-ui .pq-data-table__pagination .pagination {
  margin: 0;
}

.pq-ui .pq-field--search {
  max-width: 440px;
}

.pq-ui .pq-field--search .pq-field-label {
  display: block;
  margin-bottom: var(--pq-space-1);
}

@media (max-width: 767px) {
  .pq-ui .pq-data-table__header,
  .pq-ui .pq-data-table__header .pq-panel__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pq-ui .pq-data-table__footer-controls {
    grid-template-columns: 1fr;
  }

  .pq-ui .pq-data-table__page-size,
  .pq-ui .pq-data-table__pagination {
    grid-column: 1;
    justify-self: center;
  }
}

/* Tables, expandable rows, and row actions */
/* pq-table-wrap, pq-cell--numeric, and pq-table__numeric are legacy aliases. */
.pq-ui .pq-table-wrap,
.pq-ui .pq-table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface);
}

.pq-ui .pq-table-shell--borderless {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pq-ui .pq-table-shell:focus,
.pq-ui .pq-table-shell:focus-visible {
  outline: 0;
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-table {
  width: 100%;
  min-width: 100%;
  margin: 0;
  border-collapse: collapse;
  color: var(--pq-color-text);
}

.pq-ui .pq-table th,
.pq-ui .pq-table td {
  /* Preserve native cells against legacy grid selectors matching "cell-". */
  display: table-cell;
  height: var(--pq-table-row-height);
  padding: var(--pq-table-cell-padding-block) var(--pq-table-cell-padding-inline);
  border-bottom: 1px solid var(--pq-color-row-divider);
  vertical-align: middle;
  text-align: left;
}

.pq-ui .pq-table--fixed { table-layout: fixed; }
.pq-ui .pq-table--fixed th[scope="row"] { overflow-wrap: anywhere; }

.pq-ui .pq-table th {
  height: var(--pq-table-header-height);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-muted);
  font-size: var(--pq-font-size-xs);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: .06em;
  line-height: var(--pq-line-height-tight);
  text-transform: uppercase;
  white-space: nowrap;
}

.pq-ui .pq-table th[scope="row"] {
  height: var(--pq-table-row-height);
  background: inherit;
  color: var(--pq-color-text);
  font-size: var(--pq-font-size-md);
  font-weight: var(--pq-font-weight-semibold);
  letter-spacing: normal;
  line-height: var(--pq-line-height-normal);
  text-transform: none;
  white-space: normal;
}

/* Grouped records keep the shared identity aligned with the first member. */
.pq-ui .pq-table--top > tbody > tr > th,
.pq-ui .pq-table--top > tbody > tr > td {
  vertical-align: top;
}

.pq-ui .pq-table > tbody > .pq-table__row--group-start > th,
.pq-ui .pq-table > tbody > .pq-table__row--group-start > td {
  border-top: 2px solid var(--pq-color-border-strong);
}

.pq-ui .pq-table > tbody > tr > .pq-table__cell--group {
  border-right: 1px solid var(--pq-color-border);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-text);
  font-size: var(--pq-font-size-sm);
  font-weight: var(--pq-font-weight-regular);
  letter-spacing: normal;
  text-transform: none;
}

.pq-ui .pq-table--compact th,
.pq-ui .pq-table--compact td {
  height: var(--pq-control-height-sm);
  padding: var(--pq-table-cell-padding-block-compact) var(--pq-table-cell-padding-inline-compact);
}

.pq-ui .pq-table--striped tbody tr:nth-child(odd) td {
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-table tbody tr:last-child td {
  border-bottom: 0;
}

.pq-ui .pq-table tbody tr:hover td {
  background: var(--pq-color-hover);
}

.pq-ui .pq-table tbody tr[aria-selected="true"] td {
  background: var(--pq-color-selected);
}

.pq-ui .pq-table tfoot th,
.pq-ui .pq-table tfoot td {
  border-top: 1px solid var(--pq-color-border);
  border-bottom: 0;
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-heading);
  font-size: var(--pq-font-size-sm);
  font-weight: var(--pq-font-weight-bold);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.pq-ui .pq-table .pq-cell--numeric,
.pq-ui .pq-table .pq-table__numeric,
.pq-ui .pq-table .pq-table__cell--numeric,
.pq-ui .pq-table th[data-align="right"],
.pq-ui .pq-table td[data-align="right"] {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.pq-ui .pq-table__cell--primary {
  color: var(--pq-color-heading);
  font-weight: var(--pq-font-weight-semibold);
}

.pq-ui .pq-table__cell--muted,
.pq-ui .pq-table__empty-value {
  color: var(--pq-color-muted);
}

.pq-ui .pq-table__cell--nowrap,
.pq-ui .pq-table__cell--actions {
  white-space: nowrap;
}

.pq-ui .pq-table__cell--actions {
  width: var(--pq-table-column-actions);
  min-width: var(--pq-table-column-actions);
}

.pq-ui .pq-table__column--xs { width: var(--pq-table-column-xs); }
.pq-ui .pq-table__column--sm,
.pq-ui .pq-table__column--status { width: var(--pq-table-column-sm); }
.pq-ui .pq-table__column--md,
.pq-ui .pq-table__column--date { width: var(--pq-table-column-md); }
.pq-ui .pq-table__column--lg { width: var(--pq-table-column-lg); }
.pq-ui .pq-table__column--actions { width: var(--pq-table-column-actions); }

.pq-ui .pq-table__sort {
  display: inline-flex;
  width: 100%;
  min-height: var(--pq-hit-target);
  align-items: center;
  justify-content: space-between;
  gap: var(--pq-space-2);
  margin: calc(0px - var(--pq-table-cell-padding-block)) calc(0px - var(--pq-table-cell-padding-inline));
  padding: var(--pq-table-cell-padding-block) var(--pq-table-cell-padding-inline);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.pq-ui .pq-table__sort:hover {
  color: var(--pq-color-heading);
}

.pq-ui .pq-table__sort:focus,
.pq-ui .pq-table__sort:focus-visible {
  outline: 0;
  box-shadow: inset var(--pq-focus-ring);
}

.pq-ui .pq-table th[aria-sort="ascending"],
.pq-ui .pq-table th[aria-sort="descending"] {
  color: var(--pq-color-heading);
}

.pq-ui .pq-table__empty {
  height: 128px;
  color: var(--pq-color-muted);
  text-align: center;
}

.pq-ui .pq-table .footable-detail-row > td,
.pq-ui .pq-table__details {
  padding: var(--pq-space-4);
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-table .footable-toggle,
.pq-ui .pq-table__toggle {
  margin-right: var(--pq-space-2);
  color: var(--pq-color-info);
}

.pq-ui .pq-actions,
.pq-ui .pq-table__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.pq-ui .pq-actions.pq-actions--nowrap {
  flex-wrap: nowrap;
  flex-direction: row;
  align-items: center;
}

.pq-ui .pq-actions.pq-actions--nowrap .pq-btn--icon {
  width: var(--pq-hit-target);
}

.pq-ui .pq-table__cell--actions .pq-actions,
.pq-ui .pq-table__cell--actions .pq-table__actions {
  flex-wrap: nowrap;
}

.pq-ui .pq-actions .pq-action,
.pq-ui .pq-actions .pq-btn,
.pq-ui .pq-table__actions .pq-action,
.pq-ui .pq-table__actions .pq-btn {
  margin: 0;
}

/*
 * Opt-in vendor adapters. A vendor class is never sufficient by itself: the
 * owning component must also carry the matching semantic pq-* class.
 */
.pq-ui .pq-table--datatable.dataTable,
.pq-ui .pq-data-table__table.dataTable {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.pq-ui .pq-table--datatable.dataTable th,
.pq-ui .pq-table--datatable.dataTable td,
.pq-ui .pq-data-table__table.dataTable th,
.pq-ui .pq-data-table__table.dataTable td {
  height: var(--pq-table-row-height);
  padding: var(--pq-table-cell-padding-block) var(--pq-table-cell-padding-inline);
}

.pq-ui .pq-table--datatable.dataTable thead th,
.pq-ui .pq-data-table__table.dataTable thead th {
  height: var(--pq-table-header-height);
  background: var(--pq-color-surface-muted);
}

.pq-ui .pq-data-table .dataTables_wrapper {
  width: 100%;
  min-width: 0;
}

.pq-ui .pq-data-table .dataTables_processing {
  position: absolute;
  z-index: var(--pq-z-sticky);
  top: 50%;
  left: 50%;
  width: auto;
  min-width: 180px;
  margin: 0;
  padding: var(--pq-space-3) var(--pq-space-4);
  transform: translate(-50%, -50%);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface);
  box-shadow: var(--pq-shadow-panel);
  color: var(--pq-color-text);
  text-align: center;
}

.pq-ui .pq-table--footable .footable-filtering form,
.pq-ui .pq-table--footable .footable-filtering .form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--pq-space-2);
  margin: 0;
}

.pq-ui .pq-table--footable .footable-filtering .form-group {
  margin: 0;
}

.pq-ui .pq-table--footable .footable-filtering .form-control {
  min-height: var(--pq-control-height);
  border-color: var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  box-shadow: none;
}

.pq-ui .pq-control--select2 + .select2-container,
.pq-ui .pq-field--select2 .select2-container {
  width: 100% !important;
  min-width: 0;
}

.pq-ui .pq-control--select2 + .select2-container .select2-selection--single,
.pq-ui .pq-field--select2 .select2-container .select2-selection--single {
  min-height: var(--pq-control-height);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface);
  box-shadow: inset 0 1px 2px rgba(36, 48, 65, .04);
}

.pq-ui .pq-control--select2 + .select2-container .select2-selection__rendered,
.pq-ui .pq-field--select2 .select2-container .select2-selection__rendered {
  padding: 9px 36px 8px var(--pq-control-padding-inline);
  color: var(--pq-color-text);
  line-height: var(--pq-line-height-normal);
}

.pq-ui .pq-control--select2 + .select2-container .select2-selection__arrow,
.pq-ui .pq-field--select2 .select2-container .select2-selection__arrow {
  height: calc(var(--pq-control-height) - 2px);
}

.pq-ui .pq-control--select2 + .select2-container--focus .select2-selection--single,
.pq-ui .pq-control--select2 + .select2-container--open .select2-selection--single,
.pq-ui .pq-field--select2 .select2-container--focus .select2-selection--single,
.pq-ui .pq-field--select2 .select2-container--open .select2-selection--single {
  border-color: var(--pq-color-info);
  outline: 0;
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-control--select2 + .select2-container--disabled .select2-selection--single,
.pq-ui .pq-field--select2 .select2-container--disabled .select2-selection--single {
  border-color: var(--pq-color-border);
  background: var(--pq-color-disabled-surface);
  color: var(--pq-color-disabled);
  cursor: not-allowed;
}

.pq-ui .pq-field--bootstrap-select .bootstrap-select,
.pq-ui .bootstrap-select.pq-control--bootstrap-select {
  width: 100% !important;
}

.pq-ui .pq-field--bootstrap-select .bootstrap-select > .dropdown-toggle,
.pq-ui .bootstrap-select.pq-control--bootstrap-select > .dropdown-toggle {
  min-height: var(--pq-control-height);
  border-color: var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface);
  color: var(--pq-color-text);
}

.pq-ui .pq-field--bootstrap-select .bootstrap-select.open > .dropdown-toggle,
.pq-ui .pq-field--bootstrap-select .bootstrap-select > .dropdown-toggle:focus,
.pq-ui .bootstrap-select.pq-control--bootstrap-select.open > .dropdown-toggle,
.pq-ui .bootstrap-select.pq-control--bootstrap-select > .dropdown-toggle:focus {
  border-color: var(--pq-color-info);
  outline: 0 !important;
  box-shadow: var(--pq-focus-ring);
}

.pq-ui .pq-field--bootstrap-select .bootstrap-select.disabled > .dropdown-toggle,
.pq-ui .bootstrap-select.pq-control--bootstrap-select.disabled > .dropdown-toggle {
  border-color: var(--pq-color-border);
  background: var(--pq-color-disabled-surface);
  color: var(--pq-color-disabled);
  cursor: not-allowed;
}

.pq-ui .pq-switch--switchery .switchery {
  flex: 0 0 auto;
  border-color: var(--pq-color-border-strong) !important;
  box-shadow: none !important;
}

/* Portalled widgets must opt in because many plugins append them under body. */
.pq-ui.pq-portal,
.pq-ui .pq-portal {
  color: var(--pq-color-text);
  font-family: var(--pq-font-family-sans);
  font-size: var(--pq-font-size-md);
  line-height: var(--pq-line-height-normal);
}

.pq-ui.pq-portal--dropdown,
.pq-ui .pq-portal--dropdown,
.pq-ui.pq-portal .select2-dropdown,
.pq-ui .pq-portal .select2-dropdown {
  z-index: var(--pq-z-dropdown);
  border-color: var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface);
  color: var(--pq-color-text);
}

.pq-ui.pq-portal--modal,
.pq-ui .pq-portal--modal {
  z-index: var(--pq-z-modal);
}

.pq-ui.pq-portal--tooltip,
.pq-ui .pq-portal--tooltip {
  z-index: var(--pq-z-tooltip);
}

/* Status badges and plate identity */
.pq-ui .pq-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #52677e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.pq-ui .pq-badge--current,
.pq-ui .pq-badge--success {
  background: var(--pq-color-success-soft);
  color: var(--pq-color-success);
}

.pq-ui .pq-badge--neutral {
  background: #eef2f6;
  color: #52677e;
}

.pq-ui .pq-badge--archived,
.pq-ui .pq-badge--warning {
  background: var(--pq-color-warning-soft);
  color: var(--pq-color-warning);
}

.pq-ui .pq-badge--audit {
  background: var(--pq-color-audit-soft);
  color: var(--pq-color-audit);
}

.pq-ui .pq-badge--info {
  background: var(--pq-color-info-soft);
  color: var(--pq-color-info);
}

.pq-ui .pq-badge--info.pq-badge--solid {
  background: var(--pq-color-info);
  color: #fff;
}

.pq-ui .pq-badge--danger {
  background: var(--pq-color-danger-soft);
  color: var(--pq-color-danger);
}

.pq-ui .pq-plate,
.pq-ui .pq-license-plate {
  display: inline-block;
  min-width: 84px;
  padding: 4px 10px 3px;
  border: 2px solid #728092;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff 0%, #f5f7f8 70%, #e9edf0 100%);
  box-shadow: inset 0 0 0 1px #fff, 0 1px 2px rgba(36, 48, 65, .14);
  color: #263746;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.pq-ui .pq-plate__number {
  font: inherit;
  letter-spacing: inherit;
}

.pq-ui .pq-plate__state {
  display: block;
  margin-bottom: 1px;
  color: #5c6d7d;
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
}

.pq-ui .pq-plate--compact {
  min-width: 68px;
  padding: 3px 7px 2px;
  font-size: 12px;
}

.pq-ui .pq-plate--muted {
  border-color: #aeb8c2;
  background: #f4f6f8;
  box-shadow: none;
  color: var(--pq-color-muted);
}

/* Loading, empty, and status messaging */
.pq-ui .pq-state {
  padding: var(--pq-space-4);
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-md);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-muted);
  text-align: center;
}

.pq-ui .pq-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--pq-space-3);
}

.pq-ui .pq-state__icon {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-weight: 800;
}

.pq-ui .pq-state__title {
  margin: var(--pq-space-2) 0 var(--pq-space-1);
  color: var(--pq-color-heading);
  font-size: 15px;
  font-weight: 700;
}

.pq-ui .pq-state__message {
  margin: 0;
  line-height: 1.4;
}

.pq-ui .pq-state[hidden],
.pq-ui .pq-status[hidden] {
  display: none !important;
}

.pq-ui .pq-state--empty,
.pq-ui .pq-empty-state {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--pq-space-2);
}

.pq-ui .pq-state--loading::before,
.pq-ui .pq-loading-state::before,
.pq-ui .pq-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--pq-color-border);
  border-top-color: var(--pq-color-brand);
  border-radius: 50%;
  animation: pq-spin .8s linear infinite;
  content: "";
}

.pq-ui .pq-btn__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pq-spin .8s linear infinite;
}

.pq-ui .pq-btn__spinner[hidden] {
  display: none;
}

.pq-ui .pq-state--loading::before,
.pq-ui .pq-loading-state::before {
  display: inline-block;
  margin-right: var(--pq-space-2);
  vertical-align: middle;
}

.pq-ui .pq-status {
  padding: 10px 12px;
  border: 1px solid var(--pq-color-border);
  border-radius: var(--pq-radius-sm);
  background: var(--pq-color-surface-muted);
  color: var(--pq-color-text);
}

.pq-ui .pq-state--info,
.pq-ui .pq-status--info {
  border-color: #b9d7ef;
  background: var(--pq-color-info-soft);
  color: #27658e;
}

.pq-ui .pq-state--success,
.pq-ui .pq-status--success {
  border-color: #b9dfc8;
  background: var(--pq-color-success-soft);
  color: var(--pq-color-success);
}

.pq-ui .pq-state--warning,
.pq-ui .pq-status--warning {
  border-color: #edd5a7;
  background: var(--pq-color-warning-soft);
  color: var(--pq-color-warning);
}

.pq-ui .pq-state--danger,
.pq-ui .pq-state--error,
.pq-ui .pq-status--danger {
  border-color: #efc4c4;
  background: var(--pq-color-danger-soft);
  color: var(--pq-color-danger);
}

@keyframes pq-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .pq-ui .pq-grid--4 {
    --pq-grid-columns: 2;
  }

  .pq-ui .pq-filter-toolbar__query {
    grid-column: span 12;
  }

  .pq-ui .pq-filter-toolbar > .pq-filter-toolbar__action--span-1,
  .pq-ui .pq-filter-toolbar--split > .pq-filter-toolbar__actions.pq-filter-toolbar__actions--span-5 {
    grid-column: 1 / -1;
  }

  .pq-ui .pq-filter-toolbar > .pq-field:not(.pq-filter-toolbar__query),
  .pq-ui .pq-filter-toolbar__field {
    grid-column: span 6;
  }

  .pq-ui .pq-table--fit {
    min-width: 960px;
  }
}

@media (max-width: 767px) {
  .pq-ui .pq-cluster--mobile-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .pq-ui .pq-cluster--mobile-pair > form {
    display: flex;
    min-width: 0;
  }

  .pq-ui .pq-cluster--mobile-pair > .pq-btn,
  .pq-ui .pq-cluster--mobile-pair > form > .pq-btn {
    min-width: 0;
    width: 100%;
    white-space: normal;
  }

  .pq-ui .pq-cluster--mobile-pair > .pq-cluster__status {
    grid-column: 1 / -1;
  }

  .pq-ui .pq-cluster--mobile-pair > .pq-cluster__status:empty {
    display: none;
  }

  .pq-ui .pq-grid--2,
  .pq-ui .pq-grid--3,
  .pq-ui .pq-grid--4 {
    --pq-grid-columns: 1;
  }

  .pq-ui [class*="pq-grid__item--span-"] {
    grid-column: 1 / -1;
  }

  .pq-ui .pq-command-bar__main,
  .pq-ui .pq-command-bar__filters,
  .pq-ui .pq-command-bar__actions,
  .pq-ui .pq-command-bar__aside,
  .pq-ui .pq-toolbar--split > .pq-filter-toolbar__actions,
  .pq-ui .pq-filter-toolbar--split > .pq-filter-toolbar__actions {
    grid-column: 1 / -1;
  }

  .pq-ui .pq-command-bar__main,
  .pq-ui .pq-command-bar__filters {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .pq-ui .pq-command-bar__actions,
  .pq-ui .pq-command-bar__aside,
  .pq-ui .pq-toolbar--split > .pq-filter-toolbar__actions,
  .pq-ui .pq-filter-toolbar--split > .pq-filter-toolbar__actions {
    margin-top: var(--pq-space-1);
    padding-top: var(--pq-space-4);
    padding-left: 0;
    border-top: 1px solid var(--pq-color-border);
    border-left: 0;
  }

  .pq-ui.pq-page,
  .pq-ui .pq-page,
  .pq-ui .pq-page-shell {
    --pq-page-outer-gutter: var(--pq-space-3);
    padding: var(--pq-page-outer-gutter);
  }

  .pq-ui .pq-page__header,
  .pq-ui .pq-page-header {
    flex-direction: column;
  }

  .pq-ui .pq-page__actions {
    width: 100%;
  }

  .pq-ui .pq-panel {
    padding: var(--pq-space-4);
  }

  .pq-ui .pq-pass-card__header {
    --pq-pass-card-header-inset: var(--pq-space-4);
  }

  .pq-ui .pq-panel__body--flush {
    margin-right: calc(0px - var(--pq-space-4));
    margin-bottom: calc(0px - var(--pq-space-4));
    margin-left: calc(0px - var(--pq-space-4));
  }

  .pq-ui .pq-data-table__footer {
    margin-right: calc(0px - var(--pq-space-4));
    margin-bottom: calc(0px - var(--pq-space-4));
    margin-left: calc(0px - var(--pq-space-4));
    padding: var(--pq-space-4);
  }

  .pq-ui .pq-data-table__footer-controls {
    grid-template-columns: 1fr;
  }

  .pq-ui .pq-data-table__page-size,
  .pq-ui .pq-data-table__pagination {
    grid-column: 1;
    justify-self: center;
  }

  .pq-ui .pq-state-grid {
    grid-template-columns: 1fr;
  }

  .pq-ui.pq-modal .modal-dialog,
  .pq-ui .pq-modal .modal-dialog,
  .pq-ui .pq-modal__dialog,
  .pq-ui.pq-modal--wide .modal-dialog,
  .pq-ui .pq-modal--wide .modal-dialog {
    max-width: none;
    margin: 10px;
  }

  .pq-ui.pq-modal .modal-body,
  .pq-ui .pq-modal .modal-body,
  .pq-ui .pq-modal__body {
    max-height: calc(100vh - 170px);
    padding: var(--pq-space-4);
  }

  .pq-ui .pq-table--responsive th,
  .pq-ui .pq-table--responsive td {
    padding: var(--pq-table-cell-padding-block-compact) var(--pq-table-cell-padding-inline-compact);
  }
}

@media (max-width: 600px) {
  .pq-ui .pq-input-group,
  .pq-ui .pq-query-line {
    align-items: stretch;
    flex-direction: column;
  }

  .pq-ui .pq-input-group .pq-btn,
  .pq-ui .pq-query-line .pq-btn {
    width: 100%;
  }

  .pq-ui .pq-data-table__header {
    flex-direction: column;
  }

  .pq-ui .pq-modal--evidence .pq-modal__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pq-ui .pq-modal__footer > .pq-actions {
    width: 100%;
    margin-left: 0;
  }

  .pq-ui .pq-data-table__filters .pq-filter-toolbar__actions {
    grid-column: span 12;
  }

  .pq-ui .pq-filter-toolbar > .pq-field:not(.pq-filter-toolbar__query),
  .pq-ui .pq-filter-toolbar__field,
  .pq-ui .pq-filter-toolbar__actions,
  .pq-ui .pq-toolbar__field,
  .pq-ui .pq-command-bar__field,
  .pq-ui .pq-command-bar__filters > .pq-field {
    grid-column: span 12;
  }

  .pq-ui .pq-filter-toolbar__actions,
  .pq-ui .pq-actions,
  .pq-ui .pq-table__actions,
  .pq-ui .pq-page__actions,
  .pq-ui .pq-command-bar__buttons,
  .pq-ui .pq-filter-toolbar__action-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .pq-ui .pq-filter-toolbar__actions .pq-btn,
  .pq-ui .pq-actions .pq-action,
  .pq-ui .pq-actions .pq-btn,
  .pq-ui .pq-table__actions .pq-action,
  .pq-ui .pq-table__actions .pq-btn,
  .pq-ui .pq-page__actions .pq-btn,
  .pq-ui .pq-command-bar__buttons .pq-btn,
  .pq-ui .pq-filter-toolbar__action-buttons .pq-btn {
    width: 100%;
  }

  .pq-ui .pq-query-line .pq-btn__label--compact {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pq-ui .pq-control,
  .pq-ui .pq-btn,
  .pq-ui .pq-action,
  .pq-ui .pq-tabs__tab,
  .pq-ui .pq-switch__control,
  .pq-ui .pq-switch__control::after {
    transition: none;
  }

  .pq-ui .pq-state--loading::before,
  .pq-ui .pq-loading-state::before,
  .pq-ui .pq-spinner,
  .pq-ui .pq-btn__spinner {
    animation: none;
  }
}

@media (forced-colors: active) {
  .pq-ui .pq-btn,
  .pq-ui .pq-action,
  .pq-ui .pq-control,
  .pq-ui .pq-tabs__tab,
  .pq-ui .pq-switch__control,
  .pq-ui .pq-table-shell {
    border-color: CanvasText;
    forced-color-adjust: auto;
  }

  .pq-ui .pq-btn:focus-visible,
  .pq-ui .pq-action:focus-visible,
  .pq-ui .pq-control:focus-visible,
  .pq-ui .pq-tabs__tab:focus-visible,
  .pq-ui .pq-switch__input:focus-visible + .pq-switch__control {
    outline: 2px solid Highlight;
    outline-offset: 2px;
    box-shadow: none;
  }

  .pq-ui .pq-tabs__tab[aria-selected="true"],
  .pq-ui .pq-pagination__button[aria-current="page"] {
    border-color: Highlight;
  }
}
/* Authenticated portal preference, matching the lot-manager sidebar footer. */
.pq-ui.pq-experience-switcher { flex-shrink: 0; padding: 14px 16px 18px; border-top: 1px solid #dce7ef; background: #f7fafc; }
.pq-ui .pq-experience-switcher__label { display: block; margin: 0 0 6px; color: #6a7c92; font-size: 10px; font-weight: 700; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
.pq-ui .pq-experience-switcher__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: 100%; max-width: 188px; padding: 3px; border: 1px solid #dce7ef; border-radius: 999px; background: #eaf0f5; box-shadow: inset 0 1px 2px rgba(36,48,65,.06); }
.pq-ui .pq-experience-switcher__option { display: inline-flex; min-width: 0; min-height: 28px; align-items: center; justify-content: center; padding: 4px 8px; border: 0; border-radius: 999px; background: transparent; color: #52677e; font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 1.2; text-decoration: none; text-transform: uppercase; transition: background-color .16s ease, box-shadow .16s ease, color .16s ease; }
.pq-ui .pq-experience-switcher__option:hover, .pq-ui .pq-experience-switcher__option:focus-visible { background: rgba(255,255,255,.72); color: #334760; outline: 0; box-shadow: 0 0 0 3px rgba(36,119,209,.18); text-decoration: none; }
.pq-ui .pq-experience-switcher__option[aria-current="page"] { background: linear-gradient(135deg,#ff9d4d,#f47d27); color: #fff !important; box-shadow: 0 5px 12px rgba(244,125,39,.24); }
.pq-ui.pq-experience-switcher--touch .pq-experience-switcher__options { max-width: 256px; }
.pq-ui.pq-experience-switcher--touch .pq-experience-switcher__option { min-height: 44px; font-size: 12px; }
.pq-ui.pq-experience-switcher--sidebar { width: 100%; }
.pq-ui.pq-experience-switcher--topbar { display: flex; align-items: center; gap: var(--pq-space-2); margin: 0 auto 0 var(--pq-space-3); padding: 0; border: 0; background: transparent; }
.pq-ui.pq-experience-switcher--topbar .pq-experience-switcher__label { margin: 0; }
.pq-ui.pq-experience-switcher--topbar .pq-experience-switcher__options { width: 188px; }
.pq-ui.pq-valet-workspace-switcher { display: block; position: sticky; bottom: 0; z-index: 2; margin-top: auto; background: #f7fafc; }

@media (max-width: 767px) {
  .pq-ui.pq-experience-switcher--topbar { display: none; }
  .pq-ui.pq-valet-workspace-switcher { margin-top: var(--pq-space-4); }
}
