/*
 * Alexco ALC — World-Class Responsive Frontend
 * Professional builder panels, responsive record-card grids, and accessible row-detail dialogs.
 * The card/detail experience is enabled on both mobile and desktop; printable documents stay unchanged.
 */

.alx-mobile-card-list,
.alx-mobile-record-modal {
  box-sizing: border-box;
}

.alx-mobile-card-list {
  display: none;
}

.alx-mobile-record-modal[hidden] {
  display: none !important;
}

.alx-mobile-inline-record-key {
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

@media screen and (max-width: 782px) {
  :root {
    --alx-mobile-orange: #f97316;
    --alx-mobile-orange-dark: #c2410c;
    --alx-mobile-ink: #111827;
    --alx-mobile-muted: #64748b;
    --alx-mobile-line: #e2e8f0;
    --alx-mobile-soft: #fff7ed;
    --alx-mobile-card: #ffffff;
    --alx-mobile-shadow: 0 12px 30px rgba(15, 23, 42, .08);
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.alx-mobile-dialog-open {
    overflow: hidden !important;
  }

  .alx-mobile-inline-record-key {
    color: var(--alx-mobile-orange-dark) !important;
    font-weight: 850;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
  }

  .alx-mobile-inline-record-key:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .28);
    outline-offset: 4px;
    border-radius: 4px;
  }

  main,
  .site-main,
  #primary,
  #content,
  .site-content,
  .entry-content,
  .page-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .alx-page-wrap,
  .alx-page-wrap .alx-wrap,
  .alxfd-page-shell,
  .alxfd-wrap,
  .alxfd-shell,
  .alxua-prospects-front,
  .alexco-track-wrap,
  .alexco-tracking-wrap,
  .apw-finance-history-page,
  .apw-finance-statement-page,
  .alxfd-apw-page,
  .alxfd-users-wrap,
  .alxfd-profile-wrap,
  .alxaddr-wrap,
  .alxfx-shell,
  .alxfx-wrap,
  .alexco-payments-pdf-storage,
  .alexco-payments-finance-statement {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .alx-page-wrap,
  .alxfd-page-shell,
  .alxfd-wrap,
  .alxua-prospects-front,
  .alexco-track-wrap,
  .alexco-tracking-wrap,
  .alxfd-users-wrap,
  .alxfd-profile-wrap,
  .alxaddr-wrap,
  .alxfx-wrap,
  .alexco-payments-pdf-storage,
  .alexco-payments-finance-statement {
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .alx-page-wrap *,
  .alxfd-page-shell *,
  .alxfd-wrap *,
  .alxua-prospects-front *,
  .alexco-track-wrap *,
  .alexco-tracking-wrap *,
  .alxfd-apw-shell *,
  .alxfd-users-wrap *,
  .alxfd-profile-wrap *,
  .alxaddr-wrap *,
  .alxfx-wrap *,
  .alexco-payments-pdf-storage *,
  .alexco-payments-finance-statement * {
    box-sizing: border-box;
    min-width: 0;
  }

  .alx-page-card,
  .alxfd-page-frame,
  .alxfd-card,
  .alxua-card,
  .alexco-card,
  .alexco-result,
  .apw-finance-filters,
  .alx-mobile-builder-card,
  .alxfd-users-panel,
  .alxfd-profile-card,
  .alxaddr-card,
  .alxfx-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px !important;
    border: 1px solid var(--alx-mobile-line) !important;
    background: var(--alx-mobile-card) !important;
    box-shadow: var(--alx-mobile-shadow) !important;
  }

  .alxfd-page-frame,
  .alxfd-card--padded,
  .alxua-card,
  .alexco-card,
  .alx-page-card .alx-page-content {
    padding: 14px !important;
  }

  .alxfd-page-hero,
  .alxua-front-hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 16px !important;
    border-radius: 18px !important;
  }

  .alxfd-page-hero h1,
  .alxua-front-hero h1,
  .alxfd-heading {
    font-size: clamp(24px, 7vw, 30px) !important;
    line-height: 1.12 !important;
    overflow-wrap: anywhere;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea {
    max-width: 100% !important;
  }

  img,
  video,
  canvas,
  svg,
  iframe {
    max-width: 100% !important;
  }

  img,
  video,
  canvas,
  svg {
    height: auto;
  }

  .alxfd-users-toolbar,
  .alxfd-users-actions,
  .alxfd-profile-row,
  .alxfd-profile-actions,
  .alxfx-grid,
  .alxfx-toolbar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .alxfd-toolbar,
  .alxfd-toolbar-actions,
  .alxfd-panel-head,
  .alxfd-panel-actions,
  .alxfd-filter-footer,
  .alxfd-waybill-actions-row,
  .alxua-actions,
  .alxua-bulk-actions,
  .alxua-filter-main-row,
  .apw-pagination-bar,
  .tablenav-pages {
    width: 100%;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 9px !important;
  }

  .alxfd-toolbar-actions > *,
  .alxfd-panel-actions > *,
  .alxfd-filter-footer > .alxfd-btn,
  .alxfd-waybill-actions-row > .alxfd-btn,
  .alxua-actions > .button,
  .alxua-bulk-actions > .button,
  .tablenav-pages > .button {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .nav-tab-wrapper.alxua-tabs,
  .alxua-prospects-front .nav-tab-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
    border: 0 !important;
    margin: 12px 0 !important;
  }

  .alxua-prospects-front .nav-tab,
  .nav-tab-wrapper.alxua-tabs .nav-tab {
    width: 100% !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 1px solid var(--alx-mobile-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
    text-align: center !important;
  }

  .alxua-prospects-front .nav-tab-active,
  .nav-tab-wrapper.alxua-tabs .nav-tab-active {
    color: var(--alx-mobile-orange-dark) !important;
    border-color: #fdba74 !important;
    background: var(--alx-mobile-soft) !important;
  }

  /* Multi-Level Search Filter and Multi-Level Sort Builder */
  .alxfd-panels {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }

  .alxfd-panel,
  .alxua-builder-block,
  .alx-mobile-builder-card,
  .apw-search-builder-root,
  .apw-finance-filters .inside {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .alxfd-builder-scroll,
  #alxfd-search-rows,
  #alxfd-sort-rows,
  #alxua-filter-rows,
  #alxua-sort-rows,
  #apw-batch-sort-rows,
  .apw-search-builder-rows,
  .alx-mobile-builder-rows {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .alxfd-search-row,
  .alxfd-sort-row,
  .alxua-builder-row,
  .alx-builder-row,
  .apw-search-row,
  .apw-sort-row,
  .apw-search-builder-row,
  .alx-mobile-builder-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
    align-items: stretch !important;
    margin: 10px 0 !important;
    padding: 13px !important;
    border: 1px solid var(--alx-mobile-line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 5px 16px rgba(15, 23, 42, .04) !important;
  }

  .alxfd-search-row .level,
  .alxfd-sort-row .level,
  .alx-mobile-builder-row .level {
    display: inline-flex !important;
    width: fit-content !important;
    padding: 5px 9px !important;
    border-radius: 999px !important;
    background: var(--alx-mobile-soft) !important;
    color: var(--alx-mobile-orange-dark) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .alxfd-search-row input,
  .alxfd-search-row select,
  .alxfd-sort-row input,
  .alxfd-sort-row select,
  .alxua-builder-row input,
  .alxua-builder-row select,
  .alx-builder-row input,
  .alx-builder-row select,
  .apw-search-row input,
  .apw-search-row select,
  .apw-sort-row input,
  .apw-sort-row select,
  .alx-mobile-builder-row input,
  .alx-mobile-builder-row select {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
  }

  .alxfd-search-row button,
  .alxfd-sort-row button,
  .alxua-builder-row button,
  .alx-builder-row button,
  .apw-search-row button,
  .apw-sort-row button,
  .alx-mobile-builder-row button {
    width: 100% !important;
    min-height: 44px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .alxfd-quick-search-row,
  .alxfd-presets-inline,
  .alxua-bulk-grid,
  .alxua-form-grid,
  .alxua-nalo-grid {
    width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .alxfd-suggest-menu,
  .alxua-live-suggestions,
  .alxua-location-menu,
  .alxua-select-search-menu {
    max-width: 100% !important;
  }

  /* WordPress-style form tables are layout forms, not record listings. Stack them vertically. */
  .alx-page-wrap table.form-table,
  .alxfd-wrap table.form-table,
  .alxfd-page-shell table.form-table,
  .alxfd-apw-shell table.form-table,
  .apw-controls table.form-table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .alx-page-wrap table.form-table tbody,
  .alx-page-wrap table.form-table tr,
  .alx-page-wrap table.form-table th,
  .alx-page-wrap table.form-table td,
  .alxfd-wrap table.form-table tbody,
  .alxfd-wrap table.form-table tr,
  .alxfd-wrap table.form-table th,
  .alxfd-wrap table.form-table td,
  .alxfd-page-shell table.form-table tbody,
  .alxfd-page-shell table.form-table tr,
  .alxfd-page-shell table.form-table th,
  .alxfd-page-shell table.form-table td,
  .alxfd-apw-shell table.form-table tbody,
  .alxfd-apw-shell table.form-table tr,
  .alxfd-apw-shell table.form-table th,
  .alxfd-apw-shell table.form-table td,
  .apw-controls table.form-table tbody,
  .apw-controls table.form-table tr,
  .apw-controls table.form-table th,
  .apw-controls table.form-table td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Replace wide data tables with vertically scrolling record cards. */
  table.alx-mobile-card-source {
    display: none !important;
  }

  .alx-mobile-card-list {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    margin: 12px 0 !important;
  }

  .alx-mobile-card-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--alx-mobile-line);
    border-radius: 14px;
    background: #f8fafc;
  }

  .alx-mobile-select-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--alx-mobile-ink);
    font-weight: 750;
  }

  .alx-mobile-select-all input,
  .alx-mobile-record-select input {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    margin: 0 !important;
  }

  .alx-mobile-record-count {
    color: var(--alx-mobile-muted);
    font-size: 13px;
    font-weight: 700;
  }

  .alx-mobile-record-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--alx-mobile-line);
    border-radius: 18px;
    background: var(--alx-mobile-card);
    box-shadow: var(--alx-mobile-shadow);
  }

  .alx-mobile-record-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid #ffedd5;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 72%);
  }

  .alx-mobile-record-card-head.no-select {
    grid-template-columns: minmax(0, 1fr);
  }

  .alx-mobile-record-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .alx-mobile-record-key {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--alx-mobile-ink);
    text-align: left;
    cursor: pointer;
  }

  .alx-mobile-record-key-label {
    display: block;
    margin-bottom: 4px;
    color: var(--alx-mobile-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
  }

  .alx-mobile-record-key-value {
    display: block;
    color: var(--alx-mobile-orange-dark);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }

  .alx-mobile-record-key:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .28);
    outline-offset: 5px;
    border-radius: 8px;
  }

  .alx-mobile-record-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 2px 14px;
  }

  .alx-mobile-record-fact {
    display: grid;
    grid-template-columns: minmax(105px, .8fr) minmax(0, 1.25fr);
    gap: 10px;
    align-items: start;
    padding: 11px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .alx-mobile-record-fact:last-child {
    border-bottom: 0;
  }

  .alx-mobile-record-fact span {
    color: var(--alx-mobile-muted);
    font-size: 12px;
    font-weight: 750;
  }

  .alx-mobile-record-fact strong {
    color: var(--alx-mobile-ink);
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .alx-mobile-record-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    padding: 12px 14px 14px;
    border-top: 1px solid #f1f5f9;
  }

  .alx-mobile-record-actions:empty {
    display: none;
  }

  .alx-mobile-record-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 11px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: var(--alx-mobile-ink) !important;
    font: inherit;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
  }

  .alx-mobile-record-action.primary,
  .alx-mobile-record-action.button-primary {
    border-color: var(--alx-mobile-orange) !important;
    background: var(--alx-mobile-orange) !important;
    color: #fff !important;
  }

  .alx-mobile-empty-card {
    padding: 22px 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--alx-mobile-muted);
    text-align: center;
  }

  .alxfd-table-scroll,
  .alxfd-table-wrap,
  .alxua-table-scroll,
  .alexco-table-wrap,
  .alexco-track-table-wrap,
  .table-responsive,
  .apw-scroll,
  .alxfd-hscroll,
  .alx-mobile-card-source-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  /* Accessible bottom-sheet dialog for complete row details. */
  .alx-mobile-record-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }

  .alx-mobile-record-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(2px);
  }

  .alx-mobile-record-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 24px 24px 0 0;
    background: #fff;
    box-shadow: 0 -18px 55px rgba(15, 23, 42, .25);
  }

  .alx-mobile-record-dialog-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--alx-mobile-line);
    background: linear-gradient(135deg, #fff7ed, #fff);
  }

  .alx-mobile-record-dialog-kicker {
    margin: 0 0 4px;
    color: var(--alx-mobile-orange-dark);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .alx-mobile-record-dialog-title {
    margin: 0;
    color: var(--alx-mobile-ink);
    font-size: 20px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .alx-mobile-record-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: var(--alx-mobile-ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .alx-mobile-record-dialog-body {
    max-height: calc(90vh - 77px);
    overflow-y: auto;
    padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  .alx-mobile-record-details {
    margin: 0;
  }

  .alx-mobile-record-detail {
    display: grid;
    grid-template-columns: minmax(105px, .8fr) minmax(0, 1.35fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .alx-mobile-record-detail:last-child {
    border-bottom: 0;
  }

  .alx-mobile-record-detail dt {
    margin: 0;
    color: var(--alx-mobile-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .alx-mobile-record-detail dd {
    margin: 0;
    color: var(--alx-mobile-ink);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .alx-mobile-record-dialog-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    padding-top: 14px;
  }
}


/* Desktop and large-screen frontend experience.
 * The same record-card/detail logic used on mobile is presented as a responsive
 * multi-column workspace so wide tables never force page-level horizontal scrolling.
 */
@media screen and (min-width: 783px) {
  :root {
    --alx-mobile-orange: #f97316;
    --alx-mobile-orange-dark: #c2410c;
    --alx-mobile-ink: #111827;
    --alx-mobile-muted: #64748b;
    --alx-mobile-line: #e2e8f0;
    --alx-mobile-soft: #fff7ed;
    --alx-mobile-card: #ffffff;
    --alx-mobile-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body.alx-mobile-dialog-open {
    overflow: hidden !important;
  }

  main,
  .site-main,
  #primary,
  #content,
  .site-content,
  .entry-content,
  .page-content,
  .alx-page-wrap,
  .alx-page-wrap .alx-wrap,
  .alxfd-page-shell,
  .alxfd-wrap,
  .alxfd-shell,
  .alxua-prospects-front,
  .alexco-track-wrap,
  .alexco-tracking-wrap,
  .apw-finance-history-page,
  .apw-finance-statement-page,
  .alxfd-apw-page,
  .alxfd-users-wrap,
  .alxfd-profile-wrap,
  .alxaddr-wrap,
  .alxfx-shell,
  .alxfx-wrap,
  .alexco-payments-pdf-storage,
  .alexco-payments-finance-statement {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .alx-page-wrap *,
  .alxfd-page-shell *,
  .alxfd-wrap *,
  .alxua-prospects-front *,
  .alexco-track-wrap *,
  .alexco-tracking-wrap *,
  .alxfd-apw-shell *,
  .alxfd-users-wrap *,
  .alxfd-profile-wrap *,
  .alxaddr-wrap *,
  .alxfx-wrap *,
  .alexco-payments-pdf-storage *,
  .alexco-payments-finance-statement * {
    box-sizing: border-box;
    min-width: 0;
  }

  .alx-page-card,
  .alxfd-page-frame,
  .alxfd-card,
  .alxua-card,
  .alexco-card,
  .alexco-result,
  .apw-finance-filters,
  .alx-mobile-builder-card,
  .alxfd-users-panel,
  .alxfd-profile-card,
  .alxaddr-card,
  .alxfx-card {
    max-width: 100% !important;
    border: 1px solid var(--alx-mobile-line) !important;
    border-radius: 20px !important;
    background: var(--alx-mobile-card) !important;
    box-shadow: var(--alx-mobile-shadow) !important;
  }

  .alx-mobile-inline-record-key {
    color: var(--alx-mobile-orange-dark) !important;
    font-weight: 850;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
  }

  .alx-mobile-inline-record-key:hover {
    color: #9a3412 !important;
  }

  .alx-mobile-inline-record-key:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .28);
    outline-offset: 4px;
    border-radius: 5px;
  }

  /* Search and sort builders become clean desktop workspaces, while remaining fluid. */
  .alxfd-panels {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: start !important;
    gap: 20px !important;
  }

  .alxfd-panel,
  .alxua-builder-block,
  .alx-mobile-builder-card,
  .apw-search-builder-root,
  .apw-finance-filters .inside {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .alxfd-builder-scroll,
  #alxfd-search-rows,
  #alxfd-sort-rows,
  #alxua-filter-rows,
  #alxua-sort-rows,
  #apw-batch-sort-rows,
  .apw-search-builder-rows,
  .alx-mobile-builder-rows {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .alxfd-search-row,
  .alxfd-sort-row,
  .alxua-builder-row,
  .alx-builder-row,
  .apw-search-row,
  .apw-sort-row,
  .apw-search-builder-row,
  .alx-mobile-builder-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
    gap: 11px !important;
    align-items: end !important;
    margin: 12px 0 !important;
    padding: 15px !important;
    border: 1px solid var(--alx-mobile-line) !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .045) !important;
  }

  .alxfd-search-row .level,
  .alxfd-sort-row .level,
  .alx-mobile-builder-row .level {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    min-height: 38px !important;
    padding: 7px 11px !important;
    border-radius: 999px !important;
    background: var(--alx-mobile-soft) !important;
    color: var(--alx-mobile-orange-dark) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
  }

  .alxfd-search-row input,
  .alxfd-search-row select,
  .alxfd-sort-row input,
  .alxfd-sort-row select,
  .alxua-builder-row input,
  .alxua-builder-row select,
  .alx-builder-row input,
  .alx-builder-row select,
  .apw-search-row input,
  .apw-search-row select,
  .apw-sort-row input,
  .apw-sort-row select,
  .alx-mobile-builder-row input,
  .alx-mobile-builder-row select {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 44px !important;
  }

  .alxfd-search-row button,
  .alxfd-sort-row button,
  .alxua-builder-row button,
  .alx-builder-row button,
  .apw-search-row button,
  .apw-sort-row button,
  .alx-mobile-builder-row button {
    min-height: 44px !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .alxfd-suggest-menu,
  .alxua-live-suggestions,
  .alxua-location-menu,
  .alxua-select-search-menu {
    max-width: 100% !important;
  }

  /* Hide the wide source table and present the same records as a desktop card grid. */
  table.alx-mobile-card-source {
    display: none !important;
  }

  .alx-mobile-card-list {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
    align-items: stretch !important;
    gap: 18px !important;
    margin: 18px 0 !important;
  }

  .alx-mobile-card-list-head {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border: 1px solid var(--alx-mobile-line);
    border-radius: 15px;
    background: #f8fafc;
  }

  .alx-mobile-select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--alx-mobile-ink);
    font-weight: 750;
  }

  .alx-mobile-select-all input,
  .alx-mobile-record-select input {
    width: 21px !important;
    height: 21px !important;
    min-width: 21px !important;
    margin: 0 !important;
  }

  .alx-mobile-record-count {
    color: var(--alx-mobile-muted);
    font-size: 13px;
    font-weight: 700;
  }

  .alx-mobile-record-card {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--alx-mobile-line);
    border-radius: 19px;
    background: var(--alx-mobile-card);
    box-shadow: var(--alx-mobile-shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  }

  .alx-mobile-record-card:hover {
    transform: translateY(-2px);
    border-color: #fdba74;
    box-shadow: 0 20px 42px rgba(15, 23, 42, .11);
  }

  .alx-mobile-record-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #ffedd5;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 75%);
  }

  .alx-mobile-record-card-head.no-select {
    grid-template-columns: minmax(0, 1fr);
  }

  .alx-mobile-record-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .alx-mobile-record-key {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--alx-mobile-ink);
    text-align: left;
    cursor: pointer;
  }

  .alx-mobile-record-key-label {
    display: block;
    margin-bottom: 5px;
    color: var(--alx-mobile-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
  }

  .alx-mobile-record-key-value {
    display: block;
    color: var(--alx-mobile-orange-dark);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }

  .alx-mobile-record-key:hover .alx-mobile-record-key-value {
    color: #9a3412;
  }

  .alx-mobile-record-key:focus-visible {
    outline: 3px solid rgba(249, 115, 22, .28);
    outline-offset: 5px;
    border-radius: 8px;
  }

  .alx-mobile-record-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 3px 16px;
    flex: 1 1 auto;
  }

  .alx-mobile-record-fact {
    display: grid;
    grid-template-columns: minmax(115px, .8fr) minmax(0, 1.25fr);
    gap: 12px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .alx-mobile-record-fact:last-child {
    border-bottom: 0;
  }

  .alx-mobile-record-fact span {
    color: var(--alx-mobile-muted);
    font-size: 12px;
    font-weight: 750;
  }

  .alx-mobile-record-fact strong {
    color: var(--alx-mobile-ink);
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .alx-mobile-record-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 9px;
    padding: 13px 16px 16px;
    border-top: 1px solid #f1f5f9;
  }

  .alx-mobile-record-actions:empty {
    display: none;
  }

  .alx-mobile-record-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 42px;
    margin: 0 !important;
    padding: 9px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: var(--alx-mobile-ink) !important;
    font: inherit;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
  }

  .alx-mobile-record-action:hover {
    border-color: #94a3b8 !important;
    background: #f8fafc !important;
  }

  .alx-mobile-record-action.primary,
  .alx-mobile-record-action.button-primary {
    border-color: var(--alx-mobile-orange) !important;
    background: var(--alx-mobile-orange) !important;
    color: #fff !important;
  }

  .alx-mobile-record-action.primary:hover,
  .alx-mobile-record-action.button-primary:hover {
    border-color: var(--alx-mobile-orange-dark) !important;
    background: var(--alx-mobile-orange-dark) !important;
  }

  .alx-mobile-empty-card {
    grid-column: 1 / -1;
    padding: 28px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 17px;
    background: #f8fafc;
    color: var(--alx-mobile-muted);
    text-align: center;
  }

  .alxfd-table-scroll,
  .alxfd-table-wrap,
  .alxua-table-scroll,
  .alexco-table-wrap,
  .alexco-track-table-wrap,
  .table-responsive,
  .apw-scroll,
  .alxfd-hscroll,
  .alx-mobile-card-source-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  /* Centered desktop record dialog. */
  .alx-mobile-record-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
  }

  .alx-mobile-record-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .64);
    backdrop-filter: blur(3px);
  }

  .alx-mobile-record-dialog {
    position: relative;
    z-index: 1;
    width: min(920px, 100%);
    max-height: calc(100vh - 64px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, .32);
  }

  .alx-mobile-record-dialog-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 20px 22px 18px;
    border-bottom: 1px solid var(--alx-mobile-line);
    background: linear-gradient(135deg, #fff7ed, #fff);
  }

  .alx-mobile-record-dialog-kicker {
    margin: 0 0 5px;
    color: var(--alx-mobile-orange-dark);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .065em;
    text-transform: uppercase;
  }

  .alx-mobile-record-dialog-title {
    margin: 0;
    color: var(--alx-mobile-ink);
    font-size: clamp(23px, 2vw, 30px);
    line-height: 1.22;
    overflow-wrap: anywhere;
  }

  .alx-mobile-record-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    color: var(--alx-mobile-ink);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
  }

  .alx-mobile-record-dialog-close:hover {
    background: #f8fafc;
  }

  .alx-mobile-record-dialog-body {
    max-height: calc(100vh - 170px);
    overflow-y: auto;
    padding: 10px 22px 24px;
    overscroll-behavior: contain;
  }

  .alx-mobile-record-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    margin: 0;
  }

  .alx-mobile-record-detail {
    display: grid;
    grid-template-columns: minmax(120px, .75fr) minmax(0, 1.25fr);
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
  }

  .alx-mobile-record-detail dt {
    margin: 0;
    color: var(--alx-mobile-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .alx-mobile-record-detail dd {
    margin: 0;
    color: var(--alx-mobile-ink);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.48;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .alx-mobile-record-dialog-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding-top: 18px;
  }
}

@media screen and (min-width: 783px) and (max-width: 1180px) {
  .alxfd-panels {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .alx-mobile-card-list {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)) !important;
  }

  .alx-mobile-record-details {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .alx-mobile-card-list,
  .alx-mobile-record-modal {
    display: none !important;
  }

  table.alx-mobile-card-source {
    display: table !important;
  }
}
