/* ==========================================================================
   Portal Assistant — listing pages (layout 02)
   Shared by requests-02, cases-02, clients-02, businesses-02, contacts-02 and
   shared-02. The markup is rendered by js/list-02.js. Load after tokens.css
   and app-02.css (which provides the app shell).
   ========================================================================== *//* ---------- Page head ---------- */


.pa-page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--pa-space-4); flex-wrap: wrap; }
.pa-page-head__actions { display: flex; flex-wrap: wrap; gap: var(--pa-space-3); }/* Page titles: --pa-text-title (28/36; 24/32 on the 03 pages) */

.pa-page-title {
  font-family: var(--pa-font-heading);
  font-size: var(--pa-text-title);
  font-weight: var(--pa-weight-semibold);
  line-height: var(--pa-leading-title);
  color: var(--pa-ink-strong);
}
.pa-page-desc { margin-top: 4px; font-size: var(--pa-text-14); color: var(--pa-ink-muted); line-height: var(--pa-leading-20); }/* ---------- Toolbar: tabs joined to the list card + controls ---------- */


.pa-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--pa-space-3) var(--pa-space-4); flex-wrap: wrap; }

.pa-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  margin-bottom: -1px;
  padding: 0 var(--pa-space-2);
  border: 1px solid var(--pa-line);
  border-bottom: 0;
  border-radius: var(--pa-radius-lg) var(--pa-radius-lg) 0 0;
  background: var(--pa-surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.pa-tabs::-webkit-scrollbar { display: none; }

.pa-tab {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--pa-space-2);
  height: var(--pa-tab-height);
  padding: 0 var(--pa-space-5);
  border: 0;
  background: none;
  color: var(--pa-ink-soft);
  font-size: var(--pa-text-14);
  font-weight: var(--pa-weight-semibold);
  transition: color var(--pa-duration) var(--pa-ease); line-height: var(--pa-leading-20); }
.pa-tab:hover { color: var(--pa-ink-strong); }
.pa-tab .ti { font-size: var(--pa-icon-md); }
.pa-tab__count {
  padding: 1px 8px;
  border-radius: var(--pa-radius-pill);
  background: var(--pa-badge-count);
  font-size: var(--pa-text-12);
  color: var(--pa-badge-count-ink); line-height: var(--pa-leading-18); font-weight: var(--pa-weight-medium); }
.pa-tab[aria-selected="true"] { color: var(--pa-ink-strong); }
.pa-tab[aria-selected="true"] .pa-tab__count { background: var(--pa-badge-count-strong); color: var(--pa-text-inverse); }
.pa-tab:not(.pa-ftab, .pa-stab)[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--pa-brand-600);
}

.pa-controls { display: flex; align-items: center; gap: var(--pa-space-3); margin-bottom: var(--pa-space-3); }
.pa-controls__search { width: 330px; }/* Folder tabs (PaList adds .pa-tabs--folder and .pa-ftab): each tab is the tab of a folder and the
   list card is the folder; the open tab is white and joins it, the others sit behind in grey. */


.pa-tabs--folder { gap: 2px; padding: 0; border: 0; border-radius: 0; background: none; }
.pa-tabs--folder .pa-tab { --tab-h: var(--pa-tab-height); height: var(--tab-h); padding: 0 calc(var(--tab-cap) + 6px) 0 16px; }
.pa-tabs--folder .pa-tab:hover { --tab-fill: var(--pa-brand-50); }
.pa-tabs--folder .pa-tab[aria-selected="true"] { --tab-fill: var(--pa-surface); --tab-line: var(--pa-line); }/* Segmented tabs (tabStyle: 'segmented', .pa-tabs--seg and .pa-stab): the tabs as one control in the
   toolbar, a white thumb on the open one (PaMotion.slider), its count dark */


.pa-tabs.pa-tabs--seg { flex: none; gap: 2px; margin-bottom: 0; padding: 3px; border: 0; border-radius: var(--pa-radius-lg); background: var(--pa-chip-bg); }
.pa-tabs--seg .pa-stab { gap: var(--pa-space-2); height: calc(var(--pa-control-md) - 6px); padding: 0 var(--pa-space-3) 0 var(--pa-space-4); }
.pa-tabs--seg .pa-stab .ti { display: none; }
.pa-tabs--seg .pa-stab[aria-selected="true"] { font-weight: var(--pa-weight-semibold); }
/* Underlined tabs inside the card (tabStyle: 'line', the 03 Requests after the My Task prototype): the first
   row of the list's card, across its whole width; the chosen tab is underlined (PaMotion.ink glides it).
   A badge can stand in for a count ("1 new", green as the row's New). */
.pa-list-card.pa-list-card--line { --card-pad: var(--pa-space-4); padding-top: 0; border-radius: var(--pa-radius-lg); }
/* The toolbar then holds the search and the buttons only: the search takes the room */
.pa-toolbar--line .pa-controls { flex: 1; min-width: 0; }
.pa-toolbar--line .pa-controls__search { flex: 1; min-width: 0; }
.pa-tabs--line {
  z-index: auto; gap: var(--pa-space-1); margin: 0 calc(-1 * var(--card-pad)) var(--pa-space-4); padding: 0 var(--pa-space-3);
  border: 0; border-bottom: 1px solid var(--pa-line); border-radius: var(--pa-radius-lg) var(--pa-radius-lg) 0 0; background: none;
}
.pa-tabs--line .pa-tab { height: var(--pa-row-height); padding: 0 var(--pa-space-4); font-weight: var(--pa-weight-medium); transition: color var(--pa-duration) var(--pa-ease), background-color var(--pa-duration-short) var(--pa-ease); }
.pa-tabs--line .pa-tab:hover { background: var(--pa-hover-tint); }
.pa-tabs--line .pa-tab[aria-selected="true"] { color: var(--pa-brand-700); font-weight: var(--pa-weight-semibold); }
.pa-tabs .pa-tab .pa-tab__count.pa-tab__count--new { background: var(--pa-badge-new); color: var(--pa-text-inverse); font-weight: var(--pa-weight-semibold); }
.pa-tab__count[hidden] { display: none; }
/* A list with no tabs (tabs: []): the row keeps its height and says how many there are, in grey */
.pa-tabs--none .pa-tabs__total { display: flex; align-items: center; height: var(--pa-row-height); padding: 0 var(--pa-space-4); font-size: var(--pa-text-14); line-height: var(--pa-leading-20); color: var(--pa-ink-muted); white-space: nowrap; }
/* Searching or filtering: more results in another tab, said under the table with a way there */
.pa-list-also { display: flex; flex-wrap: wrap; align-items: center; gap: var(--pa-space-2) var(--pa-space-3); margin-top: var(--pa-space-3); font-size: var(--pa-text-13); line-height: var(--pa-leading-18); color: var(--pa-ink-soft); }
.pa-list-also:empty { display: none; }
/* ---------- List card + lined table ---------- */


.pa-list-card {
  padding: var(--pa-space-4) var(--pa-space-4) 0;
  border: 1px solid var(--pa-line);
  border-radius: 0 var(--pa-radius-lg) var(--pa-radius-lg) var(--pa-radius-lg);
  background: var(--pa-surface);
}/* position: relative keeps visually hidden text in a cell inside the scroll area, not widening the page */

.pa-list-scroll { position: relative; overflow-x: auto; border: 1px solid var(--pa-line); border-radius: var(--pa-radius-lg); }

.pa-table { min-width: 1100px; font-size: var(--pa-text-14); line-height: var(--pa-leading-20); }
.pa-table th {
  height: 40px;
  padding: 0 var(--pa-space-4);
  border-bottom: 1px solid var(--pa-line);
  background: color-mix(in srgb, var(--pa-chip-bg) 60%, var(--pa-surface));
  color: var(--pa-ink-soft);
}
.pa-table th + th { box-shadow: inset 1px 0 0 var(--pa-line-soft); }
.pa-table th .pa-sort { width: 100%; justify-content: space-between; }
.pa-table td { height: var(--pa-row-height); padding: 4px var(--pa-space-4); border-bottom: 1px solid var(--pa-line-soft); }
.pa-table tbody tr:last-child td { border-bottom: 0; }
.pa-table tbody tr.is-selected { background: var(--pa-brand-25); }
.pa-table tbody tr[data-href] { cursor: pointer; }
/* fill: blank rows keep a short page as tall as Rows per page (no hover) */
.pa-table tbody tr.pa-row-fill:hover { background: none; }
.pa-table tbody tr.pa-row-fill > td { padding: 0; background: none !important; }
.pa-table .pa-col-check { width: 56px; min-width: 56px; box-sizing: border-box; padding: 0 0 0 var(--pa-space-5); }/* The checkbox and the first column (the record's name or number) stay put while a wide table scrolls
   sideways, with a line at their edge. Cells carry the row's background so the rest slides under them. */

.pa-table :is(.pa-col-check, .pa-col-check + *) { position: sticky; left: 0; z-index: 1; }
.pa-table .pa-col-check + * { left: 56px; box-shadow: inset -1px 0 0 var(--pa-line); }
.pa-table th.pa-col-check + th { box-shadow: inset 1px 0 0 var(--pa-line-soft), inset -1px 0 0 var(--pa-line); }
.pa-table td:is(.pa-col-check, .pa-col-check + *) { background: var(--pa-surface); transition: background var(--pa-duration) var(--pa-ease); }
.pa-table tbody tr:is(:hover, .is-selected) > td:is(.pa-col-check, .pa-col-check + *) { background: var(--pa-brand-25); }
/* Sideways (list-02.js): while columns lie past the right edge, that edge fades; once columns have slid under the
   sticky first column, it casts a soft shadow on them */
.pa-list-scroll.is-more-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.pa-list-scroll.is-more-start .pa-table td.pa-col-check + td { box-shadow: inset -1px 0 0 var(--pa-line), 8px 0 8px -8px color-mix(in srgb, var(--pa-ink-strong) 22%, transparent); }
.pa-list-scroll.is-more-start .pa-table th.pa-col-check + th { box-shadow: inset 1px 0 0 var(--pa-line-soft), inset -1px 0 0 var(--pa-line), 8px 0 8px -8px color-mix(in srgb, var(--pa-ink-strong) 22%, transparent); }
.pa-table .pa-cell-stack__meta { font-size: var(--pa-text-13); line-height: var(--pa-leading-18); }
.pa-table .pa-org, .pa-table .pa-avatar { width: 32px; height: 32px; }
/* Rows: Compact (the list's More menu, PaList densityKey): shorter rows and smaller faces, for people who
   want more on a screen; the text keeps its size */
[data-density="compact"] .pa-table td { height: var(--pa-row-height-compact); padding-block: 2px; }
[data-density="compact"] .pa-table :is(.pa-org, .pa-avatar) { width: 28px; height: 28px; }

.pa-record__type { margin-left: var(--pa-space-2); color: var(--pa-ink-soft); }
.pa-record__id { font-weight: var(--pa-weight-semibold); color: var(--pa-ink-strong); }/* Compact business cell (wide request tables) */


.pa-org-name { display: inline-flex; align-items: center; gap: var(--pa-space-2); }
.pa-table .pa-org-name .pa-org { width: 28px; height: 28px; }/* The user's own business: its logo's mark (PaData.self.mark) on white, as it is printed */

.pa-org--self { overflow: hidden; background: var(--pa-surface); box-shadow: inset 0 0 0 1px var(--pa-line); }
.pa-org--self img { width: 74%; height: 74%; object-fit: contain; }/* A logo with its own background (PaBusinesses: imageFill) fills the circle; a hairline keeps a pale one off white */

.pa-org--fill { box-shadow: 0 0 0 1px var(--pa-line); }
.pa-org--fill img { width: 100%; height: 100%; object-fit: cover; }
.pa-hidden { display: inline-flex; align-items: center; gap: 4px; color: var(--pa-ink-muted); letter-spacing: 0.08em; }
.pa-hidden .ti { font-size: var(--pa-icon-sm); letter-spacing: 0; }
.pa-none { color: var(--pa-ink-muted); }

.pa-priority { display: inline-flex; align-items: center; gap: 6px; }
.pa-priority .ti { font-size: var(--pa-icon-md); }
.pa-priority--high .ti { color: var(--pa-priority-high); }
/* Small: inside a row's line next to the request number (Requests 03 while the Priority column is off), in place
   of a tinted "High" label (audit of 12/11/2026, round 5: that label was the loudest thing in the rows, 7 of the
   first 10). The 16px icon, the word 12/16 semibold in the row's quiet ink. */
.pa-priority--sm { flex: none; gap: 2px; color: var(--pa-ink-soft); font-size: var(--pa-text-12); font-weight: var(--pa-weight-semibold); line-height: var(--pa-leading-16); white-space: nowrap; }
.pa-priority--sm .ti { font-size: var(--pa-icon-sm); }
.pa-priority--medium .ti { color: var(--pa-status-open); }
.pa-priority--low .ti { color: var(--pa-status-progress); }/* Small cell helpers used across the listing pages */


.pa-inline { display: inline-flex; align-items: center; gap: var(--pa-space-2); }/* Row flags, as in the product: New (unread) and Unfiled (not in a case yet) */

.pa-tag-new,
.pa-tag-unfiled {
  margin-left: var(--pa-space-2);
  padding: 1px 8px;
  border-radius: var(--pa-radius-pill);
  font-size: var(--pa-text-12);
  font-weight: var(--pa-weight-medium);
  white-space: nowrap; line-height: var(--pa-leading-16); }/* Badges keep the color of their meaning in every palette (app-02.css, Badges) */

.pa-tag-new { background: var(--pa-badge-new); color: var(--pa-text-inverse); }
.pa-subtle-note { display: block; margin-top: 2px; font-size: var(--pa-text-13); color: var(--pa-ink-muted); line-height: var(--pa-leading-18); }
.pa-tag-unfiled { margin-left: 0; background: var(--pa-status-open-bg); color: var(--pa-ink-strong); }
.pa-table tbody tr.is-unread td { font-weight: var(--pa-weight-semibold); }/* ---------- Rows as cards (config.card), from 760px down ----------
   The same rows, showing only the checkbox and the card cell, so selection, links and the action bar
   work as on a wide screen. The card follows Home's list on a phone: what it is, whose, where it
   stands. Names wrap instead of being cut. */


.pa-table .pa-col-card { display: none; }
.pa-row-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  grid-template-areas: "icon main go" "icon side go";
  align-items: center;
  gap: 6px var(--pa-space-3);
  white-space: normal;
}
.pa-row-card__icon { grid-area: icon; align-self: start; width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--pa-radius-md); background: var(--record-color, var(--pa-brand-600)); color: var(--pa-text-inverse); }
.pa-row-card__icon .ti { font-size: var(--pa-icon-md); }/* A logo or a person's initials bring their own look: no colored tile behind them */

.pa-row-card__icon--plain { background: none; }
.pa-row-card__icon--plain > * { width: 36px; height: 36px; }
.pa-row-card__main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pa-row-card__line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--pa-space-2); }
.pa-row-card__line .pa-tag-new { margin-left: 0; }
.pa-row-card__title { font-size: var(--pa-text-14); line-height: var(--pa-leading-20); font-weight: var(--pa-weight-medium); color: var(--pa-ink-strong); }
.pa-row-card__meta { font-size: var(--pa-text-13); font-weight: var(--pa-weight-regular); color: var(--pa-ink-muted); line-height: var(--pa-leading-18); }
.pa-row-card__meta > span, .pa-row-card__side time { white-space: nowrap; }/* "Case #290021" and a date stay whole */ 
.pa-row-card__side { grid-area: side; display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--pa-space-2); font-size: var(--pa-text-13); font-weight: var(--pa-weight-regular); color: var(--pa-ink-soft); line-height: var(--pa-leading-18); }
.pa-row-card__go { grid-area: go; font-size: var(--pa-icon-md); color: var(--pa-ink-muted); }
.pa-table tbody tr.is-unread .pa-row-card__title { font-weight: var(--pa-weight-bold); }
@media (max-width: 760px) {
  .pa-table--cards { min-width: 0; }
  .pa-table--cards :is(th, td):not(.pa-col-check, .pa-col-card, .pa-empty) { display: none; }
  .pa-table--cards .pa-col-card { display: table-cell; height: auto; padding: 12px var(--pa-space-4) 12px 0; }
  .pa-table--cards .pa-row-fill { display: none; }
  .pa-table--cards .pa-col-check { width: 44px; min-width: 44px; padding-left: var(--pa-space-3); }
  .pa-table--cards td.pa-col-check { vertical-align: top; padding-top: 21px; }/* level with the card's icon */ 
}

.pa-table-foot { padding: var(--pa-space-5) var(--pa-space-1) var(--pa-space-5); font-size: var(--pa-text-base); line-height: var(--pa-leading-20); }
.pa-page-btn { border-radius: var(--pa-radius-md); }
.pa-page-btn[aria-current="page"] { background: var(--pa-brand-700); }/* ---------- A footer that stays in reach ----------
   In a list taller than the screen the footer (rows per page, pages) waits at the bottom of the
   screen, so changing page or page size never means scrolling to the end; under the last row it
   settles back into the card. PaList measures the footer: when its two halves don't share a row
   (is-stacked) only the pager stays in reach; when the pager wraps too (is-tight, a phone) only the
   pages do, and only when there is more than one. is-docked: away from its place right now.
   Docking changes colors only, never the size, so it can't move the page. The footer is exactly as wide
   as the table (its border lands on the table's) and its words start where the checkboxes do
   (--foot-in, the checkbox column's left padding: 20px, 12px once rows are cards; Nov 11, 2026). */

.pa-list { --foot-in: var(--pa-space-5); }
@media (max-width: 760px) { .pa-list:has(.pa-table--cards) { --foot-in: var(--pa-space-3); } }

.pa-list .pa-table-foot,
.pa-list .pa-table-foot.is-stacked > .pa-pager,
.pa-list .pa-table-foot.is-tight .pa-pages {
  position: sticky;
  bottom: var(--pa-dock-bottom);
  z-index: 4;
  margin: 8px 0;
  padding: 11px var(--foot-in);
  border: 1px solid transparent;
  border-radius: var(--pa-radius-lg);
  transition: background-color var(--pa-duration-short) var(--pa-ease), border-color var(--pa-duration-short) var(--pa-ease), box-shadow var(--pa-duration-short) var(--pa-ease);
}
.pa-list .pa-table-foot.is-stacked,
.pa-list .pa-table-foot.is-tight > .pa-pager { display: contents; }
.pa-list .pa-table-foot.is-stacked > .pa-table-foot__info { margin: 20px calc(var(--foot-in) + 1px) 0; }/* outside the footer's border: 1px more */
.pa-list .pa-table-foot.is-stacked > .pa-pager { margin-top: 0; }
.pa-list .pa-table-foot.is-tight > .pa-table-foot__info { margin-inline: 0; }
.pa-list .pa-table-foot.is-tight .pa-rows { display: flex; width: fit-content; margin-top: 12px; }
.pa-list .pa-table-foot.is-tight .pa-pager__divider { display: none; }
.pa-list .pa-table-foot.is-tight .pa-pages { margin-top: 4px; padding: 7px; }
.pa-list .pa-table-foot.is-tight[data-pages="1"] .pa-pages { position: static; }/* is-held: the rows haven't reached the bottom of the screen yet (the list starts low on the page) */

.pa-list .pa-table-foot.is-held,
.pa-list .pa-table-foot.is-held > .pa-pager,
.pa-list .pa-table-foot.is-held .pa-pages { position: static; }
/* An empty list has nothing to page through (list-02.js: is-empty); after is-stacked, which shows the footer as contents */
.pa-list .pa-table-foot.is-empty { display: none; }
.pa-list .is-docked {
  border-color: var(--pa-line);
  /* Solid: rows seen through it (beside a docked Filters panel too) read as part of it (audit of 11/11/2026) */
  background: var(--pa-surface);
  box-shadow: var(--pa-shadow-lift);
}/* Focus moved by Tab stays above the footer; a new page starts at the top of the list */

:root[data-list-foot] { scroll-padding-bottom: calc(var(--pa-dock-bottom) + var(--pa-list-foot) + 8px); }
.pa-list :is(.pa-toolbar, .pa-list-card) { scroll-margin-top: calc(var(--pa-header-h) + var(--pa-space-4)); }/* ---------- Responsive ---------- *//* When the controls don't fit beside the tabs (PaList measures it and adds .is-stacked), they move above
   the tabs so the tabs stay attached to the card */



.pa-toolbar.is-stacked .pa-controls { order: -1; width: 100%; margin-bottom: var(--pa-space-1); }
.pa-toolbar.is-stacked .pa-controls__search { flex: 1; width: auto; }

@media (max-width: 640px) {
  .pa-page-title { font-size: var(--pa-text-title-phone); line-height: var(--pa-leading-title); }
  .pa-page-desc { font-size: var(--pa-text-14); line-height: var(--pa-leading-20); }
  .pa-page-head .pa-btn--primary { width: 100%; }

  .pa-controls { flex-wrap: wrap; }
  .pa-controls__search, .pa-toolbar.is-stacked .pa-controls__search { flex-basis: 100%; }
  .pa-controls__filters { flex: 1; }
  /* Not the buttons in a popup it holds (UI audit of 12/11/2026, P0: in Requests 03's Saved views each Rename,
     Duplicate, Remove took the menu's whole width and the view's name got 0px) */
  .pa-controls__filters .pa-btn:not(:where(.pa-popover *)) { width: 100%; }/* :where keeps the old weight */
  .pa-controls .pa-btn--outline { padding: 0 var(--pa-space-3); }

  .pa-tabs { max-width: 100%; padding: 0 var(--pa-space-1); }
  .pa-tab { gap: 6px; padding: 0 10px; }
  .pa-tabs--folder .pa-tab { --tab-h: var(--pa-tab-height); padding: 0 calc(var(--tab-cap) + 4px) 0 12px; }

  .pa-list-card { padding: var(--pa-space-3) var(--pa-space-3) 0; }
  .pa-list-card.pa-list-card--line { --card-pad: var(--pa-space-3); padding-top: 0; }
  /* As the prototype on a phone: no icons, closer tabs, so "N new" stays in sight */
  .pa-tabs--line { gap: var(--pa-space-1); padding: 0; }
  .pa-tabs--line .pa-tab { gap: 6px; padding: 0 var(--pa-space-1); }
  .pa-tabs--line .pa-tab .ti { display: none; }
  .pa-tabs--line.pa-tabs--none .pa-tabs__total { padding: 0 var(--pa-space-1); }
  .pa-table-foot { padding: var(--pa-space-4) 0; }
  .pa-list .pa-table-foot.is-stacked > .pa-table-foot__info { margin-top: var(--pa-space-4); }/* One bar at a time on a phone: while rows are selected, it's the action bar */
  
  .pa-list:has(.pa-actionbar:not([hidden])) .pa-table-foot.is-tight .pa-pages { position: static; }
}/* Date search: why a row matched ("DOB Apr 18, 1991"), and the empty list's way out */


.pa-date-hit { display: flex; align-items: center; gap: 4px; font-weight: var(--pa-weight-regular); white-space: nowrap; }
.pa-date-hit .ti { font-size: var(--pa-icon-sm); }
.pa-empty__action { display: block; margin-top: var(--pa-space-3); }
