/* Orbit rent roll additions. D1 tokens and component styles are reused unchanged; this file only adds
   what the rent roll needs (filters, expiry groups, flag lists, reminder preview, stacked rows on phones). */

.warning-notice { background: var(--warning-soft); color: var(--warning); }
.standalone { max-width: 640px; margin: 64px auto; padding: 0 16px; }
.panel + .panel, .rentals-summary + .panel, .group-grid + .panel, .notice + .panel { margin-top: 20px; }
.panel-body { padding: 0 22px 20px; }
.panel-body.small-muted, p.panel-body { padding-top: 0; }
h1:focus, #main:focus { outline: none; }
h1:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.rentals-summary small { display: block; margin-top: 6px; }
.rentals-summary.marina-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
@media (max-width: 760px) { .rentals-summary.marina-summary { grid-template-columns: 1fr; } }
.rentals-summary .micro-label { display: block; }
.table-header { align-items: flex-start; }
.table-header .small-muted { max-width: 760px; line-height: 1.6; }

/* Filters */
.filter-panel { padding: 0 22px 18px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filters .search-field { flex: 1 1 260px; max-width: none; min-height: 44px; padding-block: 0; }
.filters .search-field input { min-height: 42px; }
.filter-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filter-field select { min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 12px; padding: 0 10px; max-width: 220px; }
.filters .button { min-height: 44px; }
.segmented { flex-wrap: wrap; }
.segmented a { min-height: 36px; min-width: 44px; justify-content: center; }

/* Table */
.orbit-wordmark { min-height: 44px; color: inherit; text-decoration: none; }
.topbar .topbar-label { display: inline-flex; align-items: center; min-height: 44px; }
.detail-sort .sort-menu { display: block; }
.orbit-wordmark:focus-visible { outline: 2px solid var(--nav-muted); outline-offset: 5px; border-radius: 3px; }
@media (max-width: 760px) {
  .topbar .topbar-label { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
  .topbar-left > strong { display: none; }
}
.roll-table td { white-space: normal; vertical-align: top; }
/* Park ownership details and activity stack inside the existing panel. */
.park-account.panel-header { display: block; }
.source-review-summary.panel-header { display: block; }
.source-review-summary .details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.source-review-summary .details-list > div { min-width: 0; }
@media (max-width: 760px) { .source-review-summary .details-list { grid-template-columns: 1fr; } }
/* Orbit-local dock placement: the slip page Dock dropdown and the property page "Assign to dock" bar. */
.dock-placement { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.dock-placement.bulk { margin: 8px 0; }
.dock-placement select { max-width: 14rem; }
.park-account .details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.park-account .details-list > div { min-width: 0; }
.park-activity { margin-top: 24px; min-width: 0; }
.park-activity h3 { margin: 24px 0 12px; }
.park-activity p, .park-activity li { overflow-wrap: anywhere; }
.park-activity ul { padding-left: 22px; }
.park-activity .table-scroll { margin-top: 16px; }
@media (max-width: 760px) { .park-account .details-list { grid-template-columns: 1fr; } }
.roll-table td small { line-height: 1.5; }
.roll-table th.money { text-align: right; }
/* Keep recorded amounts readable when the Marina table adds its dock column. */
@media (min-width: 761px) { .roll-table td.money { white-space: nowrap; } }
/* Status and confidence badges stay on one line (AP Pending was wrapping as Pendin/g). */
.roll-table td .badge, .badge, .count-badge { white-space: nowrap; }
.table-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
td em { color: var(--muted); font-style: italic; }

/* Paging: a page of results is labelled as one, and every other page is a real link */
.table-footer { align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.pager { display: flex; flex: 1 1 100%; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.page-note { margin: 0; padding: 0 22px 12px; font-size: 12px; color: var(--muted); }
.pager-status { margin: 0; font-size: 12px; color: var(--ink); }
.pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pager-nav .button { font-size: 12px; }
.pager-nav .button.is-disabled { background: #edf0f3; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.pager-pages { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pager-number, .pager-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--radius-sm); font-size: 12px; }
.pager-number { color: var(--muted); }
.pager-number:hover { color: var(--ink); background: #f1f4f7; }
.pager-number.current { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 4px #18304715; }
.pager-gap { color: var(--muted); min-width: 24px; }
.pager-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.pager-sizes > span { margin-right: 8px; }
.pager-sizes a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--radius-sm); color: var(--muted); }
.pager-sizes a:hover { color: var(--ink); background: #f1f4f7; }
.pager-sizes a.selected { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 4px #18304715; }

/* Expiry groups */
.group-grid { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.group-grid a { display: flex; flex-direction: column; gap: 4px; min-height: 76px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.group-grid a:hover { border-color: #b8cdea; background: var(--accent-soft); }
.group-grid strong { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.group-grid span { font-size: 12px; color: var(--muted); }

/* Detail */
.flag-panel { border-color: #f0d9a8; background: var(--warning-soft); margin-bottom: 20px; }
.flag-list { list-style: none; margin: 0; padding: 0 22px 18px; display: grid; gap: 12px; }
.flag-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--warning); }
.flag-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.flag-list strong { display: block; font-size: 12px; margin-bottom: 2px; }
.detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.detail-main .details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.detail-main .details-list > div { min-width: 0; overflow-wrap: anywhere; }
.tenant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tenant-list strong { font-size: 13px; }
.tenant-list small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.details-list dd { overflow-wrap: anywhere; }
.deposit-card { margin: 0; }

/* Reminder preview */
.rule-list { margin: 0; padding: 0 22px 12px 40px; font-size: 12px; line-height: 1.8; color: var(--ink); }
.reason-list { list-style: none; margin: 0; padding: 0 22px 14px; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.reason-list strong { color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 6px; }
.disclosure { border-top: 1px solid var(--line); }
.disclosure > summary { cursor: pointer; padding: 14px 22px; min-height: 44px; font-size: 12px; font-weight: 600; color: var(--accent); }
.disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.loading { min-height: 120px; display: grid; place-items: center; }

.nav-empty { padding: 0 14px; }
.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 1200px) {
  .detail-main .details-list { grid-template-columns: 1fr; }
}

/* Phones: each table row becomes a labelled card, so nothing scrolls sideways. */
@media (max-width: 760px) {
  .roll-table, .roll-table thead, .roll-table tbody, .roll-table tfoot, .roll-table tr, .roll-table td, .roll-table tbody th, .roll-table tfoot th { display: block; }
  .table-scroll table { min-width: 0; }
  .roll-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .roll-table tr { border-top: 1px solid var(--line); padding: 8px 12px; }
  .roll-table tr:first-child { border-top: 0; }
  .roll-table td, .roll-table tbody th, .roll-table tfoot th { position: relative; display: block; min-height: 0; min-width: 0; padding: 3px 0 5px; border: 0; text-align: left; overflow-wrap: anywhere; }
  .roll-table td::before, .roll-table tbody th::before, .roll-table tfoot th::before { content: attr(data-label); position: static; display: block; width: auto; margin: 0 0 1px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--muted); }
  .rentals-summary .micro-label { max-width: none; text-align: left; }
  .roll-table td.money { text-align: left; }
  .filter-panel, .filter-row, .page-note { padding-inline: 18px; }
  .filters { align-items: stretch; }
  .filter-field, .filter-field select { max-width: none; width: 100%; }
  .filters .button { flex: 1 1 100%; }
  .rentals-summary { grid-template-columns: 1fr 1fr; gap: 16px; }
  .rentals-summary > div { padding-left: 0; border-left: 0; }
  .rentals-summary strong { font-size: 22px; }
  .rentals-summary .summary-label { font-size: 14px; }
  .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-body, .flag-list, .rule-list, .reason-list { padding-inline: 18px; }
  .rule-list { padding-left: 34px; }
  .disclosure > summary { padding-inline: 18px; }
  .source-ribbon span { overflow-wrap: anywhere; }
  .table-footer { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 359px) {
  .rentals-summary { grid-template-columns: 1fr; }
  .roll-table td { padding-left: 0; }
  .roll-table td::before { position: static; display: block; width: auto; margin-bottom: 2px; }
  .group-grid { grid-template-columns: 1fr; }
}

/* D1's ribbon styles every nested span as a block; badges and dots inside it must stay inline. */
.source-ribbon .badge { display: inline-flex; margin: 0 0 0 6px; color: var(--warning); }
.source-ribbon .badge .status-dot { display: inline-block; margin: 0; }
.source-ribbon > div > span { line-height: 1.6; }

/* Unit links stay a comfortable target without D1's tall default stretching each row. */
.roll-table .customer-link { min-height: 32px; }

/* ---- Review remediation ------------------------------------------------------------------------ */

/* Visible headings in failure and loading states (one h1 per view, no hidden duplicate). */
.failure .empty-state h1 { font-size: 20px; letter-spacing: -.3px; }
.loading-title { margin-bottom: 18px; }

/* Summary block: figures are labelled with the scope they cover, and rent is shown per business. */
.summary-block { margin-bottom: 28px; }
.summary-scope { font-size: 12px; color: var(--muted); margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.summary-block .rentals-summary { margin-bottom: 8px; grid-template-columns: .8fr 1.6fr 1fr 1.1fr; }
.rent-tile { min-width: 0; }
.business-totals { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.business-totals li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 2px; align-items: baseline; font-size: 13px; }
.business-totals strong { font-size: 18px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.business-totals small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.rentals-summary .rent-tile strong { margin-top: 0; }
.summary-note { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.group-grid small { font-size: 12px; color: var(--muted); }

/* Controls: visible borders (3:1 or better), 44px targets on touch layouts. */
.filters .search-field, .filter-field select { border-color: #6f7d8a; }
.nav-empty { color: #c5d5df; }

/* Smallest text anywhere in Orbit is 11px; D1 tiles and labels went down to 7px. */
.micro-label { font-size: 12px; letter-spacing: .9px; }
.demo-pill { font-size: 12px; }
.badge, .count-badge { font-size: 12px; }
.source-ribbon span { font-size: 12px; }
.source-ribbon strong { font-size: 13px; }
th { font-size: 12px; }
td small, .table-footer, .filter-field, .small-muted { font-size: 12px; }
.segmented a { font-size: 12px; }

@media (max-width: 980px) {
  .badge { font-size: 12px; }
  .micro-label { max-width: none; font-size: 12px; }
  .summary-block .rentals-summary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .demo-pill { font-size: 12px; padding: 4px 6px; letter-spacing: .5px; }
  .micro-label { font-size: 12px; }
  .segmented a { min-height: 44px; font-size: 12px; }
  .roll-table .customer-link { min-height: 44px; }
  .group-grid a { min-height: 88px; }
  .filters .button, .filters .search-field input { min-height: 44px; }
  .source-ribbon span { font-size: 12px; }
  .source-ribbon strong { font-size: 13px; }
  .business-totals li { grid-template-columns: 1fr; }
}

@media (max-width: 359px) {
  .segmented a { font-size: 12px; padding-inline: 8px; }
  .source-ribbon strong { font-size: 13px; }
  .summary-block .rentals-summary { grid-template-columns: 1fr; }
}

/* Floor of 11px for every label D1 sets smaller, and readable decorative text. */
.brand small, .workspace-caption, .eyebrow, .page-heading .eyebrow, .candidate-note, .candidate-note small,
.profile small, .nav-link small, .demo-pill { font-size: 12px; }
.notice, .notice p, .notice strong, .notice .text-button { font-size: 12px; }
td .badge, small .badge, .roll-table .badge, .badge, .count-badge { font-size: 12px; }
.rentals-summary small, small.small-muted { font-size: 12px; }
.topbar-divider { color: #6b7a88; }
@media (max-width: 760px) {
  .demo-pill, .eyebrow, .page-heading .eyebrow, .notice, .notice p, .notice strong { font-size: 12px; }
  .notice, .notice p, .notice strong { font-size: 12px; }
  td .badge, small .badge, .roll-table .badge, .badge { font-size: 12px; }
  .rentals-summary small, small.small-muted { font-size: 12px; }
}
.topbar-divider { color: #576878; }
.rentals-summary > div > small.small-muted, .summary-block small.small-muted { font-size: 12px; }
@media (max-width: 760px) {
  .rentals-summary > div > small.small-muted, .summary-block small.small-muted { font-size: 12px; }
}
.group-grid span { font-size: 13px; font-weight: 600; color: var(--ink); }

/* Second review: summary labels at tablet widths, detail-view text floor, phone card labels, back link target. */
@media (max-width: 980px) {
  .rentals-summary .micro-label { text-align: left; max-width: none; }
}
.details-list dt { font-size: 12px; }
.deposit-card p { font-size: 12px; line-height: 1.6; }
.roll-table td::before { font-size: 12px; }
.back-link { display: inline-flex; align-items: center; min-height: 32px; font-size: 12px; }
@media (max-width: 760px) {
  .roll-table td::before { font-size: 12px; }
  .back-link { min-height: 44px; }
}

/* A long badge inside the ribbon wraps instead of pushing the page wider than the screen. */
.source-ribbon .badge { white-space: normal; max-width: 100%; }

/* ---- Finding things: the search box, breadcrumbs, lease amounts, people, properties and units (October 8) --------------------------------- */

.topbar { height: auto; min-height: 76px; flex-wrap: wrap; row-gap: 8px; padding-block: 10px; }
.topbar-search { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; max-width: 460px; margin-inline: auto; }
.topbar-search .search-field { flex: 1; max-width: none; min-width: 0; min-height: 44px; padding-block: 0; border-color: #6f7d8a; }
.topbar-search .search-field input { font-size: 13px; min-height: 42px; }
.topbar-search .button { min-height: 44px; }

.back-link { margin-bottom: 8px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 0; margin: 0 0 16px; padding: 0; font-size: 12px; color: var(--muted); }
.breadcrumb li + li::before { content: "\203A"; margin: 0 8px; color: #576878; }
.breadcrumb a { color: var(--accent); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li[aria-current] { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* Rent and deposit as the two amounts written on a lease, each said to be exactly that. */
.money-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 12px; }
.money-card { margin: 0; padding: 20px 22px; }
.money-card h2 { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.money-card strong { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.money-card p { margin: 8px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.money-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 20px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.money-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }

/* Links inside tables and lists: named, coloured, underlined on hover. */
.roll-table td a:not(.customer-link):not(.button), .tenant-list a, .page-heading p a, .result-list a:not(.result-name), .result-more a, .notice a { color: var(--accent); }
.roll-table td a:not(.customer-link):not(.button):hover, .tenant-list a:hover, .page-heading p a:hover, .result-list a:hover, .result-more a:hover, .notice a:hover { text-decoration: underline; }
.roll-table td small a { display: inline-block; min-height: 24px; }
.cell-rule { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.details-list small.block { display: block; margin-top: 4px; font-weight: 400; }
.evidence-panel { margin-top: 20px; }

.result-list { list-style: none; margin: 0; padding: 0 22px 8px; }
.result-list li { display: grid; gap: 3px; padding: 12px 0; border-top: 1px solid var(--line); }
.result-list li:first-child { border-top: 0; }
.result-name { font-size: 14px; font-weight: 600; color: var(--ink); min-height: 24px; }
.result-name:hover { color: var(--accent); text-decoration: underline; }
.result-list small { font-size: 12px; line-height: 1.6; color: var(--muted); }
.result-more { margin: 0; padding: 4px 22px 18px; font-size: 12px; color: var(--muted); }

@media (max-width: 1200px) {
  .money-cards { gap: 14px; }
}

@media (max-width: 760px) {
  .topbar { min-height: 68px; padding-block: 8px; }
  .topbar-search { order: 3; flex: 1 1 100%; max-width: none; margin-inline: 0; }
  .money-cards { grid-template-columns: 1fr; }
  .money-card strong { font-size: 26px; }
  .result-list, .result-more { padding-inline: 18px; }
  .breadcrumb ol { margin-bottom: 12px; }
  .roll-table td small a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Links inside tables, lists and sentences are at least 24px tall (a comfortable target), and the search box is a full-size control. */
.roll-table td a:not(.customer-link):not(.button), .tenant-list a, .result-list a, .result-more a, .page-heading p a, .notice a, .breadcrumb a, .details-list a {
  display: inline-flex; align-items: center; min-height: 24px;
}
.roll-table td.money a { min-width: 32px; justify-content: flex-end; }
.breadcrumb li { display: inline-flex; align-items: center; min-height: 24px; }
.result-name { display: inline-flex; align-items: center; }
@media (max-width: 760px) {
  .topbar-search .search-field input, .topbar-search .button { min-height: 44px; }
  .roll-table td a:not(.customer-link):not(.button), .tenant-list a, .result-list a, .result-more a, .breadcrumb a, .details-list a { min-height: 44px; }
  .roll-table td.money a { justify-content: flex-start; }
  .breadcrumb li { min-height: 44px; }
}

/* Two cards side by side start on the same line; the second group of menu entries has room above its caption. */
.money-cards > .money-card { margin-top: 0; }
.back-link { margin-bottom: 4px; }

/* Long names (a property, a dock, a person, an unmatched ID-like string) wrap instead of widening the page. */
.roll-table td, .result-list li, .page-heading h1, .page-heading p, .breadcrumb li, .money-card, .tenant-list li { overflow-wrap: anywhere; }

/* ---- Lease ledger ------------------------------------------------------------------------------- */
.lease-tabs { padding: 0; margin: 4px 0 16px; }
.balance { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.balance.credit { color: var(--positive); }
.balance.unknown { color: var(--muted); font-size: 16px; font-weight: 600; }
.account-card { padding: 18px 22px; }
.account-card h2 { margin: 0 0 8px; }
.account-card p { margin: 8px 0 12px; }
.account-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.balance-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.balance-grid > div { min-width: 0; overflow-wrap: anywhere; }
.balance-grid small { display: block; margin-top: 6px; }
.statement { margin: 4px 22px 16px; }
.ledger-period { padding-top: 4px; }
.filters input[type="date"] { min-height: 44px; border: 1px solid #6f7d8a; border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 12px; padding: 0 10px; }
.dock-scope { margin-top: 10px; }
.account-table th.money, .account-table td.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.account-table td:nth-child(3) { min-width: 220px; }
.account-table tr.deposit-row td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.row-details { margin-top: 6px; font-size: 12px; }
.row-details > summary { cursor: pointer; color: var(--accent); min-height: 28px; display: inline-flex; align-items: center; }
.row-details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-details dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 6px 0 0; }
.row-details dt { color: var(--muted); }
.row-details dd { margin: 0; overflow-wrap: anywhere; }
.ribbon-details { margin-top: 6px; font-size: 12px; }
.ribbon-details > summary { cursor: pointer; color: var(--accent); min-height: 28px; display: inline-flex; align-items: center; }
.ribbon-details > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ribbon-details ul { margin: 6px 0; padding-left: 18px; }
.ribbon-details p { margin: 6px 0 0; }
.source-details { border-top: 0; }
.evidence-panel .source-details > summary { padding-block: 12px; }
.small-muted.block, small.block { display: block; }
@media (max-width: 980px) { .balance-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .statement { margin-inline: 18px; }
  .account-table td.money { white-space: normal; }
  .account-table td:nth-child(3) { min-width: 0; }
}
@media (max-width: 359px) { .balance-grid { grid-template-columns: 1fr; } }
.balance-grid .badge, .account-card .badge { white-space: normal; max-width: 100%; }
.deposit-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 24px; }
.account-table th { font-size: 12px; padding: 12px 18px; }
.account-table td { font-size: 12px; padding: 16px 18px; }
.account-table th:not(.money) { text-align: left; }
.account-table td:first-child, .account-table th:first-child { white-space: nowrap; }
.account-card { margin-bottom: 20px; }
@media (max-width: 760px) { .account-table td.money:empty { display: none; } }

/* ---- Business choice, sortable columns, shared customers (October 8, second UI pass) ------------------------------------------------ */

/* The business choice sits under the top bar on every page: all businesses, or one. Marina and Perry Park keep their own accent. */
.business-bar-wrap { background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 40px; }
.business-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; max-width: 1600px; margin: auto; }
.business-bar-label { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.business-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.business-choice { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 52px; min-width: 150px; padding: 8px 16px; border: 1px solid #6f7d8a; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.business-choice strong { font-size: 14px; }
.business-choice small { font-size: 12px; color: var(--muted); }
.business-choice:hover { background: var(--surface-muted); }
.business-choice.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.business-choice.selected strong { color: var(--accent-hover); }
.business-choice[data-site="MARINA"].selected { border-color: var(--marina); background: #eaf4f8; box-shadow: inset 0 0 0 1px var(--marina); }
.business-choice[data-site="MARINA"].selected strong { color: #1f5b73; }
.business-choice[data-site="PARK"].selected { border-color: var(--park); background: #eef5ee; box-shadow: inset 0 0 0 1px var(--park); }
.business-choice[data-site="PARK"].selected strong { color: #3d5a40; }
.business-choice.pending { border-style: dashed; }
.business-choice.pending.selected { border-color: #b57a1c; background: var(--warning-soft); box-shadow: inset 0 0 0 1px #b57a1c; }
.business-choice.pending.selected strong { color: var(--warning); }
.business-choice:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sortable column headings are links that look like headings: the active one carries an arrow, the others a faint pair. */
.roll-table th.sortable { padding: 0; }
.sort-link { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 12px 22px; color: var(--muted); text-transform: inherit; letter-spacing: inherit; font: inherit; }
.account-table .sort-link { padding: 12px 18px; }
.sort-link:hover { color: var(--ink); background: #eef2f5; }
.sort-link.active { color: var(--ink); }
.sort-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.roll-table th.money.sortable .sort-link { justify-content: flex-end; }
/* Client sort: a real button in every heading, same hit area as a sort link. The mark shows the direction. */
table[data-sortable="client"] th { padding: 0; }
.sort-button { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; padding: 12px 22px; border: 0; background: transparent; color: var(--muted); text-transform: inherit; letter-spacing: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.account-table .sort-button { padding: 12px 18px; }
th.num .sort-button, th.money .sort-button, .roll-table th.money .sort-button { justify-content: flex-end; }
.sort-button:hover { color: var(--ink); background: #eef2f5; }
.sort-button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
table[data-sortable="client"] th[aria-sort="ascending"] .sort-mark::before { content: "▲"; }
table[data-sortable="client"] th[aria-sort="descending"] .sort-mark::before { content: "▼"; }
table[data-sortable="client"] th[aria-sort="ascending"] .sort-mark,
table[data-sortable="client"] th[aria-sort="descending"] .sort-mark { opacity: 1; color: var(--accent); }
.sort-mark { font-size: 12px; line-height: 1; opacity: .55; }
.sort-link.active .sort-mark { opacity: 1; color: var(--accent); }
.roll-table th.money { text-align: right; }
.sort-note { margin: 0; padding: 0 22px 10px; font-size: 12px; color: var(--muted); }
.tab-count { margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: #e8edf2; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.segmented a.selected .tab-count { background: var(--accent-soft); color: var(--accent-hover); }

/* The phone layout has no column headings, so the same choices are a menu above the cards. */
.sort-menu { display: none; margin: 0 18px 12px; border: 1px solid #6f7d8a; border-radius: var(--radius-sm); background: var(--surface); }
.sort-menu > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 14px; font-size: 13px; font-weight: 600; color: var(--ink); }
.sort-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sort-menu ul { list-style: none; margin: 0; padding: 4px 14px 12px; display: grid; gap: 4px; }
.sort-menu li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; border-top: 1px solid var(--line); padding: 8px 0; font-size: 13px; }
.sort-menu li:first-child { border-top: 0; }
.sort-choices { display: flex; gap: 6px; }
.sort-choices button { font: inherit; background: var(--surface); cursor: pointer; }
.sort-choices a, .sort-choices button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--accent); font-size: 12px; }
.sort-choices a.selected, .sort-choices button.selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); font-weight: 600; }
@media (max-width: 760px) {
  .sort-menu { display: block; }
  .sort-note { padding-inline: 18px; }
  .business-bar-wrap { padding: 8px 16px; }
  .business-bar-label { flex: 1 1 100%; }
  .business-choices { width: 100%; }
  .business-choice { flex: 1 1 calc(50% - 8px); min-width: 0; }
}
@media (max-width: 359px) { .business-choice { flex: 1 1 100%; } }

/* A customer who belongs to more than one business: one section per business, each with its own counts and balances. */
.biz-line + .biz-line { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.biz-line.other-business { color: var(--muted); }
.biz-line strong { font-size: 12px; }
.shared-note { margin: 6px 0 0; max-width: 760px; line-height: 1.6; }
.search-scope { margin: 0 0 12px; }
.business-section { margin-top: 20px; }
.business-section[data-business="MARINA"] { border-top: 3px solid var(--marina); }
.business-section[data-business="PARK"] { border-top: 3px solid var(--park); }
.business-section[data-business="UNMAPPED"] { border-top: 3px dashed #b57a1c; }
.business-section .section-tiles { margin: 0 22px 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.business-section > .notice { margin: 0 22px 12px; }
@media (max-width: 760px) { .business-section .section-tiles { margin-inline: 18px; grid-template-columns: 1fr 1fr; } .business-section > .notice { margin-inline: 18px; } }

/* Phones: every disclosure is a 44px target. */
@media (max-width: 760px) {
  .ribbon-details > summary, .row-details > summary, .sort-menu > summary { min-height: 44px; }
}

/* A link in a cell or a sentence is at least 24px wide as well as tall, even when its text is two characters ("C-1"). */
.roll-table td a:not(.customer-link):not(.button), .tenant-list a, .result-list a, .result-more a, .page-heading p a, .notice a, .breadcrumb a, .details-list a, .search-scope a, .shared-note a, .sort-menu a { min-width: 24px; }
.search-scope a, .shared-note a { display: inline-flex; align-items: center; min-height: 24px; }
@media (max-width: 760px) { .search-scope a, .shared-note a { min-height: 44px; } }

.source-documents { margin-top: 20px; }
.source-documents-body { padding: 0 22px 20px; }
.source-documents td { overflow-wrap: anywhere; }
.source-documents td small { display: block; color: var(--muted); margin-top: 4px; }

/* ---- Compact shared header (October 9) ----------------------------------------------------------------------------------------------------
   One context row (business, dock) under a shorter top bar; a compact heading; the source line and the standing notices as one row of facts
   whose explanations fold under "Details"; smaller metric tiles; the tabs and the filter form in one row; phones keep the business and page
   context in view and fold the filters behind one "Filters" button. Nothing is removed from the page: every fact and sentence is still here. */
.topbar { min-height: 56px; padding-block: 6px; }
.topbar-search .search-field, .topbar-search .button { min-height: 36px; }
.topbar-search .search-field input { min-height: 34px; }
.topbar-search .search-field { padding-block: 0; }
.business-bar-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 6px 40px; }
.business-bar { flex: 0 1 auto; margin: 0; gap: 6px 12px; }
.business-choices { gap: 6px; }
.business-choice { flex-direction: row; align-items: baseline; gap: 6px; min-height: 36px; min-width: 0; padding: 4px 12px; }
.business-choice strong { font-size: 13px; }
.business-choice small { font-size: 12px; }
.dock-scope { margin: 0; align-items: center; gap: 8px; }
.dock-scope .filter-field { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; }
.dock-scope .filter-field select, .dock-scope .button { min-height: 36px; }
.scope-choice { margin: 0; font-size: 12px; color: var(--muted); }
#main { padding-top: 16px; }
.page-heading { margin-bottom: 10px; gap: 12px; align-items: center; }
.page-heading h1 { font-size: 22px; letter-spacing: -.4px; line-height: 1.25; }
.page-heading .eyebrow { margin-bottom: 2px; }
.page-heading p { margin-top: 2px; font-size: 12px; }
.back-link { margin-bottom: 0; }
.breadcrumb ol { margin-bottom: 6px; }
.lease-tabs { margin: 0 0 10px; }

/* The row of facts: the "Last updated" line, then each standing notice as a title plus a short fact. */
.facts-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px 8px; margin: 0 0 10px; }
.facts-row > .source-ribbon, .facts-row > .notice { margin: 0; }
.facts-row > .source-ribbon { flex: 1 1 360px; }
.facts-row > p.source-ribbon { display: flex; align-items: center; }
.source-ribbon { padding: 6px 12px; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 12px; }
.source-ribbon > svg { width: 16px; height: 16px; }
.source-ribbon > div { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
.source-ribbon > div > span, .source-ribbon > div > strong { display: inline; margin: 0; font-size: 12px; }
.source-ribbon .ribbon-details { margin: 0; display: inline-block; }
.notice { padding: 6px 12px; margin: 0 0 8px; gap: 8px; align-items: center; }
.addr-line { position: relative; display: block; }
.addr-suggest-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: 0 8px 18px rgba(16, 42, 67, .12); }
.addr-suggest-list[hidden] { display: none !important; }
.addr-suggest-list button { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 6px 10px; font: inherit; font-size: 13px; line-height: 1.3; cursor: pointer; }
.addr-suggest-list li:last-child button { border-bottom: 0; }
.addr-suggest-list button:hover, .addr-suggest-list button:focus { background: #f4f7fb; }
.addr-paste { display: inline-flex; align-items: center; margin-top: 4px; min-height: 28px !important; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--accent); font: inherit; font-size: 12px; line-height: 1.3; cursor: pointer; }
.notice + .panel, .facts-row + .panel, .notice + .facts-row { margin-top: 0; }
.notice > svg { width: 16px; height: 16px; }
.notice.compact { flex: 1 1 320px; }
.notice.compact .notice-body { min-width: 0; }
.notice.compact p { margin: 0; flex-basis: auto; }
.notice-more { font-size: 12px; }
.notice-more > summary { cursor: pointer; color: var(--accent); display: inline-flex; align-items: center; min-height: 24px; }
.notice-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notice-more p { margin: 4px 0 0; }

/* Metric tiles: the same figures, a third of the height. */
.summary-block, .rentals-summary { margin-bottom: 10px; }
.summary-scope { margin-bottom: 4px; }
.summary-block .rentals-summary { margin-bottom: 4px; }
.rentals-summary { gap: 10px 20px; padding: 2px 0; }
.rentals-summary strong { font-size: 18px; margin-top: 2px; }
.rentals-summary > div { padding-left: 16px; }
.rentals-summary .summary-label { font-size: 13px; margin-top: 4px; }
.rentals-summary small { margin-top: 2px; }
.business-totals { gap: 4px; margin-top: 4px; }
.business-totals strong { font-size: 14px; }
.summary-note { margin-top: 2px; }
.group-grid { gap: 8px; margin-bottom: 10px; }
.group-grid a { min-height: 56px; padding: 8px 12px; gap: 2px; }
.group-grid strong { font-size: 18px; }
.marina-summary { margin: 0 0 4px; }
[data-marina-summary] .panel-header { padding: 8px 16px 4px; }
[data-marina-summary] .rentals-summary { padding: 0 16px 8px; }

/* The panel's own heading, its note folded, and the tabs beside the filters. */
.panel-header, .panel-header.table-header { padding: 10px 16px 6px; }
.panel-header h2 { font-size: 15px; }
.panel-note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-note > summary { cursor: pointer; color: var(--accent); display: inline-flex; align-items: center; min-height: 24px; }
.panel-note > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.panel-note p, .panel-header .panel-note p.small-muted { display: block; margin: 4px 0 0; max-width: 760px; line-height: 1.6; }
.shared-note { margin: 0 0 8px; }
.panel-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 4px 16px 8px; }
.panel-controls .filter-row, .panel-controls .filter-panel { padding: 0; }
.panel-controls .filter-panel { flex: 1 1 420px; min-width: 0; }
.filters-toggle { display: none; }
.filters { gap: 8px; align-items: center; }
.filters .search-field, .filters .button, .filter-field select, .filters input[type="date"] { min-height: 36px; }
.filters .search-field input { min-height: 34px; }
.filter-field { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; }
.segmented a { min-height: 32px; }
.filter-row { padding: 0 16px 8px; }
.page-note { padding: 0 16px 6px; }
.sort-note { padding: 0 16px 6px; }

@media (max-width: 1200px) {
  .business-bar-wrap { padding-inline: 28px; }
}

@media (max-width: 760px) {
  .topbar { min-height: 56px; padding-block: 6px; }
  .topbar-search .search-field, .topbar-search .button { min-height: 44px; }
  .topbar-search .search-field input { min-height: 42px; }
  /* The business label is for assistive technology; the choices scroll sideways inside their own strip, so the page itself never does. */
  .business-bar-wrap { padding: 6px 12px; gap: 6px 12px; }
  .business-bar { width: 100%; flex-wrap: nowrap; }
  .business-bar-label { flex: 0 0 auto; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .business-choices { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .business-choice { flex: 0 0 auto; min-height: 44px; }
  .dock-scope { width: 100%; flex-wrap: wrap; }
  .dock-scope .filter-field { flex: 1 1 200px; }
  .dock-scope .filter-field select, .dock-scope .button { min-height: 44px; }
  .dock-scope .button { flex: 0 0 auto; }
  #main { padding: 12px 16px 24px; }
  .page-heading { margin-bottom: 8px; }
  .page-heading h1 { font-size: 20px; }
  .facts-row { gap: 6px; }
  .facts-row > .source-ribbon, .notice.compact { flex-basis: 100%; }
  .rentals-summary { gap: 10px 12px; }
  .rentals-summary strong { font-size: 17px; }
  .panel-controls { padding: 4px 12px 8px; }
  .panel-controls .filter-row { flex: 1 1 100%; }
  .filters-toggle { display: inline-flex; min-height: 44px; flex: 1 1 100%; }
  .panel-controls .filter-panel { display: none; flex-basis: 100%; }
  .panel-controls.filters-open .filter-panel { display: block; }
  .filter-field { flex-direction: column; align-items: stretch; gap: 4px; }
  .filters { align-items: stretch; }
  .filters .search-field, .filters .button, .filter-field select, .filters input[type="date"] { min-height: 44px; }
  .filters .search-field input { min-height: 42px; }
  .segmented a { min-height: 44px; }
  .notice-more > summary, .panel-note > summary, .ribbon-details > summary { min-height: 44px; }
  .filter-row, .page-note, .sort-note { padding-inline: 12px; }
}

/* Second pass: the eyebrow sits beside the title, the folded note beside the panel heading, and the tabs share their row with the filters. */
.page-heading > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.page-heading > div > p { flex-basis: 100%; }
.page-heading .eyebrow, .page-heading > div > .eyebrow { margin: 0; }
.panel-header.table-header > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; min-width: 0; }
.panel-header.table-header > div > p { flex-basis: 100%; margin: 0; }
.panel-note { margin: 0; }
.panel-controls .filter-panel { flex: 1 1 auto; }
.filters .search-field { flex: 1 1 180px; max-width: 340px; }
.filter-field select { max-width: 180px; }
.rentals-summary small, .rentals-summary .small-muted { line-height: 1.4; }
.facts-row, .summary-block, .rentals-summary { margin-bottom: 8px; }
@media (max-width: 760px) {
  .panel-header.table-header > div { gap: 2px 12px; }
  .filters .search-field { max-width: none; }
  .filter-field select { max-width: none; }
}

/* Third pass: tighter filter controls so a five-tab list keeps its tabs and filters on one line at 1440px; the summary tiles as a strip. */
.filters .search-field { flex: 1 1 160px; max-width: 280px; }
.filter-field select { max-width: 160px; }
.segmented a { padding: 4px 10px; }
.summary-block .rentals-summary { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.summary-block .rentals-summary > div { flex: 0 1 auto; max-width: 340px; border-left: 0; padding-left: 0; }
.summary-block .rentals-summary > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.business-totals li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.business-totals small { flex-basis: 100%; }
@media (max-width: 760px) {
  .summary-block .rentals-summary > div { flex: 1 1 calc(50% - 20px); max-width: none; }
  .summary-block .rentals-summary > div + div { border-left: 0; padding-left: 0; }
}

/* Fourth pass: the dock button sits on the row's baseline; phone search boxes keep their 44px input; per-business rent reads across, not down. */
.dock-scope .button { padding-block: 4px; }
.business-totals { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.business-totals li { flex: 0 1 auto; }
@media (max-width: 760px) {
  .filters .search-field input, .topbar-search .search-field input { min-height: 44px; }
  .filters .search-field, .topbar-search .search-field { min-height: 46px; }
  .business-totals li { flex-basis: 100%; }
}

/* Fifth pass: the "Last updated" line takes the whole width so its badges stay on one line; the per-business rent tile may grow; the paging and sort notes share a line. */
.facts-row > section.source-ribbon { flex-basis: 100%; }
.facts-row > p.source-ribbon { flex: 1 1 320px; }
.summary-block .rentals-summary > .rent-tile { max-width: none; }
.page-note, .sort-note { display: inline-block; }
.page-note + .sort-note { padding-left: 0; }
@media (max-width: 760px) { .page-note, .sort-note { display: block; } }
.summary-block .rentals-summary .micro-label { white-space: nowrap; }
@media (max-width: 760px) { .summary-block .rentals-summary .micro-label { white-space: normal; } }
.summary-block .rentals-summary > div { flex: 0 1 auto; }
.summary-block .rentals-summary > .rent-tile { flex: 1 1 320px; min-width: 0; }

/* ---- Service status (ADR-016, October 9): the slip page's status panel, the dock page's controls, the finder's status words ---- */
.service-status { display: block; color: var(--warning); font-weight: 600; }
.service-status.scheduled { color: var(--muted); font-weight: 500; }
.status-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 6px; font-size: 13px; }
.status-form { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfd; }
.status-form.inline { background: transparent; }
.status-form h3 { margin: 0 0 8px; font-size: 14px; }
.status-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 8px; }
.status-fields .filter-field { flex: 1 1 160px; max-width: 260px; }
.status-fields .filter-field input, .status-fields .filter-field select { min-height: 36px; border: 1px solid #6f7d8a; border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 12px; padding: 0 10px; max-width: none; width: 100%; box-sizing: border-box; }
.status-form .button { min-height: 36px; }
.form-error { margin: 4px 0 8px; min-height: 0; font-size: 12px; color: var(--danger); font-weight: 600; }
.form-error:empty { display: none; }
.confirm-step { margin-top: 6px; }
.confirm-step > summary { cursor: pointer; font-weight: 600; font-size: 13px; min-height: 24px; display: flex; align-items: center; }
.slip-review { margin: 8px 0 10px; padding: 0 0 0 18px; columns: 3 140px; font-size: 12px; }
.slip-review li { break-inside: avoid; }
.dock-entry { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dock-entry > p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; font-size: 13px; }
.status-flash { margin: 0 0 10px; }
.status-history td small { display: block; color: var(--muted); }
@media (max-width: 760px) {
  .status-fields .filter-field { flex: 1 1 100%; max-width: none; }
  .status-fields .filter-field input, .status-fields .filter-field select, .status-form .button { min-height: 44px; }
  .slip-review { columns: 2 120px; }
}
/* The occupancy report's five summary tiles sit in one row on wide screens, and its four facts share the facts row (ADR-016 added a tile pair and a notice). */
@media (min-width: 1200px) { .rentals-summary.marina-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); } .rentals-summary.marina-summary > div { padding-left: 12px; } }
@media (min-width: 761px) and (max-width: 1199px) { .rentals-summary.marina-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { [data-marina-summary] + .facts-row > .notice.compact { flex: 1 1 230px; } [data-marina-summary] + .facts-row > .source-ribbon { flex: 1 1 300px; } }

/* ---- Header follow-ups from the October 9 review of the compact header ---- */
@media (max-width: 760px) {
  .business-choices { padding: 3px; margin: -3px; scroll-padding-inline: 12px; }                         /* the focus ring fits inside the scroll strip */
  .notice.compact .notice-body { flex: 1 1 0; }                                                            /* the body stays beside its icon */
  .summary-block .rentals-summary > div, .summary-block .rentals-summary > .rent-tile { flex: 1 1 45%; min-width: 0; }   /* two tiles per row */
}
.page-note + .sort-note { padding-left: 12px; }
@media (min-width: 980px) { .page-note + .sort-note { padding-left: 0; } }                                 /* only when the two notes share a line */
.source-ribbon .ribbon-details > summary { display: inline-flex; align-items: center; min-height: 24px; }  /* a 24px target on desktop, 44px on phones (below) */
@media (max-width: 760px) { .source-ribbon .ribbon-details > summary { min-height: 44px; } }
.panel-header .small-muted.panel-fact { display: block; }                                                  /* a count that must stay visible at every width */
@media (max-width: 480px) {
  .business-choice { max-width: 76vw; }                                                                    /* a pill never wider than the strip: the chosen one can always be fully on screen */
  .business-choice small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* M3: Buildium-style polish (rail, tables, detail panels). Tokens unchanged. */
body { font-family: var(--font); -webkit-font-smoothing: antialiased; line-height: 1.5; }
h1 { letter-spacing: -0.01em; }
.sidebar { padding: 18px 12px 12px; }
.sidebar .brand { margin: 0 12px 16px; flex-shrink: 0; }
.sidebar #side-nav { flex-shrink: 0; }
.sidebar .nav-primary + .nav-section { border-top: 1px solid var(--nav-active); margin-top: 10px; padding-top: 10px; }
.sidebar .nav-section + .nav-section { margin-top: 2px; }
.sidebar .nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 6px; min-height: 36px; margin: 0; padding: 7px 12px; font-size: 13px; line-height: 1.5; transition: background 0.12s; }
.sidebar .nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #c98a1b; color: #1b1406; font-size: 12px; font-weight: 700; line-height: 1; flex: none; }
.sidebar .nav-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 7px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--nav-muted); cursor: pointer; list-style: none; }
.sidebar .nav-group > summary::-webkit-details-marker { display: none; }
.sidebar .nav-group > summary::after { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin-right: 3px; flex-shrink: 0; }
.sidebar .nav-group[open] > summary { color: #fff; }
.sidebar .nav-group[open] > summary::after { transform: rotate(45deg); }
.sidebar .nav-group > summary:hover { color: #fff; background: var(--nav-active); }
.sidebar .nav-group > summary:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sidebar .nav-group-links { margin: 0 0 4px 12px; border-left: 1px solid var(--nav-active); padding-left: 4px; }
.sidebar .sidebar-bottom { padding-top: 18px; }
.sidebar .profile { padding-top: 12px; }
.sidebar .profile > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.sidebar .nav-sub { display: block; margin: 8px 0 2px; padding: 0 12px; font-size: 12px; font-variant: all-small-caps; letter-spacing: .06em; line-height: 1.4; color: var(--nav-muted, rgba(255,255,255,.5)); }
.sidebar .nav-sub:first-child { margin-top: 2px; }
.sidebar .nav-link:hover { background: var(--nav-active); }
.sidebar .nav-link.active { background: var(--nav-active); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.sidebar .nav-link:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.nav-later { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--nav-muted); opacity: 0.6; cursor: default; font-size: 13px; }
.panel { border: 1px solid var(--line); box-shadow: 0 1px 2px #142c3d0d; }
.roll-table thead th { position: sticky; top: 0; background: var(--surface-muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.roll-table tbody tr:nth-child(even) { background: #fafbfc; }
.roll-table tbody tr:hover { background: var(--accent-soft); }
.roll-table td, .roll-table th { padding-block: 11px; }
.roll-table td a:not(.button) { color: var(--accent); font-weight: 600; text-decoration: none; }
.roll-table td a:not(.button):hover { text-decoration: underline; }
.table-scroll { max-height: 70vh; overflow: auto; }
.linked-files .panel-note { padding: 0 22px 16px; margin: 10px 0 0; }
.linked-files .button { min-height: 36px; }
.file-application { display: inline-flex; margin: 0; }
.file-application button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.badge .status-dot { flex: none; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 760px) { .table-scroll { max-height: none; } }

/* M4: dashboard cards, table tools, report pages */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 16px 0 20px; }
.kpi-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 1px 2px #142c3d0d; border-top: 3px solid var(--accent); }
.kpi-card.warn { border-top-color: #c98a1b; }
.kpi-card strong { display: block; font-size: 28px; line-height: 1.2; margin: 6px 0 2px; letter-spacing: -0.01em; }
.kpi-card small { color: var(--muted); }
.table-tools { display: flex; justify-content: flex-end; padding: 0 22px 8px; }
.table-tools .button { min-height: 34px; font-size: 12px; }
.report-page { background: var(--canvas); }
.report-sheet { max-width: 1100px; margin: 24px auto; padding: 28px 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.report-head h1 { margin: 4px 0; }
.report-head .eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); margin: 0; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.report-table td.num, .report-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.report-table tfoot th { border-top: 2px solid var(--ink); background: #fff; position: static; text-transform: none; color: var(--ink); font-size: 13px; }
.report-foot { margin-top: 18px; font-size: 12px; color: var(--muted); }
@media print {
  .report-actions, .sidebar, .topbar, .business-bar-wrap, .table-tools, .staff-back, .skip-link, .staff-nav-toggle { display: none !important; }
  .app-shell { display: block !important; min-height: 0 !important; }
  .app-shell .workspace { margin-left: 0 !important; }
  body.report-print #main { padding: 0 !important; max-width: none !important; }
  .report-sheet { border: 0; margin: 0; padding: 0; max-width: none; background: #fff; }
  .table-scroll { max-height: none; overflow: visible; }
  .roll-table thead th { position: static; background: #fff; }
  @page { size: landscape; margin: 0.5in; }
}
@media (max-width: 760px) {
  .app-shell > .sidebar { top: var(--staff-header-height, 112px); }
  .app-shell > .staff-nav-toggle:checked ~ .sidebar { display: flex; }
}

/* Portal "My insurance": certificate beside the key facts */
.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 1px 2px #142c3d0d; margin: 0 0 14px; }
.pv-card h2, .pv-card h3 { margin: 0 0 10px; font-size: 16px; }
.pv-status { border-top: 3px solid var(--accent); } .pv-status strong { display: block; font-size: 24px; margin: 4px 0; }
.pv-status.pv-ok { border-top-color: #2f8f5b; } .pv-status.pv-warn { border-top-color: #c98a1b; } .pv-status.pv-bad { border-top-color: #b3392f; }
.pv-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pv-viewer .pv-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pv-viewer .pv-bar h2 { margin: 0; }
.pv-doc { width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 8px; background: #f4f6f8; object-fit: contain; }
.pv-empty { display: grid; gap: 6px; padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; }
.pv-facts { margin: 0; display: grid; gap: 0; } .pv-fact { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); } .pv-fact:last-child { border-bottom: 0; }
.pv-fact dt { color: var(--muted); } .pv-fact dd { margin: 0; text-align: right; font-weight: 600; }
.pv-yes { color: #1f7a4a; } .pv-no { color: #b3392f; }
@media (max-width: 900px) { .pv-grid { grid-template-columns: 1fr; } .pv-doc { height: 520px; } }
.plain-list { margin: 0; padding-left: 18px; } .pv-card ul { margin: 0 0 8px; padding-left: 18px; }

/* Clickable KPI cards */
a.kpi-card { display: block; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
a.kpi-card:hover, a.kpi-card:focus-visible { box-shadow: 0 4px 14px #142c3d22; transform: translateY(-1px); }
a.kpi-card .kpi-open { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--accent); }
.dash-panel .panel-header { align-items: center; } .panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.roll-table.compact td, .roll-table.compact th { padding-top: 7px; padding-bottom: 7px; } .roll-table tbody tr:hover { background: #eef4fb; } .roll-table .num { text-align: right; }
.empty-state { display: grid; gap: 4px; padding: 28px 16px; text-align: center; color: var(--muted); }

/* Date ranges need an explicit submit; search and selection-only filters apply automatically. */
form[data-filters]:not(:has(input[type="date"])) button[type="submit"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chip-filter { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: #e8f0fb; color: #1d4f9c; font-size: 12px; text-decoration: none; border: 1px solid #c9dbf3; }
.chip-filter:hover, .chip-filter:focus-visible { background: #d6e5f9; }
.chip-reset { font-size: 12px; margin-left: 4px; }

.boat-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 16px; } .boat-cta .button { min-height: 44px; padding: 0 22px; font-size: 16px; }

/* Detail pages (slip, lease): facts grid and breadcrumb */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; margin: 0; padding: 18px 22px; }
.facts > div { min-width: 0; } .facts dt { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); } .facts dd { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.crumbs { margin: 0 0 12px; font-size: 14px; }

/* ---- Readability floor: nothing smaller than 12px, and 44px touch targets on phones and tablets ---- */
.filter-field, .group-grid span, .tenant-list small, .micro-label, .demo-pill, .badge, .count-badge, th, .roll-table th, .roll-table thead th, .roll-table td::before,
.account-table th, .business-bar-label, .sort-mark, .tab-count, .business-choice small, .profile small, .nav-link small, .sidebar .workspace-caption,
.report-head .eyebrow, .eyebrow, .page-heading .eyebrow, .notice, .notice p, .notice strong, td .badge, small .badge, .roll-table .badge { font-size: 12px; }
@media (max-width: 800px) {
  a.button, button, .button, summary, select, input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .nav-link, .nav-toggle, .staff-nav a, .sort-link, .pager a, .topbar-label, a.business-choice { min-height: 44px !important; }
  a.button, .button, .staff-nav a, .sort-link, .pager a, .nav-toggle, .topbar-label, a.business-choice { display: inline-flex; align-items: center; }
  a.business-choice { display: flex; }
  .sort-link { justify-content: flex-start; }
  label.filter-field { min-height: 44px; }
  .roll-table td a:not(.button), .roll-table td strong > a { display: inline-flex; align-items: center; min-height: 44px; }
  .roll-table td { font-size: 14px; }
  .roll-table td::before { font-size: 12px; }
}

/* ---- Form standard for the staff pages (create lease, e-sign, templates, price sheet, naming review, search bars) ----
   Labels sit above the control, controls are 44px tall and fill their column, the grid wraps from 3 columns to 1 on a phone. */
.staff-page .filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 16px; align-items: start; padding: 14px 20px; margin: 0; }
.staff-page .filters > p, .staff-page .filters > .wide, .staff-page .filters > .small-muted, .staff-page .filters > .panel-note { grid-column: 1 / -1; margin: 0; }
.staff-page .filters > .button, .staff-page .filters > button { justify-self: start; }
.staff-page .filter-field { display: flex; flex-direction: column; align-items: stretch; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 0; }
.staff-page .filter-field > span { text-align: left; }
.staff-page .filter-field input:not([type=checkbox]):not([type=radio]), .staff-page .filter-field select, .staff-page .filter-field textarea { width: 100%; min-height: 44px; padding: 8px 12px; font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid #b9c6d0; border-radius: 10px; box-sizing: border-box; }
.staff-page .filter-field textarea { min-height: 88px; }
.staff-page .filter-field input:focus-visible, .staff-page .filter-field select:focus-visible, .staff-page .filter-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.staff-page label.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.staff-page .filters .actions, .staff-page .actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 16px; }
@media (max-width: 800px) { .staff-page .filters > .button, .staff-page .filters > button { justify-self: stretch; } }

.staff-page .facet-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 16px; grid-column: 1 / -1; align-items: end; }

.staff-page .filters > .button, .staff-page .filters > button { align-self: end; }
.table-scroll { max-height: none !important; }
.csv-row { margin: 10px 0 0; } .boats .csv-row, .boats .panel-note { padding-inline: 0; }

@media (max-width: 760px) {
  .dash-panel .panel-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dash-panel .panel-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
  .dash-panel .panel-actions .button { flex: 1 1 auto; text-align: center; justify-content: center; }
  /* The column name sits above its value. A long header wraps instead of covering the next row. */
  .roll-table td, .roll-table tbody th, .roll-table tfoot th { display: block; float: none; }
  .roll-table td::before, .roll-table tbody th::before, .roll-table tfoot th::before { position: static; float: none; display: block; width: auto; margin: 0 0 1px; }
  .roll-table td:not([data-label])::before,
  .roll-table tbody th:not([data-label])::before,
  .roll-table tfoot th:not([data-label])::before,
  .roll-table td[data-label=""]::before,
  .roll-table tbody th[data-label=""]::before,
  .roll-table tfoot th[data-label=""]::before { content: none; display: none; }
}
@media (max-width: 800px) {
  main td a:not(.button), main dd a, main small a, main th a, main li > a, main summary, .topbar-label, .segmented > a, p.seg a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .filters > button.button, .filters > .button { white-space: normal; }
}
.business-choice small, #business-label, .business-bar-label { white-space: normal; overflow: visible; text-overflow: clip; }
.panel-note > .button, .panel-note > button, .panel-note form .button { max-width: 100%; white-space: normal; }
@media (max-width: 800px) {
  main td a:not(.button), td a:not(.button), dd a, small a, th a, li > a, .topbar-label, .segmented > a, p.seg a, form.filters > button.button, .filters > button { min-width: 44px !important; min-height: 44px !important; }
  small a, td a:not(.button) { display: inline-flex; align-items: center; }
  form.filters > label { min-height: 44px; display: flex; align-items: center; gap: 8px; }
}
.history li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
form.filters > button.button, .filters > .button, .filters > button { flex: none; width: auto; min-width: max-content !important; }
ul.plain li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }

/* =====================================================================================================================
   Slim header (48px): dashboard top bar and the staff pages' bar. One line on desktop, compact on phones.
   ===================================================================================================================== */
.orbit-mark { display: inline-block; position: relative; flex: none; width: 18px; height: 18px; border: 2px solid var(--accent); border-radius: 50%; box-sizing: border-box; margin-right: 6px; }
.orbit-mark::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.topbar { display: flex !important; align-items: center; flex-wrap: nowrap !important; gap: 10px; height: 48px; min-height: 48px !important; padding: 0 14px !important; row-gap: 0; position: sticky; top: 0; z-index: 30; }
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: none; }
.topbar-left > strong { font-size: 14px; font-weight: 600; white-space: nowrap; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; }
.topbar .topbar-label { min-height: 40px; font-weight: 700; }
.topbar-search { display: flex; flex: 1 1 200px; max-width: 340px; min-width: 0; margin: 0 !important; }
.topbar-search .search-field { min-height: 36px !important; flex: 1; }
.topbar-search .search-field input { min-height: 34px !important; font-size: 13px; }
.biz-slot { display: flex; align-items: center; gap: 8px; flex: none; }
.biz-pills { display: inline-flex; gap: 3px; padding: 3px; background: #eaeff4; border-radius: 999px; }
.biz-pill { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; min-width: 52px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; color: #334155; background: transparent; border: 0; }
.biz-pill:hover { background: #fff; text-decoration: none; }
.biz-pill.biz-all.selected { background: #334155; color: #fff; }
.biz-pill.biz-marina { color: #0e5f78; } .biz-pill.biz-marina.selected { background: #0e7490; color: #fff; }
.biz-pill.biz-park { color: #166534; } .biz-pill.biz-park.selected { background: #15803d; color: #fff; }
.biz-pill.biz-mac { color: #7c2d12; } .biz-pill.biz-mac.selected { background: #9a3412; color: #fff; }
.biz-pill.biz-unmapped { color: #8a4b00; } .biz-pill.biz-unmapped.selected { background: #b45309; color: #fff; }
.biz-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.portal-preview-banner { position: sticky; top: 0; z-index: 20; }
.biz-slot .dock-scope { display: flex; align-items: center; gap: 6px; padding: 0 !important; margin: 0 !important; border: 0; background: transparent; }
.biz-slot .dock-scope .filter-field { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; }
.biz-slot .dock-scope select { min-height: 36px !important; padding: 0 8px; max-width: 170px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.top-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.top-btn:hover { background: var(--accent-soft); text-decoration: none; } .top-btn svg { width: 16px; height: 16px; }
.top-avatar { width: 32px; height: 32px; font-size: 12px; }
.search-toggle { display: none; }
.business-bar-wrap { display: none !important; }
.workspace > main { padding-top: 12px !important; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 10px; }
.page-heading h1 { font-size: 20px; margin: 0; line-height: 1.2; } .page-heading > div > p { display: none; }
.page-heading .eyebrow { margin: 0 0 2px; }
.info-pop { position: relative; flex: none; }
.info-pop > summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--accent); }
.info-pop > summary::-webkit-details-marker { display: none; } .info-pop > summary svg { width: 22px; height: 22px; }
.info-pop > summary:hover, .info-pop[open] > summary { background: var(--accent-soft); } .info-pop > summary:focus-visible { outline: 2px solid var(--accent); }
.info-pop .info-body { position: absolute; right: 0; top: 44px; z-index: 40; width: min(460px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; display: grid; gap: 8px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 30, 50, .18); }
.info-pop .info-body > * { margin: 0 !important; }
.info-pop .info-body > p:first-child { display: block !important; }

/* Staff pages (server-rendered): one slim dark bar */
.staff-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; background: #102a43; color: #fff; }
.staff-bar .sb-brand { display: inline-flex; align-items: center; min-height: 40px; color: #fff; font-weight: 700; text-decoration: none; }
.staff-bar .orbit-mark { border-color: #7cc4ff; } .staff-bar .orbit-mark::after { background: #7cc4ff; }
.staff-bar .sb-title { flex: 1 1 auto; min-width: 0; margin: 0; padding-left: 14px; border-left: 1px solid #36546f; font-size: 15px; font-weight: 600; color: #d6e6f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-bar .staff-nav { margin: 0; flex: none; }
.staff-bar .nav-toggle { display: none; }
.staff-bar .nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.staff-bar .nav-links > a, .staff-bar .sb-more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 8px; color: #d6e6f5; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none; }
.staff-bar .sb-more > summary::-webkit-details-marker { display: none; } .staff-bar .sb-more > summary::after { content: "\25BE"; font-size: 11px; }
.staff-bar .nav-links > a:hover, .staff-bar .sb-more > summary:hover, .staff-bar .sb-more[open] > summary { background: #234a6b; color: #fff; text-decoration: none; }
.staff-bar a:focus-visible, .staff-bar summary:focus-visible, .staff-bar label:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.staff-bar svg { width: 16px; height: 16px; }
.staff-bar .sb-more { position: relative; }
.sb-account { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; min-width: 0; }
.sb-who { display: flex; align-items: baseline; gap: 6px; margin: 0; min-width: 0; line-height: 1.2; font-size: 12px; font-weight: 600; color: var(--ink, #1b2a38); }
.sb-email { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-who small { font-weight: 500; color: var(--muted, #5b6573); }
.sb-signout { margin: 0; display: flex; }
.sb-signout .button { min-height: 36px; padding: 0 12px; background: #fff; color: #102a43; border: 1px solid var(--line, #d7dde3); border-radius: 8px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.sb-signout .button:hover { background: #e8f1f8; }
.sb-signout .button:focus-visible { outline: 2px solid var(--accent, #1f6f8b); outline-offset: 2px; }
.staff-bar .sb-who, .ins-top .sb-who { color: #d6e6f5; }
.staff-bar .sb-who small, .ins-top .sb-who small { color: #b7d4ea; }
.staff-bar .sb-signout .button, .ins-top .sb-signout .button { border-color: #fff; }
.staff-bar .sb-signout .button:focus-visible, .ins-top .sb-signout .button:focus-visible { outline-color: #fff; }
.topbar-actions .sb-account { margin-left: 4px; }
.ins-top .sb-account { margin-left: auto; }
.filter-row .sb-account, .report-actions .sb-account { margin-left: auto; }
.staff-bar .sb-more > div { position: absolute; right: 0; top: 44px; min-width: 190px; display: grid; padding: 6px; background: #fff; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 30, 50, .25); z-index: 50; }
.staff-bar .sb-more > div a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; color: #1b2a38; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
.staff-bar .sb-more > div a:hover { background: #eef2f6; }
.staff-page { padding-top: 14px; }
/* A wide table scrolls inside its own box; it never pushes the page sideways (flex and grid children default to their content's width). */
.workspace, .workspace > main, .panel, .panel > *, .table-scroll { min-width: 0; }
.table-scroll { max-width: 100%; }
/* Tablets and small laptops: the business choices take their own row instead of pushing the bar past the screen edge. */
@media (min-width: 801px) and (max-width: 1180px) {
  .topbar { height: auto; flex-wrap: wrap !important; padding: 4px 14px !important; row-gap: 4px; }
  .biz-slot { order: 5; flex: 1 1 100%; }
  .biz-pills, .biz-pill { flex: 1; }
  .top-btn { width: 36px; padding: 0; justify-content: center; } .top-btn span { display: none; }
}
/* Phones: long button labels wrap instead of running off the screen. */
@media (max-width: 760px) {
  main .button, main button.button { max-width: 100%; height: auto; white-space: normal; text-align: center; }
}
/* Phone cards use the width: the first field (the name) is the card's title across the top, the rest sit two to a row. */
@media (min-width: 360px) and (max-width: 760px) {
  .roll-table tbody tr, .roll-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 10px 14px; }
  .roll-table tbody tr > :first-child:not([colspan]) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; font-size: 15px; font-weight: 600; }
  .roll-table tbody tr > :first-child:not([colspan])::before { margin: 0; }
  .roll-table tbody tr > :first-child:not([colspan]) > a, .roll-table tbody tr > :first-child:not([colspan]) > a strong { font-size: 15px; }
  .roll-table tbody tr > [colspan], .roll-table tfoot tr > [colspan], .roll-table tr[data-sort-lock] > * { grid-column: 1 / -1; }
  .roll-table tbody td, .roll-table tbody th, .roll-table tfoot td, .roll-table tfoot th { padding: 2px 0 4px; }
  .staff-page .roll-table td.num, .roll-table td.money { text-align: left; }
}
@media (max-width: 800px) {
  .topbar { height: auto; flex-wrap: wrap !important; padding: 4px 10px !important; row-gap: 4px; }
  .topbar-left > strong { display: none; }
  .topbar-search { display: none; order: 6; flex: 1 1 100%; max-width: none; }
  .topbar.search-open .topbar-search { display: flex; }
  .search-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; }
  .top-btn { width: 40px; min-height: 40px; padding: 0; justify-content: center; } .top-btn span { display: none; }
  .biz-slot { order: 5; flex: 1 1 100%; justify-content: space-between; padding-bottom: 2px; }
  .biz-pill { min-height: 40px; flex: 1; }
  .biz-pills { flex: 1; }
  .biz-slot .dock-scope .filter-field > span { display: none; }
  .biz-slot .dock-scope select { min-height: 40px !important; max-width: 140px; }
  .page-heading h1 { font-size: 18px; }
  .staff-bar { height: auto; min-height: 48px; flex-wrap: wrap; padding: 4px 10px; gap: 8px; position: sticky; }
  .staff-bar .sb-brand { order: 1; }
  .staff-bar .sb-title { order: 2; border: 0; padding: 0; font-size: 14px; flex: 1 1 auto; }
  .staff-bar .sb-account { order: 3; }
  .staff-bar .staff-nav { order: 4; }
  .staff-bar .sb-signout .button, .ins-top .sb-signout .button, .topbar .sb-signout .button { min-height: 44px !important; padding: 0 14px; }
  .staff-bar .nav-toggle { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #36546f; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
  .staff-bar .staff-nav { position: static; }
  .staff-bar .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 10px 12px; background: #102a43; box-shadow: 0 12px 24px rgba(0, 0, 0, .25); }
  .staff-bar #staff-nav-toggle:checked ~ .nav-links { display: flex; }
  .staff-bar #staff-nav-toggle:focus-visible ~ .nav-toggle { outline: 2px solid #fff; }
  .staff-bar .nav-links > a, .staff-bar .sb-more > summary { min-height: 44px; font-size: 15px; }
  .staff-bar .sb-more > div { position: static; box-shadow: none; background: transparent; padding: 0 0 0 12px; } .staff-bar .sb-more > div a { color: #d6e6f5; } .staff-bar .sb-more > div a:hover { background: #234a6b; }
}
/* Insurance pages: same slim bar, no descriptive sub-line */
.ins-top-in { min-height: 48px !important; gap: 12px !important; }
.ins-head > div > p { display: none; }
.ins-head .ins-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.mode-chip { padding: 4px 10px; border-radius: 999px; background: #fff4d6; color: #7a4b00; font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) { .mode-chip { display: none; } }
.slip-head .panel-header { flex-wrap: wrap; gap: 8px; } .slip-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.slip-act { display: inline-block; } .slip-act > summary { list-style: none; cursor: pointer; } .slip-act > summary::-webkit-details-marker { display: none; }
.slip-act[open] { display: block; flex: 1 1 100%; } .slip-form { display: grid; gap: 8px; padding: 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 520px; }
.slip-form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border: 0; background: transparent; padding: 10px 0 0; max-width: none; } .slip-form textarea { width: 100%; }
.warn-line { color: #7a4b00; background: #fff4d6; border-radius: 8px; padding: 8px 12px; } .notice-line { background: #e8f5ec; border-radius: 8px; padding: 8px 12px; margin: 8px 0; }
.timeline { list-style: none; margin: 0; padding: 4px 16px 12px; display: grid; gap: 8px; } .timeline li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-left: 12px; border-left: 3px solid var(--line); }
tr[data-row-href] { cursor: pointer; } tr[data-row-href]:hover td { background: var(--accent-soft); }
tr.click-row { position: relative; }
a.row-stretch { color: inherit; text-decoration: none; }
a.row-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* Controls sit above the whole-row link. A label, form or <details> (the register's Add memo editor) and the memo cell are controls too, so a click
   inside them never opens the row (Chris t2206u). */
tr.click-row a:not(.row-stretch), tr.click-row button, tr.click-row input, tr.click-row select, tr.click-row textarea, tr.click-row summary,
tr.click-row label, tr.click-row form, tr.click-row details, tr.click-row .memo-cell { position: relative; z-index: 2; }
a.row-stretch:focus-visible::after { outline: 2px solid var(--accent, #1d4e89); outline-offset: -2px; }

/* Bank register (Chris, Oct close): a row is one or two lines (about 56px) and the table fits 1440px with no sideways scroll. The memo cell
   shows its status and ONE Accept button; the reasoning, other memos and the form open under Add memo. Date, Type and money never wrap
   mid-word; Payee is one line with an ellipsis (whole name in its tooltip). Inside its own scroll area the header stays put, Select stays at
   the left edge and Amount at the right while a narrower window scrolls sideways. Phones keep the stacked cards (above). */
.bank-register .memo-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.bank-register .memo-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; max-width: 100%; }
.bank-register details.memo-edit[open] { flex: 1 1 100%; }
.bank-register .memo-clip, .bank-register .cell-clip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.bank-register .memo-line .memo-clip { max-width: 22rem; }
.bank-register .memo-chips, .bank-register .memo-accept-one { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
.bank-register .memo-accept-one .button { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.bank-register details.memo-edit > summary { display: inline-flex; align-items: center; min-height: 24px; cursor: pointer; color: var(--accent); font-size: 12px; font-weight: 600; }
.bank-register details.memo-edit[open] { padding: 6px 0 4px; }
.bank-register details.memo-edit[open] > .memo-suggest, .bank-register details.memo-edit[open] > .memo-chips { margin: 4px 0; }
.bank-register .conf-icon { padding: 1px 6px; margin-right: 2px; }
@media (min-width: 761px) {
  .bank-register .table-scroll { max-height: calc(100vh - 140px) !important; overflow: auto; }
  .bank-register .roll-table { width: 100%; }
  .bank-register .roll-table td { overflow-wrap: normal; word-break: normal; vertical-align: middle; }
  .bank-register .roll-table thead th { z-index: 4; }
  .bank-register td[data-label="Date"], .bank-register td[data-label="Type"], .bank-register td[data-label="Amount"], .bank-register td[data-label="Running balance"],
  .bank-register td[data-label="Running total"], .bank-register td[data-label="Imported balance"], .bank-register td[data-label="Check no."], .bank-register td[data-label="GL"] { white-space: nowrap; }
  .bank-register td[data-label="Payee"] { min-width: 140px; max-width: 220px; }
  .bank-register td[data-label="Card / cardholder"] { min-width: 150px; max-width: 230px; white-space: nowrap; }
  .bank-register td[data-label="Card / cardholder"] .cell-clip { max-width: calc(100% - 34px); }
  .bank-register td[data-label="Memo"] { min-width: 220px; max-width: 26rem; }
  .bank-register td[data-label="Customer payments"] { max-width: 9rem; }
  .bank-register td[data-label="Select"], .bank-register thead th:first-child:has(a[href*="sort=select"]) { position: sticky; left: 0; z-index: 3; background: var(--surface, #fff); }
  .bank-register td[data-label="Amount"] { position: sticky; right: 0; z-index: 3; background: var(--surface, #fff); }
  .bank-register thead th:first-child:has(a[href*="sort=select"]) { z-index: 5; background: var(--surface-muted); }
  .bank-register tbody tr:nth-child(even) td[data-label="Select"], .bank-register tbody tr:nth-child(even) td[data-label="Amount"] { background: #fafbfc; }
  .bank-register tbody tr:hover td[data-label="Select"], .bank-register tbody tr:hover td[data-label="Amount"] { background: var(--accent-soft); }
}

/* Unified front door. Scoped so staff pages keep their own type and spacing. */
body.landing { margin: 0; background: #fafbfd; color: #243b58; font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
body.landing #main.orbit-shell { min-height: 100svh; display: grid; grid-template-columns: 55% 45%; gap: 0; padding: 12px; margin: 0; max-width: none; width: auto; box-sizing: border-box; }
body.landing .brand-panel { position: relative; isolation: isolate; display: flex; flex-direction: column; min-height: 820px; overflow: hidden; border-radius: 12px; color: #f3f7ff; background: radial-gradient(ellipse at 70% 57%, #254c78 0%, #17395f 34%, #102d50 64%, #0b2343 100%); }
body.landing .brand-panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .045; z-index: 5; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
body.landing .brand-header { display: flex; justify-content: space-between; align-items: center; padding: 35px 43px 0; position: relative; z-index: 2; }
body.landing .orbit-logo { display: flex; align-items: center; gap: 8px; color: #f6f6ea; text-decoration: none; }
body.landing .orbit-logo > span { font-size: 39px; letter-spacing: -2.3px; line-height: 1; font-weight: 580; }
body.landing .logo-mark { width: 37px; height: 37px; stroke-width: 1.3; }
body.landing .logo-period, body.landing .heading-period { color: #a7d5ff; }
body.landing .brand-edition { font-size: 8px; letter-spacing: 1.55px; color: #b1c8df; padding-top: 6px; }
body.landing .brand-intro { position: relative; z-index: 2; padding: 48px 47px 0; }
body.landing .eyebrow { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 9px; letter-spacing: 2.05px; color: #c2d9f0; font-weight: 500; }
body.landing .eyebrow > span { width: 5px; height: 5px; background: #a7d5ff; border-radius: 50%; flex: none; }
body.landing .brand-panel h1 { margin: 24px 0 19px; font-weight: 450; font-size: clamp(40px, 4.1vw, 62px); line-height: 1.09; letter-spacing: -2.9px; color: #f3f7ff; }
body.landing .brand-intro > p { margin: 0; font-size: 13px; color: #b1c8df; line-height: 1.9; letter-spacing: .1px; }
body.landing .lake-scene { position: relative; min-height: 370px; flex: 1; margin-top: -8px; overflow: hidden; }
body.landing .lake-plane { position: absolute; height: 100%; width: auto; left: 50%; top: 0; aspect-ratio: 960 / 752; transform: translateX(-50%) rotate(-9deg) scale(.95, .86); }
body.landing .lake-svg { display: block; width: 100%; height: 100%; opacity: .95; filter: drop-shadow(0 2px 0 #86bced) drop-shadow(0 5px 0 #0b2343) drop-shadow(0 8px 0 #244e78) drop-shadow(0 20px 15px #03132d); }
body.landing .map-grid { position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(#8fb8e0 1px, transparent 1px), linear-gradient(90deg, #8fb8e0 1px, transparent 1px); background-size: 62px 62px; transform: rotate(-9deg) scale(1.5, .8); mask-image: radial-gradient(ellipse, black, transparent 65%); }
body.landing .terrain-lines { position: absolute; width: 700px; height: 460px; left: -230px; top: -100px; transform: rotate(-28deg); opacity: .25; }
body.landing .terrain-lines i { position: absolute; inset: 0; border: 1px solid #769bc2; border-radius: 46% 54% 39% 61%; }
body.landing .terrain-lines i:nth-child(2) { inset: 13px; }
body.landing .terrain-lines i:nth-child(3) { inset: 27px; }
body.landing .terrain-lines i:nth-child(4) { inset: 42px; }
body.landing .terrain-lines i:nth-child(5) { inset: 58px; }
body.landing .terrain-lines i:nth-child(6) { inset: 75px; }
body.landing .map-state { position: absolute; font-size: 8px; letter-spacing: 3px; color: #9bbbdc; transform: rotate(9deg); opacity: .68; }
body.landing .oklahoma { left: 32%; top: 19%; }
body.landing .texas { left: 22%; top: 71%; }
body.landing .lake-name { position: absolute; top: 49%; right: 14%; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-style: italic; letter-spacing: 1px; color: #bfddfa; transform: rotate(9deg); text-shadow: 0 2px 8px #102d50; }
body.landing .location-marker { position: absolute; top: 57.45%; left: 42.7%; width: 30px; height: 30px; transform: translate(-50%, -50%) rotate(9deg) scaleY(1.2); color: #254b76; }
body.landing .pin-core { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #e5f2ff; border: 4px solid #6c9aca; box-shadow: 0 0 22px #a7d5ff44; }
body.landing .icon-anchor { width: 15px; height: 15px; }
body.landing .pin-pulse { position: absolute; inset: -9px; border: 1px solid #a7d5ff6b; border-radius: 50%; animation: landing-beacon 4s ease-out infinite; }
@keyframes landing-beacon { 0% { transform: scale(.65); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }
body.landing .location-callout { position: absolute; bottom: 50px; left: -31px; width: 218px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 15px 16px; background: #edf5fff5; color: #244364; border: 1px solid #f4f8ff; border-radius: 7px; box-shadow: 0 6px 30px #011d2b44; text-align: left; }
body.landing .location-callout::after { content: ""; position: absolute; left: 40px; top: 100%; height: 20px; width: 1px; background: #c4dfff; }
body.landing .location-eyebrow { font-size: 7px; letter-spacing: 1.6px; color: #6583a3; }
body.landing .location-callout strong { font-size: 12px; font-weight: 600; }
body.landing .perry-map-name { display: flex; width: 100%; }
body.landing .map-compass { position: absolute; bottom: 30px; right: 40px; display: flex; flex-direction: column; align-items: center; gap: 5px; color: #a9c8e7; font-size: 8px; }
body.landing .icon-compass { width: 30px; height: 30px; stroke-width: 1; }
body.landing .map-caption { position: absolute; bottom: 19px; left: 46px; display: flex; align-items: center; gap: 7px; font-size: 9px; color: #a9c8e7; }
body.landing .icon-pin { width: 12px; height: 12px; }
body.landing .lake-facts { margin: 0 43px 22px; position: relative; z-index: 2; }
body.landing .lake-facts dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding-top: 20px; border-top: 1px solid #9bbbdc26; }
body.landing .lake-facts dl > div { display: flex; flex-direction: column-reverse; gap: 6px; }
body.landing .lake-facts dd { margin: 0; font-size: clamp(24px, 2.6vw, 36px); font-weight: 450; letter-spacing: -1.2px; line-height: 1; color: #edf6ff; }
body.landing .lake-facts dd span { font-size: 9px; letter-spacing: 0; margin-left: 7px; color: #9cc8f4; }
body.landing .lake-facts dt { font-size: 9px; color: #b4cde5; }
body.landing .lake-facts p { margin-top: 17px; font-size: 9px; color: #b4cde5; line-height: 1.8; }
body.landing .lake-facts p > span { display: block; font-size: 7px; color: #96b2cf; }
body.landing .lake-facts a { margin-left: 8px; color: #edf6ff; text-decoration: underline; text-underline-offset: 3px; }
body.landing .brand-footer { margin: 0 43px; padding: 25px 0 28px; display: flex; align-items: center; justify-content: center; gap: 23px; border-top: 1px solid #9bbbdc26; position: relative; z-index: 2; }
body.landing .destination { display: flex; align-items: center; gap: 10px; color: #dae9fa; }
body.landing .destination div { display: flex; flex-direction: column; gap: 5px; }
body.landing .destination strong { font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 500; letter-spacing: -.3px; }
body.landing .destination span { font-size: 6px; letter-spacing: 2.1px; color: #a9c8e7; }
body.landing .destination-divider { height: 28px; width: 1px; background: #9bbbdc35; flex: none; }
body.landing .marina-logo { width: 168px; flex-shrink: 0; padding: 6px 10px; border-radius: 10px; background: #fff; box-shadow: 0 3px 12px #03132d20; }
body.landing .marina-logo img { display: block; width: 100%; height: auto; }
body.landing .perry-logo { display: block; width: 46px; height: 46px; overflow: hidden; border-radius: 50%; background: #f4f7fc; flex-shrink: 0; }
body.landing .perry-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.landing .login-panel { display: flex; flex-direction: column; padding: 31px 42px 14px; min-width: 0; background: transparent; color: #243b58; box-shadow: none; }
body.landing .login-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body.landing .workspace-label { display: flex; align-items: center; gap: 7px; font-size: 7px; letter-spacing: 1.3px; color: #647b95; font-weight: 500; }
body.landing .workspace-label > span { width: 5px; height: 5px; border-radius: 50%; background: #588dc0; flex: none; }
body.landing .help-link { display: flex; gap: 6px; align-items: center; border: 0; background: none; font-size: 10px; color: #647b95; text-decoration: none; }
body.landing .icon-up { width: 13px; height: 13px; }
body.landing .login-center { width: 100%; max-width: 352px; margin: 0 auto auto; padding: 40px 0; }
body.landing .login-heading h2 { font-size: 34px; letter-spacing: -1.25px; line-height: 1.2; font-weight: 500; margin: 0; color: #243b58; }
body.landing .login-heading p { font-size: 12px; color: #76869b; margin-top: 11px; }
body.landing .notice { background: #eef4fc; color: #243b58; border: 1px solid #d5e3f2; border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; text-align: left; font-size: 13px; }
body.landing .notice.warning { background: #fff6e8; border-color: #f0d7a8; color: #6a4a12; }
body.landing .google-block { margin-top: 28px; }
body.landing .team-hint { margin: 0 0 10px; color: #243b58; font-size: 14px; font-weight: 600; }
body.landing .login-submit, body.landing .alternative-method { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; box-sizing: border-box; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
body.landing .login-submit { height: 48px; min-height: 48px; }
/* Sign in with Google: Google's dark-theme button (fill #131314, border #8E918F, text #E3E3E3, the G on a white circle), so the staff way in outranks the customer form. Also on the plain pages in pages.mjs. */
a.login-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 400px; box-sizing: border-box; height: 54px; min-height: 54px; padding: 0 16px; border: 1px solid #8e918f; border-radius: 8px; background: #131314; color: #e3e3e3; font-family: Roboto, "Segoe UI", Arial, sans-serif; font-size: 15px; font-weight: 500; letter-spacing: .1px; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px #1313144d, 0 4px 14px #13131433; }
a.login-google:hover { background: #2a2a2c; color: #fff; text-decoration: none; box-shadow: 0 2px 4px #1313144d, 0 8px 20px #13131440; }
a.login-google:focus-visible, body.landing a.login-google:focus-visible { outline: 3px solid #245b99; outline-offset: 3px; }
.login-google .google-g { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.login-google .google-g-mark { display: block; width: 18px; height: 18px; }
.hosted-page .login-google { margin-top: 18px; }
body.landing .field-sep { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: #4f6580; font-size: 13px; font-weight: 500; text-align: center; }
body.landing .field-sep::before, body.landing .field-sep::after { content: ""; flex: 1; min-width: 24px; height: 1px; background: #dfe6ee; }
body.landing .landing-form { display: none; gap: 20px; margin: 0; }
body.landing .filter-field { display: grid; gap: 6px; margin: 0; color: #243b58; font-size: 14px; font-weight: 500; }
body.landing .password-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
body.landing .landing-form input { width: 100%; box-sizing: border-box; height: 48px; min-height: 48px; border: 1px solid #d8e1ec; border-radius: 8px; background: #fff; color: #243b58; font-size: 16px; font-weight: 400; padding: 0 14px; }
body.landing .text-link { color: #426c99; font-size: 11px; font-weight: 500; background: none; border: 0; padding: 0; text-decoration: none; cursor: pointer; }
body.landing .text-link:hover, body.landing .help-link:hover { text-decoration: underline; text-underline-offset: 4px; }
body.landing .login-submit { border: 0; background: #245b99; color: #fff; }
body.landing .login-submit:hover { background: #1d4e84; }
/* The customer password and e-mail-link submits sit under the Google button, so they are quieter. The reset form has no Google button and keeps the solid one. */
body.landing .panel-password .login-submit, body.landing .panel-email .login-submit { border: 1px solid #9fbadb; background: #eaf1fa; color: #1d4e84; font-weight: 600; }
body.landing .panel-password .login-submit:hover, body.landing .panel-email .login-submit:hover { background: #dce8f6; border-color: #7fa3cd; }
body.landing .login-submit .icon, body.landing .alternative-method .icon { width: 16px; height: 16px; }
body.landing .alternative-method { height: 44px; min-height: 44px; border: 0; background: transparent; color: #426c99; }
body.landing .alternative-method:hover { background: #f0f4f9; }
/* The password form shows first (the e-mail form after a link was sent). "Email me a link" and "Use a password" are ordinary in-page links, so Tab and Enter reach them and both forms stay usable with no CSS. */
body.landing .login-center:not(.start-email) .panel-password,
body.landing .login-center.start-email .panel-email,
body.landing .login-center .landing-form:target { display: grid; }
body.landing .login-center:has(.landing-form:target) .landing-form:not(:target) { display: none; }
body.landing .unified-note { display: flex; gap: 12px; align-items: center; justify-content: center; border-top: 1px solid #dfe7f0; margin-top: 24px; padding-top: 26px; color: #678cb3; }
body.landing .icon-shield { width: 19px; height: 19px; stroke-width: 1.4; flex: none; }
body.landing .unified-note p { margin: 0; font-size: 11px; color: #607894; line-height: 1.8; }
body.landing .unified-note p span { display: block; font-size: 9px; color: #8191a5; }
body.landing .account-help { text-align: center; font-size: 10px; color: #76869b; line-height: 1.9; margin-top: 25px; }
body.landing .account-help .text-link { font-size: 10px; }
body.landing .login-footer { display: flex; align-items: center; justify-content: space-between; color: #8191a5; font-size: 9px; margin-top: auto; }
body.landing .login-footer > span:last-child { display: flex; align-items: center; gap: 5px; font-size: 7px; letter-spacing: 1px; }
body.landing .icon-lock { width: 11px; height: 11px; }
body.landing button:focus-visible, body.landing a:focus-visible, body.landing input:focus-visible, body.landing label:focus-visible { outline: 2px solid #83bfff; outline-offset: 3px; }
/* The pale ring suits the dark brand panel; on the light sign-in side it is too faint (1.87:1), so the controls there use #245b99 (6.7:1, WCAG 1.4.11). */
body.landing .login-panel button:focus-visible, body.landing .login-panel a:focus-visible, body.landing .login-panel input:focus-visible, body.landing .login-panel label:focus-visible { outline-color: #245b99; }
@media (min-width: 1500px) {
  body.landing .brand-panel { min-height: calc(100svh - 24px); }
  body.landing .brand-intro { padding-top: 80px; }
  body.landing .lake-scene { min-height: 440px; }
  body.landing .login-center { max-width: 380px; }
}
@media (max-width: 1100px) {
  body.landing #main.orbit-shell { grid-template-columns: 52% 48%; }
  body.landing .brand-header { padding: 30px 28px 0; }
  body.landing .brand-edition { display: none; }
  body.landing .brand-intro { padding: 48px 30px 0; }
  body.landing .brand-panel h1 { font-size: 43px; }
  body.landing .brand-intro > p { font-size: 11px; }
  body.landing .brand-footer { margin: 0 28px; gap: 15px; }
  body.landing .destination strong { font-size: 18px; }
  body.landing .login-panel { padding: 31px 32px 14px; }
  body.landing .workspace-label { font-size: 6px; }
  body.landing .map-caption { left: 28px; font-size: 8px; }
  body.landing .lake-name { font-size: 19px; }
  body.landing .location-callout { width: 200px; }
  body.landing .lake-facts { margin-inline: 28px; }
  body.landing .lake-facts dt { font-size: 8px; }
}
@media (max-width: 760px) {
  body.landing #main.orbit-shell { display: flex; flex-direction: column; padding: 8px; }
  /* The hero is a short strip so the sign-in form, and any failed sign-in message, is in the first screen on a phone. */
  body.landing .brand-panel { min-height: 0; }
  body.landing .brand-header { padding: 8px 16px 0; }
  body.landing .orbit-logo > span { font-size: 28px; }
  body.landing .logo-mark { width: 28px; height: 28px; }
  body.landing .brand-edition, body.landing .brand-intro .eyebrow, body.landing .brand-intro > p, body.landing .brand-panel h1 br, body.landing .lake-scene, body.landing .lake-facts, body.landing .brand-footer { display: none; }
  body.landing .brand-intro { padding: 0 16px 10px; }
  body.landing .brand-panel h1 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
  body.landing .login-panel { padding: 12px 8px 15px; }
  body.landing .login-topline { max-width: 400px; width: 100%; margin: auto; }
  body.landing .login-center { padding: 8px 0 24px; max-width: 400px; }
  body.landing .login-heading h2 { font-size: 24px; }
  body.landing .login-heading p { margin: 2px 0 0; font-size: 12px; }
  body.landing .login-submit { height: 46px; min-height: 46px; }
  body.landing .login-footer { margin-top: 10px; }
  body.landing .google-block { margin-top: 12px; }
  body.landing .field-sep { margin: 14px 0 10px; }
  body.landing .landing-form { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body.landing .pin-pulse { animation: none; }
}

/* ===== Staff form standard (one grid for every staff form and filter bar) ===== */
.staff-page .panel > form, .staff-page .panel > .filters, .staff-page .panel > .notice, .staff-page .panel > details, .staff-page .panel > p, .staff-page .panel > ul, .staff-page .panel > dl, .staff-page .panel > .facts, .staff-page .panel > .empty-state, .staff-page .panel > .meta-line, .staff-page .panel > .slip-form { margin-left: 20px; margin-right: 20px; }
.staff-page .panel > form:last-child, .staff-page .panel > .filters:last-child, .staff-page .panel > p:last-child { margin-bottom: 18px; }
.staff-page .panel > .panel-header + form, .staff-page .panel > .panel-header + .filters { margin-top: 6px; }
.staff-page .filters, .staff-page .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; align-items: end; }
.staff-page .filters > *, .staff-page .form-grid > * { min-width: 0; }
.staff-page .filter-field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; color: var(--muted); }
.staff-page .filter-field input:not([type=checkbox]):not([type=radio]), .staff-page .filter-field select, .staff-page .filter-field textarea { width: 100%; max-width: none; box-sizing: border-box; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); font-size: 14px; padding: 8px 10px; font-family: inherit; }
.staff-page .filter-field textarea { min-height: 84px; resize: vertical; }
.staff-page .filter-field input:focus-visible, .staff-page .filter-field select:focus-visible, .staff-page .filter-field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.staff-page .filter-field > input[type=search] + select { margin-top: 6px; }
.staff-page .filters .wide, .staff-page .form-grid .wide, .staff-page .facet-bar { grid-column: 1 / -1; }
.staff-page .facet-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 18px; align-items: end; }
.staff-page .form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; grid-column: 1 / -1; }
.staff-page .filters > .button, .staff-page .filters > button, .staff-page .filter-field + .button { align-self: end; }
.staff-page .filter-field > .button { margin-top: 8px; align-self: flex-start; }
.staff-page .lease-this .filters { grid-template-columns: 220px minmax(260px, 1fr) auto; }
@media (max-width: 760px) { .staff-page .filters, .staff-page .form-grid, .staff-page .lease-this .filters { grid-template-columns: 1fr; } .staff-page .panel > form, .staff-page .panel > .filters, .staff-page .panel > details, .staff-page .panel > p, .staff-page .panel > .notice { margin-left: 14px; margin-right: 14px; } }
.staff-page .panel > form, .staff-page .panel > .filters, .staff-page .panel > .notice, .staff-page .panel > details, .staff-page .panel > p, .staff-page .panel > ul, .staff-page .panel > dl, .staff-page .panel > .facts, .staff-page .panel > .empty-state, .staff-page .panel > .meta-line, .staff-page .panel > .slip-form { margin-left: 16px; margin-right: 16px; }
.staff-page .panel > .empty-state, .staff-page .panel > p.empty-state { text-align: left; padding: 4px 0 14px; }
.staff-page .lease-this .form-actions { grid-column: auto; }
.staff-page .panel > form.slip-form, .staff-page .slip-form { max-width: 560px; }
.staff-page .panel > form:not(.filters):not(.form-grid) .filter-field { max-width: 560px; }
.staff-page .panel > form.form-grid { max-width: 780px; }
.staff-page .lease-this .filters { align-items: start; }
.staff-page .lease-this .form-actions { align-self: end; }

/* New customer form */
.cust-form { display: grid; gap: 16px; max-width: 820px; }
.cust-form .cf-section .form-grid, .cust-form .cf-section .kind-toggle, .cust-form .cf-section .type-cards, .cust-form .cf-section > small, .cust-form .cf-section > p { margin: 0 16px 16px; }
.cust-form .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cust-form .wide { grid-column: 1 / -1; }
.cust-form .req { color: #b42318; }
.cust-form .has-error input, .cust-form .has-error select { border-color: #b42318; background: #fef3f2; }
.cust-form .field-error { color: #b42318; font-size: 13px; }
.cust-form .kind-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; width: fit-content; }
.cust-form .kind-toggle label { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 8px; cursor: pointer; }
.cust-form .kind-toggle label:has(input:checked) { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cust-form .kind-toggle input { position: absolute; opacity: 0; }
.cust-form:has(input[name=kind][value=business]:checked) .kind-person, .cust-form:has(input[name=kind][value=person]:checked) .kind-business { display: none; }
.cust-form .type-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cust-form .type-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; min-height: 44px; }
.cust-form .type-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.cust-form .type-body { display: grid; gap: 4px; } .cust-form .type-body small { color: var(--muted); font-size: 12px; line-height: 1.4; } .cust-form .type-map { color: var(--ink); }
@media (max-width: 760px) { .cust-form .form-grid, .cust-form .type-cards { grid-template-columns: 1fr; } .cust-form .form-actions .button { width: 100%; margin-bottom: 8px; } }

/* Create lease uses the same sectioned form */
.lease-form .facet-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0 16px 12px; }
.lease-form .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lease-form .cf-section > .notice { margin: 0 16px 12px; }
.lease-form .cf-section > .small-muted { margin: 0 16px 12px; }
.lease-form .cf-section > .form-subhead { margin: 18px 16px 6px; }
.lease-form .form-actions { margin: 0 16px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lease-form .cf-section .form-grid .form-actions { margin: 0; }
.lease-form select, .lease-form input { width: 100%; }
@media (max-width: 760px) { .lease-form .facet-bar { grid-template-columns: 1fr; } .lease-form .form-actions .button { width: 100%; } }

/* Generic sectioned form pieces (templates page, other panels) */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.panel-form { margin: 0 16px 16px; }
.form-subhead { margin: 8px 0 0; font-size: 15px; }
.form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select, .form-grid textarea { width: 100%; }
.inline-edit { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-edit textarea { width: min(100%, 420px); } .inline-edit label { display: flex; flex-direction: column; gap: 4px; }
.inline-edit label:has(input[type=checkbox]) { flex-direction: row; align-items: center; min-height: 40px; }
.inline-edit input[type=checkbox] { width: 20px; height: 20px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .inline-edit textarea { width: 100%; } }

/* Tablet: the staff bar stays on ONE line (the title gives way, the menu button sits at the right). */
@media (max-width: 480px) {
  .staff-bar .sb-account, .ins-top .sb-account { flex: 1 1 100%; justify-content: flex-end; order: 5; }
  .sb-email { max-width: 18ch; }
}
@media (min-width: 481px) and (max-width: 800px) {
  .staff-bar { flex-wrap: nowrap; height: auto; min-height: 48px; padding: 4px 12px; } .staff-bar .sb-title { flex: 1 1 0; } .staff-bar .sb-account { margin-left: auto; flex: none; order: 3; } .staff-bar .staff-nav { margin-left: 8px; order: 4; }
}
.staff-page .form-subhead { margin: 18px 0 2px; font-size: 14px; letter-spacing: .02em; color: #334155; } .staff-page .form-grid > .form-subhead:first-child, .staff-page form > .form-subhead:first-child { margin-top: 4px; }
.staff-page form .form-actions, .staff-page form .actions { margin-left: 0; margin-top: 16px; }
@media (max-width: 760px) { .staff-page form .form-actions .button { width: 100%; justify-content: center; white-space: normal; } }

/* Accounting reports */
.acct-cards { list-style: none; margin: 8px 20px 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.acct-cards a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #d8e0e8; border-radius: 10px; background: #fff; color: inherit; text-decoration: none; min-height: 44px; } .acct-cards a:hover { border-color: var(--accent, #2563c9); background: #f6f9fe; }
.acct-cards span { font-size: 13px; color: #53606e; }
.acct-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 20px 12px; } .acct-nav .chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #cfd8e2; border-radius: 999px; text-decoration: none; color: #1b2a38; font-size: 14px; font-weight: 600; } .acct-nav .chip.active { background: #102a43; color: #fff; border-color: #102a43; }
.acct .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .acct .num.neg { color: #9a3412; }
.acct .notice, .acct details.dq { margin: 8px 20px; } .acct details.dq summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; } .acct details.dq ul { margin: 6px 0 10px 18px; padding: 0; font-size: 13px; }
.acct .indent { display: inline-block; padding-left: 1.15em; }
.acct .acct-filters { margin: 0 20px 12px; } .acct-is { font-size: 12.5px; } .acct-is th[scope=row] { text-align: left; position: sticky; left: 0; background: #fff; min-width: 190px; z-index: 1; } .acct-is th, .acct-is td { padding: 6px 8px; }
.acct-is .acct-sec th { background: #e8f1f8; text-align: left; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; } .acct-is .acct-total th, .acct-is .acct-total td { background: #f1f4f7; font-weight: 700; border-top: 1px solid #cfd8e2; } .acct-is .acct-total th[scope=row] { background: #f1f4f7; } .acct-is .net th, .acct-is .net td { background: #dfeaf5; }
@media print { .staff-bar, .acct-nav, .acct-filters, .button { display: none !important; } .acct .table-scroll { overflow: visible; } .acct-is { font-size: 9px; } }
.acct-needs { margin: 6px 20px 14px 40px; padding: 0; font-size: 14px; line-height: 1.5; } .acct-needs li { margin-bottom: 8px; }
.pay-options { display: flex; flex-wrap: wrap; gap: 12px; padding: 0 20px 8px; } .pay-option { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; border: 1px solid var(--line, #d7dde3); border-radius: 10px; padding: 14px; }
.pay-total { font-weight: 700; font-size: 18px; } .pay-option .button { min-height: 44px; }

/* Compact ledger, lease summary, and the shared metric cards (October 12). */
.page-heading.compact { margin-bottom: 6px; }
.page-heading.compact h1 { font-size: 18px; }
/* Customer actions sit beside the name on Marina, Perry Park and MAC. Same row, not a block at the bottom of the page. */
.customer-page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; min-width: 0; }
.page-heading:has(.customer-page-actions), .panel-header:has(.customer-page-actions) { flex-wrap: wrap; align-items: center; }
.page-heading .customer-page-actions, .panel-header .customer-page-actions { flex: 1 1 220px; }
.customer-page-actions .button { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: center; }
.customer-page-actions .small-muted { font-size: 13px; }
.freshness { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.freshness > svg { width: 14px; height: 14px; flex: none; }
.freshness .ribbon-details { margin: 0; }
.freshness .ribbon-details > summary { min-height: 24px; color: var(--accent); cursor: pointer; }
.summary-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.summary-strip > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding-left: 0; }
.summary-strip > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.summary-strip strong, .summary-strip .balance { font-size: 18px; }
.summary-strip small { display: block; margin-top: 2px; }
.ledger-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 8px; }
.ledger-toolbar .segmented { flex: 0 0 auto; }
.ledger-toolbar .filters { flex: 1 1 420px; margin: 0; }
.empty-inline { margin: 8px 16px; padding: 0; text-align: left; color: var(--muted); font-size: 13px; }
.kpi-grid { gap: 8px; }
.kpi-card { padding: 10px 12px; }
.kpi-card strong { font-size: 20px; margin: 2px 0; }
.money-card { padding: 10px 12px; }
.money-card strong { font-size: 18px; }
.ap-dash { margin-bottom: 8px; }
.ap-dash .summary-strip { margin: 8px 16px 12px; align-items: stretch; gap: 0; padding: 0; }
.ap-dash .summary-strip a { color: inherit; text-decoration: none; min-width: 0; }
.ap-dash .summary-strip a:hover .stat-value, .ap-dash .summary-strip a:focus-visible .stat-value { color: var(--accent); }
@media (max-width: 760px) {
  .page-heading.compact h1 { font-size: 18px; }
  .page-heading .customer-page-actions, .panel-header .customer-page-actions { flex-basis: 100%; justify-content: flex-start; margin-left: 0; }
  .customer-page-actions .button { min-height: 44px; }
  .summary-strip > div, .summary-strip > div + div { flex: 1 1 calc(50% - 18px); border-left: 0; padding-left: 0; }
  .ledger-toolbar .filters { flex-basis: 100%; }
  .freshness .ribbon-details > summary { min-height: 44px; }
}
@media (max-width: 420px) {
  .ap-dash .summary-strip { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  .ap-dash .summary-strip > .stat, .ap-dash .summary-strip > .stat + .stat { flex: 1 1 auto; width: 100%; border-left: 0; border-top: 1px solid var(--line); padding: 8px 12px; }
  .ap-dash .summary-strip > .stat:first-child { border-top: 0; }
}

/* Management settings and 1099 candidates: compact cards, aligned money, no sideways page scroll. */
.mgmt-page { min-width: 0; }
.mgmt-page .summary-strip, .mgmt-page .panel, .mgmt-page .table-scroll { min-width: 0; max-width: 100%; }
.mgmt-page .summary-strip > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.mgmt-page .summary-strip .micro-label { display: block; max-width: none; text-align: left; letter-spacing: .06em; text-transform: uppercase; }
.mgmt-page .summary-strip strong { display: block; }
.mgmt-page .summary-strip strong, .mgmt-page .summary-strip small { overflow-wrap: anywhere; }
.mgmt-page .tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: #e8f6ee; color: #1f7a4a; font-size: 12px; font-weight: 700; }
.mgmt-page .tag.warn { background: #f8f1e3; color: #8a5a12; }
.mgmt-page .panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mgmt-page .panel-header h2 { margin: 0; min-width: 0; }
.mgmt-page .panel-header .button { flex: 0 1 auto; max-width: 100%; white-space: normal; text-align: center; }
.mgmt-page .acct-nav { margin-left: 16px; margin-right: 16px; }
.staff-page .filter-field.check-line { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
.staff-page .filter-field.check-line input { width: 18px; height: 18px; margin: 0; flex: none; }
.mgmt-page .tin { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.roll-table td.num, .roll-table th.num { font-variant-numeric: tabular-nums; }
@media (min-width: 761px) { .roll-table td.num { white-space: nowrap; } }
@media (max-width: 760px) {
  .mgmt-page .roll-table td { padding-left: 0; }
  .mgmt-page .roll-table td::before { position: static; display: block; width: auto; margin-bottom: 2px; }
  .mgmt-page .roll-table td.num { text-align: right; white-space: normal; }
  .mgmt-page .panel-header .button { width: 100%; }
}
.staff-page .panel > .summary-strip { margin: 8px 16px 12px; min-width: 0; }
/* Report chips stay a wrapping row. The staff facet grid would otherwise stretch each chip. */
.staff-page nav.acct-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 16px 12px; }
.staff-page nav.acct-nav .chip { width: auto; max-width: 100%; white-space: normal; text-align: center; }
.staff-page .acct > form.filters,
.staff-page .panel > form.filters,
.staff-page .acct > .notice,
.staff-page .acct > details.dq,
.staff-page .panel > p.panel-note { margin-left: 16px; margin-right: 16px; }
.staff-page .acct > form.filters,
.staff-page .panel > form.filters { padding-left: 0; padding-right: 0; }
.tb-totals { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tb-totals > span { white-space: nowrap; }
.tb-totals .sep { color: var(--muted); user-select: none; }
@media (max-width: 480px) {
  .tb-totals { gap: 4px 8px; font-size: 0.85rem; }
}
details.slip-act:not([open]) > .slip-form { display: none; }
.roll-table th.num, .roll-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.roll-table th.num .sort-link { display: flex; justify-content: flex-end; width: 100%; }
.staff-page .roll-table th,
.staff-page .roll-table td { padding-block: 7px; padding-inline: 10px; }
.staff-page .roll-table td:first-child { padding-left: 16px; }
.staff-page .roll-table td:last-child { padding-right: 16px; }
.staff-page .roll-table th:has(.sort-link),
.staff-page .roll-table th:has(.sort-button) { padding: 0; }
.staff-page .roll-table .sort-link,
.staff-page .roll-table .sort-button { padding: 8px 10px; min-height: 36px; white-space: normal; line-height: 1.25; }
.staff-page .roll-table th:first-child .sort-link,
.staff-page .roll-table th:first-child .sort-button { padding-left: 16px; }
.staff-page .roll-table th:last-child .sort-link,
.staff-page .roll-table th:last-child .sort-button { padding-right: 16px; }
.staff-page .roll-table thead th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.hidden-links { display: flex; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.slip-hide, .slip-form, .slip-hide .notice { max-width: min(560px, 100%); min-width: 0; overflow-wrap: anywhere; box-sizing: border-box; }
.slip-hide { width: min(560px, 100%); }
@media (min-width: 761px) {
  .staff-page .roll-table th.num, .staff-page .roll-table td.num { white-space: nowrap; width: 1%; }
}
@media (max-width: 760px) {
  .staff-page .panel > .summary-strip,
  .staff-page .acct > form.filters,
  .staff-page .panel > form.filters,
  .staff-page .acct > .notice,
  .staff-page .panel > p.panel-note,
  .staff-page nav.acct-nav { margin-left: 14px; margin-right: 14px; }
  .summary-strip strong, .summary-strip .balance { overflow-wrap: anywhere; }
  .roll-table td.num, .acct td.num, .acct .num { white-space: normal; text-align: left; }
  .roll-table td { overflow-wrap: anywhere; }
  /* Long money labels sit above the value. The amount stays on the right in $1,234.56 form. */
  .staff-page .roll-table thead { display: none; }
  .staff-page .roll-table td, .staff-page .roll-table td:first-child { padding-left: 0; }
  .staff-page .roll-table td::before { position: static; float: none; display: block; width: auto; margin: 0 0 2px; }
  .staff-page .roll-table td.num { text-align: right; }
  .staff-page .roll-table td.num::before { width: 100%; text-align: left; }
}

/* Shared staff layout audit: keep the identity and sign-out reachable at phone widths. */
.hosted-page .panel-header h1, .staff-page-title { font-size: 18px; line-height: 1.3; margin: 0; }
.topbar #workspace-area { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.sb-email { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .topbar-actions .sb-who, .topbar-actions .top-avatar { display: none; }
}
@media (max-width: 760px) {
  .topbar-actions, .topbar-actions .sb-account { gap: 6px; margin-left: auto; min-width: 0; }
  .topbar .sb-signout .button { min-height: 44px; }
}

/* Staff density: one page title, compact controls and current work ahead of history. */
.topbar #workspace-area, .topbar .sb-who, .topbar .top-avatar { display: none; }
.topbar { gap: 12px; }
.topbar-search { flex: 1 1 240px; min-width: 160px; }
.hosted-page.staff-page, .hosted-page.staff-wide { max-width: none; padding: 16px 24px; }
main .page-heading { margin-bottom: 8px; gap: 12px; }
main .page-heading h1 { font-size: 20px; line-height: 1.3; }
.staff-page .panel-header { padding: 10px 16px; gap: 8px 12px; flex-wrap: wrap; }
.staff-page .panel-header h1, .staff-page .panel-header h2 { margin: 0; }
.staff-page .panel { margin-bottom: 12px; }
.staff-page .facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px 16px; padding: 10px 0; }
.staff-page .facts dd { margin-top: 2px; font-size: 14px; }
.staff-page form.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.staff-page form.filters > .filter-field { flex: 1 1 160px; max-width: 260px; }
.staff-page form.filters > .search-field { flex: 1 1 220px; }
.staff-page form.filters > .form-actions { flex: 0 0 auto; margin-top: 0; }
.staff-page form.filters > input[type=hidden] { display: none; }
.staff-page nav.facet-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.staff-page .empty-state { min-height: 0; padding: 10px 16px; text-align: left; }
.staff-page .empty-state::before { display: none; }
.staff-page .empty-state > svg { display: none; }
.staff-page .empty-state p { margin: 4px 0; }
.lease-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.business-section[data-business=MARINA] { border-top: 3px solid var(--site-marina, #3d7084); }
.business-section[data-business=PARK] { border-top: 3px solid var(--site-park, #48744e); }
.business-section .panel-header .panel-fact { margin: 2px 0 0; }
.business-section .ledger-toolbar, .business-section > .summary-strip { margin: 8px 16px; }
.customer-ledger > .summary-strip { margin: 8px 16px; }
.customer-ledger > .panel-note { margin: 6px 16px; }
.customer-ledger > h3 { font-size: 14px; }
.customer-ledger .ledger-toolbar .filters { flex: 0 1 auto; }
.table-tools.inline-tools { padding: 0; margin-left: auto; }
#main .detail-grid { gap: 12px; align-items: start; }
#main .detail-aside { gap: 12px; align-items: start; }
#main .detail-aside > .panel { width: 100%; }
#main .detail-main .details-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px 16px; padding: 4px 16px 12px; }
#main .detail-main .details-list > div { padding: 6px 0; min-width: 0; }
#main .detail-main .panel-header, #main .detail-aside .panel-header { padding: 10px 16px; }
#main .detail-main > .panel + .panel { margin-top: 12px; }
#main .detail-main .panel-body { padding: 8px 16px 12px; }
.business-section > .panel-header { padding: 10px 16px; gap: 8px 12px; flex-wrap: wrap; }
.business-section .summary-strip { padding-block: 6px; }
.business-section .summary-strip strong, .business-section .summary-strip .balance { font-size: 20px; }
.business-section > .sort-note, .business-section > .small-muted { margin: 6px 16px; }
.summary-block .summary-strip { padding: 8px 12px; gap: 8px 20px; }
.summary-block .summary-strip > div { flex: 0 1 auto; }
.summary-block .summary-strip .rent-tile { flex: 1 1 220px; }
.summary-block .summary-strip .business-totals { margin: 0; }
.summary-block .summary-strip .business-totals li { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.summary-block .summary-strip .business-totals small { margin: 0; }
.history-disclosure { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 8px 0 12px; min-width: 0; }
.history-disclosure > summary { cursor: pointer; padding: 10px 14px; min-height: 44px; box-sizing: border-box; font-weight: 600; color: var(--muted); }
.history-disclosure > summary .count-badge { margin-left: 6px; }
.history-disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.history-disclosure[open] > summary { border-bottom: 1px solid var(--line); color: var(--ink); }
.history-disclosure:not([open]) > :not(summary) { display: none; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; line-height: 1.4; background: #edf1f5; color: #48596b; }
.tag.ok { background: #e8f4ec; color: #266044; }
.tag.soon { background: #e8f0fb; color: #245890; }
.tag.warn { background: #fff1d9; color: #805111; }
.tag.past { background: #edf1f5; color: #596676; }
.tag[data-guide], .badge[data-guide] { background: #ccfbf1; color: #0f5f58; border-color: #5eead4; }
@media (min-width: 761px) {
  main .roll-table td { padding-block: 8px; }
  main .roll-table .sort-link, main .roll-table .sort-button { padding-block: 9px; }
}
@media (max-width: 760px) {
  .hosted-page.staff-page, .hosted-page.staff-wide { padding: 12px; }
  .staff-page form.filters > .filter-field { flex: 1 1 140px; max-width: none; }
  .staff-page form.filters > .form-actions { flex-basis: 100%; }
  .staff-page .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .business-section .ledger-toolbar { margin-inline: 12px; }
  .summary-block .summary-strip > div { flex: 1 1 140px; }
  /* Ledger cells use their own padding; the generic negative label offset clips them. */
  .account-table tbody tr, .business-section .roll-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
  .account-table td, .business-section .roll-table td { min-width: 0; padding: 6px 0; }
  .account-table td::before, .business-section .roll-table td::before { position: static; float: none; display: block; width: auto; margin: 0 0 2px; text-align: left; }
  .account-table td[data-label=Description], .account-table td:last-child { grid-column: 1 / -1; }
  .customer-ledger .ledger-period { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }
  .customer-ledger .ledger-period .filter-field { flex: 1 1 110px; width: auto; min-width: 0; align-items: flex-start; }
  .customer-ledger .ledger-period input { width: 100%; min-width: 0; }
}
@media (max-width: 800px) {
  .back-link, .tenant-list strong > a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* Phone reports and lists: labelled cards, and a short toolbar. One pattern for staff and the portal. */
@media (max-width: 760px) {
  .report-page .staff-back { margin-bottom: 6px; }
  .report-sheet { margin: 0; padding: 8px 10px 12px; max-width: none; }
  .report-actions { gap: 6px; margin-bottom: 8px; }
  .report-actions .button { flex: 0 1 auto; width: auto; max-width: 100%; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  .report-actions .small-muted { flex: 1 1 100%; margin: 0; line-height: 1.35; }
  .report-head h1 { font-size: 22px; line-height: 1.2; margin: 0; }
  .report-head p { margin: 2px 0; }
  .report-foot { margin-top: 8px; }
  .report-foot p { margin: 4px 0; }
  .acct-is th[scope="row"] { position: static; min-width: 0; white-space: normal; }
  .portal-page nav.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 0 8px; }
  .portal-page nav.filter-row .button,
  .portal-page nav.filter-row form { flex: 0 1 auto; margin: 0; }
  .portal-page .panel-header { flex-wrap: wrap; gap: 8px; }
  .portal-page .panel-header .button { width: auto; max-width: 100%; }
}

/* AP inbox, review, and rules share the staff heading, summary strip, counted tabs, and compact table. */
.ap-page .page-heading > div > p.small-muted { display: block; margin: 2px 0 0; }
.ap-page .ap-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-page .ap-badges .badge { white-space: nowrap; }
.ap-page .ap-mail { display: block; min-width: 12ch; }
.ap-page .ap-mail small { display: block; margin-top: 2px; }
.ap-page .table-scroll { width: max-content; max-width: 100%; }
.ap-page .roll-table.ap-table { width: max-content; max-width: 100%; }
.ap-page .roll-table.ap-table td.ap-why,
.ap-page .roll-table.ap-table th.ap-why { max-width: 16ch; white-space: normal; }
/* Why: one line with "…", the whole note on hover (title) or on a tap (details), so rows keep one height. */
.ap-page .ap-why-line { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 16ch; }
.ap-page .ap-why-more { margin: 0; }
.ap-page .ap-why-more > summary { display: flex; align-items: baseline; gap: 4px; max-width: 16ch; list-style: none; cursor: pointer; }
.ap-page .ap-why-more > summary::-webkit-details-marker { display: none; }
.ap-page .ap-why-more > summary .ap-why-line { flex: 1 1 auto; min-width: 0; }
.ap-page .ap-why-more > summary::after { content: 'More'; flex: none; color: var(--accent); font-size: 11px; }
.ap-page .ap-why-more[open] > summary .ap-why-line { display: none; }
.ap-page .ap-why-more[open] > summary::after { content: 'Less'; }
.ap-page .ap-why-full { margin: 4px 0 0; max-width: 32ch; white-space: normal; overflow-wrap: break-word; font-size: 12px; }
.ap-page .roll-table.ap-table td.ap-status,
.ap-page .roll-table.ap-table th.ap-status,
.ap-page .roll-table.ap-table td.ap-confidence,
.ap-page .roll-table.ap-table th.ap-confidence { width: 1%; white-space: nowrap; }
.ap-page .roll-table.ap-table td.ap-status .badge,
.ap-page .roll-table.ap-table td.ap-confidence .badge { white-space: nowrap; }
.ap-page .roll-table.ap-table td.ap-action,
.ap-page .roll-table.ap-table th.ap-action { width: 1%; max-width: 18ch; }
.ap-page .roll-table.ap-table th.ap-select, .ap-page .roll-table.ap-table td.ap-select { width: 1%; padding-left: 8px; padding-right: 4px; text-align: center; }
.ap-page .filter-row { padding-left: 16px; padding-right: 16px; }
.ap-page .segmented { flex-wrap: wrap; }
.ap-page .ap-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 18ch; }
.ap-page .ap-actions form { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.ap-page .ap-actions .button { min-height: 28px; padding: 0 8px; font-size: 11px; white-space: nowrap; }
.ap-page .ap-always { margin: 0; }
.ap-page .ap-always summary { font-size: 12px; color: var(--accent); cursor: pointer; }
.ap-page .ap-always form { margin-top: 6px; }
.ap-toast { position: fixed; z-index: 40; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(440px, calc(100vw - 32px)); margin: 0; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); }
.ap-toast p { margin: 0; }
@media (max-width: 760px) {
  .ap-page .table-scroll,
  .ap-page .roll-table.ap-table { width: 100%; }
  .ap-page .roll-table.ap-table td.ap-why,
  .ap-page .roll-table.ap-table th.ap-why { width: auto; max-width: none; }
  .ap-page .ap-why-line,
  .ap-page .ap-why-more > summary { max-width: 100%; }
  .ap-page .ap-why-full { max-width: none; }
  .ap-toast { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .ap-page .ap-actions,
  .ap-page .ap-actions form { align-items: stretch; }
  .ap-page .ap-actions .button { width: auto; max-width: 100%; }
  /* Phone cards: the desktop "as narrow as it can be" widths (1%) would squeeze these cells to a few pixels and stack their labels and
     buttons one letter per line. Each takes its grid cell's full width instead. */
  .ap-page .roll-table.ap-table td.ap-status,
  .ap-page .roll-table.ap-table td.ap-confidence,
  .ap-page .roll-table.ap-table td.ap-action,
  .ap-page .roll-table.ap-table td.ap-select { width: auto; max-width: none; text-align: left; }
  .ap-page .roll-table.ap-table td.ap-select { padding-left: 0; padding-right: 0; }
  .ap-page .ap-actions { max-width: none; }
}

/* MAC Rentals House fields on the AP review form: hidden unless Business is MAC Rentals (no script). Lives here, not in an inline <style>,
   because the staff pages' CSP is style-src 'self' and drops inline styles. */
.ap-page form .mac-house-field { display: none; }
.ap-page form:has(select[name="entity"] option[value="ent-mac-rentals"]:checked) .mac-house-field { display: grid; }
.ap-page form .mac-house-wide { grid-column: 1 / -1; }
.ap-page .mac-history tr[data-history-row] { cursor: pointer; }
.ap-page .mac-history tr.is-picked { background: var(--accent-soft); }
.ap-page .mac-history tr.is-picked [data-history-pick] { font-weight: 600; }

/* AP review: invoice on the left, coding on the right. Phones stack it. */
.ap-review { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 12px; align-items: start; }
.ap-review-doc { min-height: 280px; border: 1px solid var(--line); background: var(--paper, #f4f6f8); }
.ap-review-doc iframe, .ap-review-doc img { display: block; width: 100%; height: 68vh; min-height: 280px; border: 0; background: #fff; object-fit: contain; }
.ap-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; margin: 8px 0 0; }
/* Photo and form side by side on a laptop (2026-11-16): the photo is capped so the form's Record payment stays on the first screen, the
   form column is one block (it never wraps under the photo) and stays in view while the page scrolls; a click zooms the photo in its box. */
.ap-page .ap-review-side { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-page .ap-review-side > .filters, .ap-page .ap-review-side > form, .ap-page .ap-review-side > p { margin: 0; }
/* Bank deposit (migration 459): one box per deposit slip on the scan; each line is payer, check number, amount, then the receipt under it. */
.ap-deposit-form { max-width: none; }
.ap-deposit { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px 10px; margin: 0; min-width: 0; grid-column: 1 / -1; }
.ap-deposit legend { font-weight: 600; padding: 0 6px; }
.ap-deposit-head { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.ap-deposit-lines { display: grid; gap: 6px; }
.ap-deposit-line { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.9fr); gap: 4px 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.ap-deposit-line .rcpt { grid-column: 1 / -1; }
.ap-deposit-line .field > span { font-size: 0.78rem; }
.ap-deposit-cash { align-self: end; font-weight: 600; }
.ap-deposit-sum { margin: 6px 0 0; font-variant-numeric: tabular-nums; }
.ap-deposit-issues, .ap-deposit-problems { margin: 4px 0; padding-left: 18px; }
.ap-deposit-problems { color: var(--danger, #9b1c1c); }
.ap-deposit-state { margin: 0 0 4px; }
.ap-deposit-evidence { margin: 2px 0; }
/* Daily cash sheet (AP inbox): the paper sheet's boxes as fieldsets, Orbit's figure under each written one, and the math table on top. */
.ap-cash-form { max-width: none; }
.ap-cash-box { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px 10px; margin: 0; min-width: 0; grid-column: 1 / -1; }
.ap-cash-box legend { font-weight: 600; padding: 0 6px; }
.ap-cash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 12px; }
.ap-cash-grid .field > span { font-size: 0.8rem; }
.ap-cash-grid .ap-cash-wide, .ap-cash-sub { grid-column: 1 / -1; }
.ap-cash-sub { display: grid; gap: 6px; }
.ap-cash-pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4px 8px; }
.ap-cash-trio { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr) minmax(0, 1fr); gap: 4px 8px; }
.ap-cash-cat { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 0.6fr) minmax(0, 1fr); gap: 4px 8px; }
.ap-cash-orbit { display: block; font-size: 0.74rem; line-height: 1.25; margin-top: 2px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-cash-orbit.is-differs { color: var(--danger); font-weight: 600; }
.field.ap-cash-bad input, .field.ap-cash-bad select { border-color: var(--danger); }
.ap-cash-math { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.ap-cash-math h3 { margin: 0 0 4px; font-size: 0.95rem; }
.ap-cash-verdict { margin: 0 0 4px; }
.ap-cash-verdict.is-attention { color: var(--danger); }
.ap-cash-verdict.is-ok { color: var(--positive); }
.ap-cash-flags { margin: 2px 0 6px; padding-left: 18px; }
.ap-cash-flags li.is-attention { color: var(--danger); }
.ap-cash-flags li.is-note { color: var(--muted); }
.ap-cash-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.ap-cash-table th, .ap-cash-table td { padding: 4px 6px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.ap-cash-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ap-cash-table tr.is-differs { background: var(--danger-soft); }
.ap-cash-how { display: block; color: var(--muted); font-size: 0.74rem; }
@media (max-width: 640px) {
  .ap-cash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-cash-trio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ap-cash-trio .field:last-child { grid-column: 1 / -1; }
}
/* Bank deposit, read from the scan: a tag per field with its confidence; Low is highlighted so it gets checked. */
.ap-conf { display: block; font-size: 0.74rem; line-height: 1.25; margin-top: 2px; color: var(--muted, #5b6573); }
.ap-conf-high { color: #1f6b3a; }
.ap-conf-medium { color: #8a5a00; }
.ap-conf-low { color: #9b1c1c; font-weight: 600; }
.field.ap-read-low { background: #fff4f2; border-radius: 6px; box-shadow: 0 0 0 2px #e5a39b; padding: 2px 4px; }
.field.ap-read-low input, .field.ap-read-low select { border-color: #c0392b; }
.field.ap-read-medium input, .field.ap-read-medium select { border-color: #d6a436; }
.ap-deposit-read { margin: 0 0 4px; }
.ap-page .ap-review-side > .filters { display: flex; flex-wrap: wrap; align-items: end; gap: 4px 8px; padding: 0; }
.ap-page .ap-review-side > .filters .filter-field { flex: 1 1 180px; margin: 0; }
.ap-page .ap-review-side > .filters > p { flex: 1 1 100%; margin: 0; }
.ap-page .ap-review-side .panel-note, .ap-page .ap-review-side .small-muted { font-size: 12px; line-height: 1.35; }
.ap-page .ap-review-side p.panel-note { margin: 0; padding: 0; }
.ap-page .ap-review-side input:not([type=checkbox]):not([type=radio]), .ap-page .ap-review-side select { min-height: 34px; }
.ap-page .ap-rent-form .check { min-height: 0; padding: 2px 0; }
.ap-page .ap-review-doc .ap-zoom { display: block; cursor: zoom-in; }
.ap-page .ap-review-doc img { height: min(68vh, calc(100vh - 220px)); }
.ap-page .ap-review-doc.is-zoomed { max-height: min(78vh, calc(100vh - 140px)); overflow: auto; }
.ap-page .ap-review-doc.is-zoomed .ap-zoom { cursor: zoom-out; }
.ap-page .ap-review-doc.is-zoomed img { width: auto; max-width: none; height: auto; max-height: none; }
.ap-page .ap-review form.ap-rent-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; max-width: none; }
.ap-page .ap-rent-form > fieldset, .ap-page .ap-rent-form > .notice, .ap-page .ap-rent-form > .wide, .ap-page .ap-rent-form > .form-actions, .ap-page .ap-rent-form > p { grid-column: 1 / -1; }
.ap-page .ap-rent-form fieldset { max-height: 8em; overflow: auto; padding-top: 2px; padding-bottom: 2px; }
.ap-page .ap-rent-facts { margin: 0; }
.ap-page .ap-rent-form [hidden] { display: none; }
@media (min-width: 1000px) {
  .ap-page .ap-review-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
}
@media (max-width: 760px) {
  .ap-review { grid-template-columns: 1fr; }
  .ap-review-doc iframe, .ap-review-doc img { height: 48vh; min-height: 200px; }
  .ap-page .ap-review-doc img { height: 48vh; }
  .ap-page .ap-review-doc.is-zoomed img { height: auto; }
  .ap-page .ap-review form.ap-rent-form { grid-template-columns: 1fr; }
}

/* Vendor detail: two cards on a desktop, labeled rows on a phone. */
.vendor-page .page-heading h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vendor-page .vendor-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 12px; align-items: start; margin-bottom: 12px; }
.vendor-page .vendor-split > .panel { margin-bottom: 0; }
.vendor-page .panel > form.form-grid { max-width: none; }
.vendor-page .form-grid { gap: 8px 12px; }
.vendor-page .vendor-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vendor-page .vendor-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vendor-page .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.vendor-page .field input:not([type=checkbox]):not([type=radio]),
.vendor-page .field select,
.vendor-page .field textarea { width: 100%; box-sizing: border-box; min-height: 36px; }
.vendor-page form .form-actions { margin-top: 4px; }
.vendor-page .form-subhead { margin: 8px 16px 4px; }
.vendor-page .panel-note,
.vendor-page .inline-form { margin-bottom: 8px; }
.vendor-page .ap-period small { display: block; margin-top: 2px; }
.vendor-page .ap-open { display: inline-flex; flex-direction: column; align-items: flex-start; max-width: 28ch; gap: 8px; white-space: normal; overflow-wrap: anywhere; }
.vendor-page .ap-open a { max-width: 100%; }
.vendor-page .wide-input { width: 100%; box-sizing: border-box; }
@media (max-width: 800px) {
  .vendor-page .vendor-split,
  .vendor-page .vendor-fields,
  .vendor-page .vendor-pair { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .vendor-page .page-heading { align-items: stretch; flex-direction: column; }
  .vendor-page .page-heading .button { width: 100%; }
  .vendor-page .summary-strip { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  .vendor-page .summary-strip > div,
  .vendor-page .summary-strip > div + div { flex: 1 1 auto; width: 100%; border-left: 0; border-top: 1px solid var(--line); padding: 8px 12px; }
  .vendor-page .summary-strip > div:first-child { border-top: 0; }
}
/* Vendor detail page: one header line, the actions in a dropdown off it, a slim summary strip, then 1099 treatment and W-9 side by side. */
.vendor-detail .page-heading { flex-wrap: wrap; gap: 6px 12px; margin: 2px 0 6px; }
.vendor-detail .page-heading > div:first-child { flex: 1 1 320px; align-items: center; }
.vendor-detail .vendor-imported { font-size: 12px; }
.vendor-name-note { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 12px; line-height: 1.3; }
.vendor-name-note form { margin: 0; }
.vendor-note-action { padding: 0; color: var(--accent); background: none; border: 0; font: inherit; font-weight: 500; text-decoration: underline; cursor: pointer; }
.vendor-rename { position: relative; }
.vendor-rename > summary { list-style: none; }
.vendor-rename > summary::-webkit-details-marker { display: none; }
.vendor-rename > .vendor-actions-menu { right: auto; left: 0; }
.vendor-detail .vendor-head-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 6px; }
.vendor-detail .vendor-head-actions .button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.vendor-actions { position: relative; }
.vendor-actions > summary { list-style: none; cursor: pointer; }
.vendor-actions > summary::-webkit-details-marker { display: none; }
.vendor-actions-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; display: grid; gap: 10px; width: min(380px, calc(100vw - 24px)); box-sizing: border-box; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.vendor-actions-menu .inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.vendor-actions-menu .filter-field { flex: 1 1 200px; min-width: 0; }
.vendor-actions-menu input:not([type=hidden]), .vendor-actions-menu select { width: 100%; box-sizing: border-box; }
.vendor-actions-menu p { margin: 0; }
.vendor-detail .vendor-summary .summary-strip { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0 0 6px; padding: 4px 10px; }
.vendor-detail .vendor-summary .summary-strip > div { flex: 0 1 auto; flex-direction: row; align-items: baseline; gap: 6px; width: auto; padding: 0; border-top: 0; }
.vendor-detail .vendor-summary .summary-strip > div + div { padding-left: 10px; border-left: 1px solid var(--line); }
.vendor-detail .vendor-summary .summary-strip strong { display: inline; font-size: 13px; }
.vendor-detail .vendor-summary .summary-strip small { display: inline; margin: 0; font-size: 12px; }
.vendor-detail .vendor-split > .panel { margin: 0; }
.vendor-detail .vendor-split .panel-header { min-height: 0; padding: 6px 12px; }
.vendor-detail .vendor-split .panel > form.form-grid { gap: 6px 10px; margin: 0; padding: 2px 12px 10px; align-items: end; }
.vendor-detail .vendor-split .field input:not([type=checkbox]):not([type=radio]), .vendor-detail .vendor-split .field select { min-height: 32px; }
.vendor-detail .vendor-split .form-actions { margin: 0; }
.vendor-detail .vendor-split .panel > .panel-note, .vendor-detail .vendor-split .panel > .inline-form { margin: 0; padding: 4px 12px; }
.vendor-detail .vendor-split .form-subhead { margin: 4px 12px 0; }
@media (min-width: 801px) {
  .vendor-detail .vendor-split { grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 8px; margin-bottom: 8px; }
  .vendor-detail .vendor-split .vendor-pair { grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, 1.3fr); }
  .vendor-detail .vendor-split .vendor-pair .field.wide { grid-column: span 2; }
  .vendor-detail .vendor-split .vendor-pair .form-actions { grid-column: auto; }
}
@media (max-width: 800px) {
  .vendor-actions[open] { flex: 1 1 100%; }
  .vendor-actions-menu { position: static; width: 100%; margin-top: 4px; box-shadow: none; }
  .vendor-rename[open] { flex: 1 1 100%; }
  .vendor-rename > .vendor-actions-menu { position: static; width: 100%; }
}
@media (max-width: 420px) {
  .vendor-detail .vendor-summary .summary-strip > div + div { padding-left: 0; border-left: 0; }
}

/* ==== Gate access (ADR-018, spec C8.9). Status reads from shape + glyph + words, never colour alone. ====================================
   Active: green, solid, key. Inactive: grey, solid, slashed circle. Not linked / No gate needed: dashed outline. Unknown: dotted border,
   hatched fill, italic, "?" (it can never be read as Inactive). Gate record not found: amber outline, "!". Attention flags are amber chips. */
.gate-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; max-width: 100%; box-sizing: border-box; padding: 2px 10px 2px 7px; border-radius: 999px; border: 1px solid transparent; color: var(--gate-fg, var(--muted)); font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; text-decoration: none; vertical-align: middle; }
.gate-pill svg { width: 13px; height: 13px; flex: none; }
.gate-pill-text { overflow: hidden; text-overflow: ellipsis; }
.gate-pill.is-active { --gate-fg: var(--positive); background: var(--positive-soft); border-color: #cfe5d8; }
.gate-pill.is-past-end { --gate-fg: var(--warning); background: var(--warning-soft); border-color: #f0dcb4; }
.gate-pill.is-scheduled { --gate-fg: #2d5b9e; background: var(--accent-soft); border-color: #cddcf6; }
.gate-pill.is-inactive { --gate-fg: #4a5a68; background: var(--surface-muted); border-color: #cfd8df; }
.gate-pill.is-unlinked, .gate-pill.is-none { --gate-fg: var(--muted); background: transparent; border: 1px dashed #a3b2be; }
.gate-pill.is-unknown { --gate-fg: var(--ink); font-style: italic; border: 1.5px dotted #5f707e; background: repeating-linear-gradient(135deg, var(--surface) 0 4px, #e6ecf0 4px 8px); }
.gate-pill.is-missing { --gate-fg: var(--warning); background: var(--surface); border: 1px solid #d49a35; }
.gate-pill.is-loading { --gate-fg: var(--muted); background: var(--surface-muted); font-weight: 500; }
/* The "as of" time can shrink too, so a pill never spills over its own outline (the whole label is in the pill's title and accessible name). */
.gate-pill .gate-asof { font-weight: 500; font-style: normal; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gate-pill .gate-asof-glyph { color: var(--muted); }
.gate-pill.is-na, .gate-na { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .gate-pill.is-loading { animation: gate-wait 1.4s ease-in-out infinite; } }
@keyframes gate-wait { 50% { opacity: .55; } }
a.gate-pill-link, a.gate-pill { text-decoration: none; border-radius: 999px; max-width: 100%; }
/* A server-page pill is itself the link: inside a table it keeps its state colour and shape (table links are otherwise accent blue and underlined). */
.roll-table td a.gate-pill, .roll-table td a.gate-pill:hover { color: var(--gate-fg, var(--muted)); font-weight: 600; text-decoration: none; }
/* …including over the shared ".roll-table td a:not(.customer-link):not(.button)" accent colour, which is more specific. */
.roll-table td a.gate-pill:not(.customer-link):not(.button), .roll-table td a.gate-pill:not(.customer-link):not(.button):hover { color: var(--gate-fg, var(--muted)); }
a.gate-pill-link { display: inline-flex; align-items: center; }
a.gate-pill-link:hover .gate-pill, a.gate-pill:hover, a.gate-heading-pill:hover .gate-pill { box-shadow: 0 0 0 3px #dce7f7; }
a.gate-pill-link:focus-visible, a.gate-pill:focus-visible, a.gate-heading-pill:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gate-flag { display: inline-flex; gap: 5px; align-items: center; margin-top: 2px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--warning); }
.gate-flag svg { width: 13px; height: 13px; flex: none; }
.gate-flag.is-differs { color: var(--muted); font-weight: 500; }
.gate-review-link { font-size: 12px; font-weight: 600; color: var(--accent); }
.gate-review-link:hover { text-decoration: underline; }

/* Marina customers: the column and the line above the list. */
.gate-cell-body { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.roll-table td.gate-cell a.gate-pill-link { color: inherit; font-weight: inherit; }
.gate-source-line { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0 16px 8px; font-size: 12px; color: var(--muted); container: gate-source / inline-size; }
.gate-source-line > svg { width: 14px; height: 14px; color: var(--positive); }
.gate-source-line a { color: var(--accent); font-weight: 600; }
.gate-source-line a:hover { text-decoration: underline; }
/* When the line is too narrow for one row, "See all gate access →" gets its own row under the words (lined up with them), and the " · "
   between them is dropped, so it is never left dangling at the end of the first row. */
@container gate-source (max-width: 540px) {
  .gate-source-sep { display: none; }
  .gate-source-line > [data-gate-checked] { flex: 1 1 calc(100% - 20px); }
  .gate-source-line > a { margin-left: 20px; }
}

/* The customer page: the link under the name, then the card after Contact. */
.page-heading > div:has(> .gate-heading-pill) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-width: 0; }
a.gate-heading-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.gate-card { scroll-margin-top: calc(var(--staff-header-height, 64px) + 12px); }
/* The card takes focus only as a landing point for #gate-access (like the page title); it is not a control, so it draws no focus ring. */
.gate-card:focus, .gate-card:focus-visible { outline: none; }
.gate-card-head { flex-wrap: wrap; }
.gate-card .gate-source { margin: -2px 16px 12px; font-size: 12px; color: var(--muted); }
.gate-card-body { display: flex; flex-direction: column; gap: 14px; padding: 0 16px 16px; min-width: 0; }
.gate-card p { margin: 0; }
.gate-notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f6f8fa; font-size: 13px; line-height: 1.5; color: var(--ink); }
.gate-notice-glyph { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #5a6b7a; }
.gate-notice-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gate-notice.is-attention { background: var(--warning-soft); border-color: #eed6a3; color: #4f3407; }
.gate-notice.is-attention .gate-notice-glyph, .gate-notice-title { color: var(--warning); }
.gate-notice-title { font-weight: 650; }
.gate-notice-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin-top: 3px !important; font-size: 12px; color: #6d5523; }
a.gate-notice-link { font-weight: 600; color: var(--accent); }
a.gate-notice-link:hover { text-decoration: underline; }
.gate-card > .gate-notice.is-flash { margin: 0 16px 12px; }
.gate-notice.is-flash.is-ok { background: var(--positive-soft); border-color: #cfe5d8; color: var(--positive); }
.gate-notice.is-flash.is-ok .gate-notice-glyph { color: var(--positive); }
.gate-notice.is-flash.is-warning { background: var(--warning-soft); border-color: #eed6a3; color: #4f3407; }
.gate-state { font-size: 13px; line-height: 1.55; }
.gate-state.is-unknown { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px dotted #5f707e; border-radius: var(--radius-sm); background: repeating-linear-gradient(135deg, var(--surface) 0 6px, #f0f3f6 6px 12px); font-style: italic; }
.gate-state.is-unknown p + p { margin-top: 4px; font-style: normal; font-weight: 600; }
.gate-state-glyph { width: 20px; height: 20px; flex: none; color: #4a5a68; }
.gate-state.is-past-end { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #eed6a3; border-radius: var(--radius-sm); background: var(--warning-soft); color: #4f3407; }
.gate-state.is-past-end .gate-state-glyph { color: var(--warning); width: 18px; height: 18px; }
.gate-state.is-inactive strong { color: var(--ink); }
.gate-state.is-missing, .gate-state.is-unlinked, .gate-state.is-none { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.gate-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 22px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfd; }
.gate-fact { min-width: 0; }
.gate-fact dt { margin: 0 0 3px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gate-fact dd { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.gate-fact-value { font-size: 14px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.gate-fact small { font-size: 12px; line-height: 1.45; color: var(--muted); }
.gate-facts-caption { margin: 0 0 6px !important; font-size: 12px; font-weight: 600; font-style: italic; color: var(--muted); }
.gate-info { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; font-size: 12px; color: var(--muted); }
.gate-info li, .gate-hint, .gate-history-note { display: flex; gap: 6px; align-items: flex-start; }
.gate-info svg, .gate-hint svg, .gate-history-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.gate-subhead { margin: 0 0 2px; font-size: 13px; font-weight: 650; letter-spacing: 0; }
.gate-records { list-style: none; margin: 0; padding: 0; }
.gate-record { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.25fr) minmax(40px, .45fr) minmax(0, .95fr) minmax(0, .8fr) auto; gap: 6px 14px; align-items: center; padding: 9px 0; border-top: 1px solid #edf1f4; font-size: 13px; }
.gate-record-name { display: flex; flex-direction: column; min-width: 0; }
.gate-record-name strong { overflow-wrap: anywhere; }
.gate-record-name small, .gate-record-linked { font-size: 12px; color: var(--muted); }
.gate-record-slip { font-weight: 600; }
.gate-record-phone { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gate-card .button { min-height: 36px; padding: 7px 14px; }
.gate-record-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.gate-card .button.gate-record-unlink, .gate-card .button.gate-record-change { min-height: 32px; padding: 4px 12px; }
.gate-notes { margin: 0; font-size: 13px; }
.gate-notes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gate-notes li { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.gate-preview-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.gate-form { display: inline-flex; margin: 0; }
.gate-hint { padding-top: 12px; border-top: 1px solid #edf1f4; font-size: 12px; color: var(--muted); }
.gate-suggestion { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px dashed #a3b2be; border-radius: var(--radius-sm); background: #fbfcfd; }
.gate-suggestion-tier { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gate-suggestion-tier.is-high { color: var(--positive); }
.gate-suggestion-tier.is-medium { color: var(--warning); }
.gate-suggestion-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; }
.gate-suggestion-meta { font-size: 13px; color: var(--muted); }
.gate-evidence { list-style: none; display: flex; flex-direction: column; gap: 3px; margin: 0; padding: 0; font-size: 13px; }
.gate-evidence li { display: flex; gap: 7px; align-items: flex-start; }
.gate-evidence li > svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.gate-evidence li.is-ok > svg, .gate-evidence li.is-ok > span[aria-hidden] { color: var(--positive); }
.gate-evidence li.is-no > svg, .gate-evidence li.is-differs > span[aria-hidden] { color: var(--warning); }
.gate-evidence li.is-na { color: var(--muted); }
.gate-evidence li.is-na > svg { color: var(--muted); }
/* A phone number (in "Why Orbit thinks so", a list or the phones side by side) never breaks mid-number. */
.gate-nowrap { white-space: nowrap; }
/* Phones side by side: the gate record's number, and the customer's numbers on file in Orbit with where each came from. The one that is the
   gate record's number says so with a tick and words. */
.gate-phones { list-style: none; display: flex; flex-direction: column; gap: 2px; margin: 4px 0 0; padding: 0; font-size: 13px; }
.gate-phones li { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.gate-phone-same { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 600; color: var(--positive); }
.gate-phone-same svg { width: 13px; height: 13px; flex: none; align-self: center; }
.gate-phone, .gate-phone-line { display: block; margin-top: 2px; font-size: 13px; font-variant-numeric: tabular-nums; }
.gate-phone-sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; }
.gate-phone-sides dt { margin: 0 0 3px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gate-phone-sides dd { margin: 0; min-width: 0; }
.gate-phone-sides .gate-phones { margin: 0; }
/* The card's "Not the same person": behind a disclosure with the reason list, like Review matches. */
.gate-suggestion > .gate-reject { align-self: flex-start; max-width: 100%; }
.gate-suggestion > .gate-reject[open] { align-self: stretch; margin-top: 0; }
.gate-card form.gate-reject-form .filter-field { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; max-width: 420px; font-size: 12px; color: var(--muted); }
.gate-card form.gate-reject-form :is(select, input[type="text"]) { min-height: 36px; width: 100%; max-width: none; box-sizing: border-box; padding: 0 10px; border: 1px solid #6f7d8a; border-radius: var(--radius-sm); background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.gate-card form.gate-reject-form > .button { align-self: flex-start; }
@media (max-width: 800px) { .gate-card form.gate-reject-form :is(select, input[type="text"]) { min-height: 44px; } }
/* Review matches: a row left out of the last batch says so under its (unticked) box. */
.gate-held { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; }

/* The history fold-out. */
.gate-history { margin: 0; }
/* The closed fold reads as a control, not as disabled text: normal ink, the turning arrow, and a hover tint like the other buttons. */
.gate-history > summary { display: flex; align-items: center; gap: 10px; list-style: none; color: var(--ink); border-radius: var(--radius); }
.gate-history[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.gate-history > summary:hover { background: var(--surface-muted); }
.gate-history > summary::-webkit-details-marker { display: none; }
.gate-history > summary::before { content: ''; flex: none; width: 7px; height: 7px; margin: 0 2px 0 3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.gate-history[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) { .gate-history > summary::before { transition: transform .15s; } }
.gate-history-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 14px; min-width: 0; }
.gate-history-controls { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.gate-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); max-width: 100%; }
.gate-seg button { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 10px; background: transparent; font-size: 12px; font-weight: 600; color: var(--muted); }
.gate-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #142c3d29; }
.gate-seg button:hover { color: var(--ink); }
.gate-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gate-history-summary { font-size: 13px; font-weight: 600; }
.gate-timeline-wrap { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gate-timeline { display: flex; flex-direction: column; }
.gate-day h4 { margin: 12px 0 4px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gate-day:first-child h4 { margin-top: 0; }
.gate-day ol { list-style: none; margin: 0; padding: 0; }
.gate-event { display: grid; grid-template-columns: 20px 70px minmax(0, 1fr); gap: 8px; align-items: start; padding: 7px 0; border-top: 1px solid #edf1f4; font-size: 13px; }
.gate-event-glyph { width: 16px; height: 16px; margin-top: 2px; color: #5a6b7a; }
.gate-event.is-use .gate-event-glyph { color: var(--positive); }
.gate-event time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gate-event:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.gate-older { align-self: flex-start; }
.gate-history-note, .gate-history-foot, .gate-history-status, .gate-history-empty { font-size: 12px; line-height: 1.55; color: var(--muted); }
.gate-history-foot { padding-top: 10px; border-top: 1px solid #edf1f4; }
.gate-history-error { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid #eed6a3; border-radius: var(--radius-sm); background: var(--warning-soft); font-size: 13px; color: #4f3407; }
.gate-history-error svg { width: 16px; height: 16px; color: var(--warning); }

/* The server pages (/staff/gate, review, find, unlink, settings, resolver). */
.gate-heading-actions, .gate-action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gate-action-row form, .gate-heading-actions form { margin: 0; }
.gate-connection { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gate-connection p { margin: 0; font-size: 13px; font-weight: 600; }
.gate-dot { display: inline-block; margin-right: 2px; color: #9aa8b3; }
.gate-connection.is-connected .gate-dot { color: #2f8a5f; }
.gate-connection.is-stale .gate-dot { color: #c98a1b; }
.gate-connection.is-down .gate-dot { color: var(--danger); }
.gate-banner { margin: 0 0 10px; }
.gate-banner > svg { width: 16px; height: 16px; flex: none; }
/* Six summary cards share one row on a laptop and two per row on a phone. */
.gate-kpis { margin: 0 0 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gate-tabs { padding: 4px 16px 8px; }
/* p.panel-note already sits 16px in from the panel edge; only the plain lines need the inset. */
.gate-filter { margin: 0 16px 8px; }
.gate-footer { margin-top: 0; }
/* Server page headings keep their intro and read-only lines (other Orbit pages fold that line into an info pop-up; these pages have none). */
main.gate-page .gate-heading { flex-wrap: wrap; align-items: flex-start; }
main.gate-page .gate-heading > div:first-child { flex: 1 1 320px; min-width: 0; }
main.gate-page .gate-heading-actions { flex: 0 1 auto; max-width: 100%; }
main.gate-page .gate-heading > div > p.small-muted { display: block; flex-basis: 100%; margin: 3px 0 0; font-size: 13px; line-height: 1.5; }
/* Links in sentences and lists are accent blue, as elsewhere in Orbit. */
main.gate-page :is(p, li) > a:not(.button):not(.gate-pill) { color: var(--accent); font-weight: 600; text-decoration: none; }
main.gate-page :is(p, li) > a:not(.button):not(.gate-pill):hover { text-decoration: underline; }
main.gate-page summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.gate-back { margin: 0 0 12px; font-size: 13px; }
.gate-paused-more { margin: 8px 0 12px; font-size: 13px; }
.gate-page-actions { margin: 0; }
/* The body of a settings, resolver or unlink panel. */
.gate-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 2px 16px 16px; font-size: 13px; line-height: 1.5; min-width: 0; }
.gate-body > * { max-width: 100%; margin: 0; }
.gate-body > .gate-banner, .gate-body > .notice { align-self: stretch; margin: 0; }
.gate-body .gate-subhead { margin-top: 4px; }
.gate-status-line .gate-dot { color: #9aa8b3; }
.gate-status-line.is-connected .gate-dot { color: #2f8a5f; }
.gate-status-line.is-stale .gate-dot { color: #c98a1b; }
.gate-status-line.is-down .gate-dot { color: var(--danger); }
.gate-list-plain { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 0; }
.gate-last-problem { font-family: inherit; }
.gate-relationship { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 0; padding: 0; border: 0; font-size: 13px; }
.gate-relationship legend { margin-bottom: 2px; padding: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.gate-relationship label { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; }
.gate-relationship input, .gate-check input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
/* A decision form: radios, the reason box, then the button, all from the left edge. */
form.gate-link-form, form.gate-reject-form, .gate-confirm form, form.gate-unlink { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
main.gate-page :is(form.gate-link-form, form.gate-reject-form, .gate-confirm form, form.gate-unlink) > .button { align-self: flex-start; margin: 0; }
main.gate-page :is(form.gate-link-form, form.gate-reject-form, .gate-confirm form, form.gate-unlink) .filter-field { align-self: stretch; width: 100%; max-width: 420px; margin: 0; }
form.gate-unlink .form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; align-self: stretch; }
.panel > .gate-body:first-child { padding-top: 14px; }
.gate-reject > summary, .gate-confirm > summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent); }
.gate-reject > summary:hover, .gate-confirm > summary:hover { text-decoration: underline; }
.gate-reject[open], .gate-confirm[open] { margin-top: 6px; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfd; }
.gate-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 16px 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfd; }
.gate-bulk p { flex-basis: 100%; margin: 0; }
.gate-check { display: inline-flex; gap: 8px; align-items: center; min-height: 32px; font-size: 13px; font-weight: 600; cursor: pointer; }
td.gate-include .gate-check { min-width: 44px; min-height: 44px; justify-content: flex-start; }
.gate-review td.gate-decision { min-width: 260px; }
.gate-results { list-style: none; margin: 0; padding: 0 16px 12px; }
.gate-result { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; border-top: 1px solid #edf1f4; }
.gate-result:first-child { border-top: 0; }
.gate-result p { margin: 0; }
.gate-list .roll-table .button { min-height: 36px; padding: 6px 12px; }
.gate-list .roll-table td { vertical-align: middle; }
.gate-list .roll-table td small.block { max-width: 32ch; line-height: 1.45; }
/* Recent link decisions: one decision per line, separated, so a wrapped line is not read as the next decision. The list lines up with the
   panel's other content (16px in, no browser list indent) and keeps the same space on the right, so the last word never touches the edge. */
main.gate-page ol.history { margin: 0; padding: 0 16px 16px; list-style: none; }
main.gate-page ol.history li + li { margin-top: 6px; padding-top: 6px; border-top: 1px solid #edf1f4; }
.gate-action-row .gate-confirm[open] { flex-basis: 100%; }

/* Server pill links in tables keep the pill's own size. On touch layouts the shared rule would stretch every table link to 44px, so the
   pill stays 24px and an invisible layer centred on it gives the 44px target instead. */
main.gate-page .roll-table td a.gate-pill { position: relative; }
@media (max-width: 800px) {
  main.gate-page .roll-table td a.gate-pill { min-height: 24px !important; z-index: 2; } /* above the next card cell, which is positioned too */
  /* "Match found: review →" under a pill keeps its own 44px target without covering the pill's. */
  main.gate-page .roll-table td a.gate-review-link { margin-top: 10px; }
  main.gate-page .roll-table td a.gate-pill::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  .gate-relationship label, .gate-check, .gate-reject > summary, .gate-confirm > summary { min-height: 44px; }
  .gate-list .roll-table .button { min-height: 44px; }
}

/* Narrow panels (a tablet with the side menu, or a phone): each table row becomes a labelled card, so the gate status and what to check
   are never off to the side. The dashboard card lays its facts out two or three abreast; review cards stack. */
main.gate-page .gate-list, main.gate-page .gate-review { container: gate-table / inline-size; }
@container gate-table (max-width: 760px) {
  .roll-table, .roll-table thead, .roll-table tbody, .roll-table tr, .roll-table td { display: block; }
  .table-scroll table { min-width: 0; }
  .roll-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .roll-table tbody tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .roll-table tbody tr:first-child { border-top: 0; }
  .roll-table td { min-width: 0 !important; padding: 0 0 8px !important; border: 0; text-align: left; overflow-wrap: anywhere; }
  .roll-table td::before { content: attr(data-label); position: static; display: block; float: none; width: auto; margin: 0 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--muted); }
  .gate-list .roll-table tbody tr { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 2px 18px; }
  .gate-list .roll-table td { padding-bottom: 6px !important; }
  .gate-list .roll-table td:first-child, .gate-list .roll-table td[data-label="What to check"], .gate-list .roll-table td[data-label="Actions"], .gate-list .roll-table td[data-label="Suggested customer"], .gate-list .roll-table td[data-label="Suggested change"] { grid-column: 1 / -1; }
  /* The gate status gets the card's whole width, so a long pill ("Active · end date passed", "Active · as of 7:00 AM") is never squeezed
     into one narrow column. */
  .gate-list .roll-table td[data-label="Gate access"] { grid-column: 1 / -1; }
  /* The name is the card's title, so its column label is left out. */
  .gate-list .roll-table td:first-child::before { content: none; display: none; }
  .gate-list .roll-table td:first-child { font-size: 14px; }
  .gate-review td.gate-include { display: flex; align-items: center; gap: 4px; padding-bottom: 0 !important; }
  .gate-review td.gate-include::before { margin: 0; }
  .gate-review td.gate-decision { min-width: 0; }
}
/* Sample text in a form field is light grey italic "e.g." everywhere. */
input[placeholder^="e.g."]::placeholder, textarea[placeholder^="e.g."]::placeholder { color: #98a4af; font-style: italic; opacity: 1; }

/* The card follows its own width (the side menu takes part of a tablet's screen), so it uses container queries. */
.gate-card { container: gate-card / inline-size; }
@container gate-card (max-width: 900px) { .gate-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container gate-card (max-width: 720px) {
  .gate-record { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
  .gate-record-name { flex: 1 1 100%; }
  .gate-record-end { display: none; }
  .gate-card .button.gate-record-unlink { margin-left: auto; }
}
@container gate-card (max-width: 560px) {
  .gate-card-body { padding-inline: 12px; }
  .gate-card .gate-source { margin-inline: 12px; }
  .gate-card > .gate-notice.is-flash { margin-inline: 12px; }
  .gate-event { grid-template-columns: 18px minmax(0, 1fr); gap: 2px 8px; }
  .gate-event time, .gate-event-text { grid-column: 2; }
}
@container gate-card (max-width: 460px) {
  .gate-actions { flex-direction: column; align-items: stretch; }
  /* Every card state's buttons are full width on a phone (the state blocks line their text up on the left, which would shrink the row). */
  .gate-state > .gate-actions { align-self: stretch; }
  .gate-actions .button, .gate-form, .gate-form .button { width: 100%; min-height: 44px; }
  .gate-actions .gate-review-link { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; }
  .gate-record-actions { flex: 1 1 100%; }
  .gate-card .button.gate-record-unlink, .gate-card .button.gate-record-change { flex: 1 1 100%; margin-left: 0; min-height: 44px; }
  .gate-older { align-self: stretch; }
  .gate-seg { width: 100%; }
  .gate-seg button { flex: 1 1 auto; }
}
@container gate-card (max-width: 420px) { .gate-facts { grid-template-columns: 1fr; } }
@container gate-card (max-width: 460px) { .gate-phone-sides { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .gate-source-line { margin-inline: 12px; } }
@media (max-width: 800px) { a.gate-heading-pill { min-height: 44px; } }

/* Compact public pages (help, signed out) in the sign-in lake theme. */
body.landing.quiet { background: #102d50; }
body.landing .quiet-main { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; box-sizing: border-box; width: 100%; max-width: none; margin: 0; padding: 28px 16px; }
body.landing .quiet-card { width: min(440px, 100%); box-sizing: border-box; background: #fafbfd; color: #243b58; border-radius: 12px; padding: 28px 24px 20px; box-shadow: 0 18px 44px #03132d66; }
body.landing .quiet-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
body.landing .quiet-brand .orbit-logo { color: #102d50; }
body.landing .quiet-brand .orbit-logo > span { font-size: 28px; letter-spacing: -1.4px; }
body.landing .quiet-brand .logo-mark { width: 28px; height: 28px; }
body.landing .quiet-places { display: flex; align-items: center; gap: 8px; margin: 0; }
body.landing .quiet-places img:first-child { display: block; width: 108px; height: auto; }
body.landing .quiet-places img:last-child { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #f4f7fc; }
body.landing .quiet-card h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.8px; font-weight: 560; line-height: 1.15; color: #102d50; }
body.landing .quiet-lede { margin: 0 0 16px; color: #5c7090; font-size: 14px; line-height: 1.5; }
body.landing .quiet-form { display: grid; gap: 12px; }
body.landing .quiet-card input:not([type="hidden"]), body.landing .quiet-card textarea, body.landing .quiet-card select { width: 100%; box-sizing: border-box; min-height: 48px; border: 1px solid #d8e1ec; border-radius: 8px; padding: 10px 14px; font: inherit; font-size: 16px; font-weight: 400; color: #243b58; background: #fff; }
body.landing .quiet-card textarea { min-height: 96px; resize: vertical; }
body.landing .quiet-card input:focus-visible, body.landing .quiet-card textarea:focus-visible { outline: 3px solid #245b99; outline-offset: 2px; }
body.landing .quiet-card .login-submit { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; min-height: 48px; margin-top: 4px; border: 0; border-radius: 8px; background: #245b99; color: #fff; font-size: 15px; font-weight: 600; text-decoration: none; }
body.landing .quiet-card .login-submit:hover { background: #1d4e84; }
body.landing .quiet-card .login-submit:focus-visible, body.landing .quiet-card .text-link:focus-visible, body.landing .quiet-brand .orbit-logo:focus-visible { outline: 3px solid #245b99; outline-offset: 3px; }
body.landing .quiet-back { margin: 14px 0 0; text-align: center; }
body.landing .quiet-foot { margin: 0; color: #c5d7ea; font-size: 12px; text-align: center; }
@media (max-width: 480px) {
  body.landing .quiet-main { justify-content: flex-start; padding: 12px 12px 20px; }
  body.landing .quiet-card { padding: 20px 16px 16px; }
  body.landing .quiet-card h1 { font-size: 24px; }
  body.landing .quiet-brand { flex-wrap: wrap; }
}

/* E-mail sign-in link confirm page: a larger centred card, the business logo on a white band (holds up in dark mode), one big button in that business's accent. */
body.landing.signin-confirm { --signin-accent: #245b99; --signin-accent-strong: #1d4e84; }
body.landing.signin-confirm.portal-theme-park { --signin-accent: #15803d; --signin-accent-strong: #116632; }
body.landing.signin-confirm.portal-theme-marina { --signin-accent: #0e7490; --signin-accent-strong: #0b5d73; }
body.landing.signin-confirm.portal-theme-mac { --signin-accent: #0b5c97; --signin-accent-strong: #084a7a; }
body.landing.signin-confirm .quiet-main { gap: 18px; }
body.landing.signin-confirm .signin-card { width: min(520px, 100%); padding: 0 0 24px; overflow: hidden; text-align: center; border-top: 6px solid var(--signin-accent); }
body.landing.signin-confirm .signin-logos { display: flex; align-items: center; justify-content: center; gap: 28px; min-height: 150px; margin: 0 0 24px; padding: 24px 28px; background: #fff; border-bottom: 1px solid #e3e9f1; }
body.landing.signin-confirm .signin-logo { display: block; width: auto; height: auto; max-width: 100%; }
body.landing.signin-confirm .signin-logo-park { max-height: 132px; }
body.landing.signin-confirm .signin-logo-marina { max-height: 120px; }
body.landing.signin-confirm .signin-logo-mac { max-height: 96px; }
body.landing.signin-confirm .signin-logos-pair .signin-logo-marina { max-height: 92px; max-width: 58%; }
body.landing.signin-confirm .signin-logos-pair .signin-logo-park { max-height: 104px; }
body.landing.signin-confirm .signin-card h1, body.landing.signin-confirm .signin-card .quiet-lede, body.landing.signin-confirm .signin-card .quiet-form, body.landing.signin-confirm .signin-card .signin-note, body.landing.signin-confirm .signin-card .gsi-block, body.landing.signin-confirm .signin-card .or-sep, body.landing.signin-confirm .signin-card .google-block, body.landing.signin-confirm .signin-card .notice { margin-left: 32px; margin-right: 32px; }
body.landing.signin-confirm .signin-card h1 { font-size: 32px; }
body.landing.signin-confirm .signin-card .quiet-lede { margin-bottom: 22px; font-size: 17px; color: #3d5373; }

body.landing.signin-confirm .signin-card .gsi-block { margin-top: 0; }
body.landing.signin-confirm .signin-card a.gsi-button { max-width: none; box-sizing: border-box; }
body.landing.signin-confirm .signin-card .signin-link-instead { width: 100%; min-height: 44px; box-sizing: border-box; }
body.landing.signin-confirm .signin-go { min-height: 56px; font-size: 18px; background: var(--signin-accent); }
body.landing.signin-confirm .signin-go:hover { background: var(--signin-accent-strong); }
body.landing.signin-confirm .signin-go:focus-visible { outline-color: var(--signin-accent); }
body.landing.signin-confirm .signin-note { margin-top: 16px; margin-bottom: 0; color: #5c7090; font-size: 13px; line-height: 1.5; }
body.landing.signin-confirm .quiet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
body.landing.signin-confirm .quiet-foot a { color: #e6eef8; }
body.landing.signin-confirm .signin-orbit { display: inline-flex; align-items: center; gap: 6px; }
body.landing.signin-confirm .signin-orbit .logo-mark { width: 16px; height: 16px; }
@media (max-width: 480px) {
  body.landing.signin-confirm .quiet-main { justify-content: center; min-height: 100svh; padding: 16px 12px; }
  body.landing.signin-confirm .signin-card { padding: 0 0 20px; }
  body.landing.signin-confirm .signin-logos { min-height: 120px; gap: 18px; padding: 20px 18px; margin-bottom: 20px; }
  body.landing.signin-confirm .signin-logo-park { max-height: 112px; }
  body.landing.signin-confirm .signin-card h1, body.landing.signin-confirm .signin-card .quiet-lede, body.landing.signin-confirm .signin-card .quiet-form, body.landing.signin-confirm .signin-card .signin-note, body.landing.signin-confirm .signin-card .gsi-block, body.landing.signin-confirm .signin-card .or-sep, body.landing.signin-confirm .signin-card .google-block, body.landing.signin-confirm .signin-card .notice { margin-left: 20px; margin-right: 20px; }
  body.landing.signin-confirm .signin-card h1 { font-size: 28px; }
  body.landing.signin-confirm .signin-card .quiet-lede { font-size: 16px; }
}

/* ==========================================================================
   Neutral dense theme (October 18). Borrows the look of shadcn/ui (zinc neutrals, hairline borders, 6-8px radii,
   barely-there shadows, quiet table headers, ring focus) without its code. Last in the file so it re-tones the
   shared tokens and components above. Desktop sizes only shrink controls; at 800px and below the 44px touch rules
   above still apply. The sign-in pages keep their own theme.
   ========================================================================== */
:root {
  --canvas: #f8f8f9;
  --surface: #ffffff;
  --surface-muted: #f4f4f5;
  --surface-2: #f4f4f5;
  --ink: #09090b;
  --ink-2: #3f3f46;
  --muted: #62626b;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --line-subtle: #f0f0f2;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --primary: #18181b;
  --primary-hover: #27272a;
  --positive: #15803d;
  --positive-soft: #f0fdf4;
  --warning: #a16207;
  --warning-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --nav: #18181b;
  --nav-muted: #a1a1aa;
  --nav-active: #27272a;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px 0 rgba(9, 9, 11, .05);
  --shadow-dialog: 0 10px 25px -5px rgba(9, 9, 11, .14), 0 8px 10px -6px rgba(9, 9, 11, .08);
  --ring: #a1a1aa;
  --focus: 0 0 0 3px rgba(24, 24, 27, .16);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
body { font-size: 13px; line-height: 1.45; }
body:not(.landing) { background: var(--canvas); color: var(--ink); }

/* Focus: one ring style everywhere (the dark sidebar keeps its white outline). */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
.staff-page .filter-field input:focus-visible, .staff-page .filter-field select:focus-visible, .staff-page .filter-field textarea:focus-visible { outline: none; border-color: var(--ring) !important; box-shadow: var(--focus); }
.search-field:focus-within { outline: none; border-color: var(--ring); box-shadow: var(--focus); }

/* Page headers */
h1, h2, h3 { letter-spacing: -.01em; font-weight: 600; color: var(--ink); }
.page-heading { margin: 2px 0 8px; gap: 12px; }
.page-heading h1 { font-size: 18px; letter-spacing: -.015em; line-height: 1.25; }
.eyebrow, .page-heading .eyebrow { letter-spacing: .02em; font-weight: 500; color: var(--muted); text-transform: none; }
.micro-label { letter-spacing: .01em; font-weight: 500; }

/* Cards / panels */
.panel, .operation-card, .money-card, .summary-strip, .kpi-card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.panel-header h2, .staff-page .panel-header h2 { font-size: 14px; font-weight: 600; }
.panel + .panel, .rentals-summary + .panel, .group-grid + .panel, .notice + .panel { margin-top: 12px; }
.kpi-grid { gap: 8px; margin: 8px 0 12px; }
.staff-page .panel > form:last-child, .staff-page .panel > .filters:last-child, .staff-page .panel > p:last-child { margin-bottom: 12px; }
.staff-page .panel > .empty-state, .staff-page .panel > p.empty-state { padding: 0; }
.staff-page .panel > .panel-header + p.panel-note { margin-top: 0; }
.kpi-card { border-top: 1px solid var(--line); padding: 8px 12px; }
.kpi-card strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-card.warn strong { color: var(--warning); } .kpi-card.bad strong { color: var(--danger); }
/* Shared dashboard figure: label above, one number, note underneath. The payable strip and the overview cards use it.
   These selectors outrank .kpi-card strong and .summary-strip strong so every tile uses one size. */
a.stat, .stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; min-width: 0; }
.stat-row { display: flex; flex-wrap: wrap; align-items: stretch; }
.stat-row > .stat { flex: 1 1 8.25rem; padding: 8px 12px; border-left: 1px solid var(--line); }
.stat-row > .stat:first-child { border-left: 0; }
.stat .stat-label { display: block; margin: 0; font-size: 11px; line-height: 1.25; font-weight: 500; letter-spacing: .01em; color: var(--muted); }
.stat .stat-value { display: block; margin: 0; font-size: 20px; line-height: 1.15; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat .stat-note { display: block; margin: 0; max-width: 16rem; font-size: 11px; line-height: 1.3; font-weight: 400; color: var(--muted); }
.stat.warn .stat-value { color: var(--warning); }
.kpi-card.stat { gap: 1px; }
.kpi-card.stat .kpi-open { margin-top: 4px; font-size: 11px; line-height: 1.3; color: var(--accent); }
a.kpi-card:hover, a.kpi-card:focus-visible { transform: none; border-color: var(--line-strong); background: #fafafa; box-shadow: var(--shadow); }
.group-grid a { border-radius: var(--radius); padding: 10px 12px; min-height: 0; box-shadow: var(--shadow); }
.group-grid a:hover { border-color: var(--line-strong); background: #fafafa; }
.group-grid strong { font-size: 20px; letter-spacing: -.01em; }

/* Tables: quiet sentence-case headers, hairline row dividers, tabular numbers, no zebra. */
th, .roll-table thead th, .account-table th { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); background: #fafafa; border-color: var(--line); }
td { border-bottom-color: var(--line-subtle); }
.roll-table tbody tr:nth-child(even) { background: transparent; }
.roll-table tbody tr:hover, .roll-table tbody tr:hover > td { background: #fafafa; }
.roll-table td.money, .roll-table td.num, td.num, th.num { font-variant-numeric: tabular-nums; }
.sort-link { color: var(--muted); }
.sort-button { color: var(--muted); font-weight: 500; }
.sort-button:hover { background: var(--surface-muted); color: var(--ink); }
.sort-link.active, .roll-table a.sort-link.active { color: var(--ink); }
@media (min-width: 761px) {
  table th, table td, .roll-table td, .roll-table th { padding: 6px 12px; }
  .roll-table th.sortable, .account-table th.sortable { padding: 0; }
  .sort-link, .account-table .sort-link { min-height: 30px; padding: 6px 12px; }
  table th:has(> .sort-button) { padding: 0; }
  .sort-button, .account-table .sort-button { min-height: 30px; padding: 6px 12px; }
  .roll-table.compact td, .roll-table.compact th { padding-top: 5px; padding-bottom: 5px; }
}

/* Buttons: 32px on desktop, solid near-black primary, outline secondary. */
.button, a.button, button.button { border-radius: var(--radius-sm); font-weight: 500; font-size: 13px; gap: 6px; }
.button.primary, button.primary, a.primary, .primary.button { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow); }
.button.primary:hover, button.primary:hover, a.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button.secondary, button.secondary, a.secondary, .secondary.button { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.button.secondary:hover, button.secondary:hover, a.secondary:hover { background: var(--surface-muted); border-color: var(--line-strong); }
.icon-button:hover { background: var(--surface-muted); }
.text-button { color: var(--accent); font-weight: 500; }
@media (min-width: 801px) {
  .button, a.button, button.button, .filters .button, .pager-nav .button { min-height: 32px; padding: 0 12px; }
  .icon-button { width: 32px; height: 32px; }
}

/* Inputs and selects: 32px, hairline border, ring on focus. */
input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not([type=button]), select, textarea,
.staff-page .filter-field input:not([type=checkbox]):not([type=radio]), .staff-page .filter-field select, .staff-page .filter-field textarea,
.filter-field select, .filters input[type="date"] { border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-family: inherit; }
input:hover:not(:focus):not([type=checkbox]):not([type=radio]), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--line-strong); }
input::placeholder, textarea::placeholder { color: #a1a1aa; }
.search-field input, .search-field input:hover, .search-field input:focus-visible { border: 0 !important; box-shadow: none !important; background: transparent; padding: 0; }
.search-field { border-color: var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow); }
.filter-field { color: var(--ink-2); font-weight: 500; }
@media (min-width: 801px) {
  .staff-page .filter-field input:not([type=checkbox]):not([type=radio]), .staff-page .filter-field select,
  .filter-field select, .filters input[type="date"], .filters .search-field, .form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select { min-height: 32px; padding: 4px 10px; font-size: 13px; }
  .filters .search-field input { min-height: 28px; }
  .staff-page .filter-field textarea { min-height: 64px; padding: 6px 10px; font-size: 13px; }
  .staff-page .filters, .staff-page .form-grid { gap: 8px 12px; }
}

/* Portal fields stay 16px so iOS Safari does not zoom on focus (after the sizes above, which they must beat). The amount due is the strongest thing on its card; credit and unknown keep their own colours. */
.portal-page input:not([type=checkbox]):not([type=radio]), .portal-page select, .portal-page textarea { font-size: 16px; }
.portal-page .balance:not(.credit):not(.unknown) { color: var(--ink); font-weight: 700; }

/* Badges: small bordered pills. */
.badge, .count-badge, .tab-count { border-radius: 999px; font-weight: 500; line-height: 1.4; white-space: nowrap; border: 1px solid var(--line); background: var(--surface-muted); color: var(--ink-2); }
.badge { padding: 1px 8px; gap: 4px; }
.count-badge, .tab-count { padding: 0 7px; }
.badge.warning { color: var(--warning); background: var(--warning-soft); border-color: #fde68a; }
.badge.positive { color: var(--positive); background: var(--positive-soft); border-color: #bbf7d0; }
.badge.blue { color: var(--accent-hover); background: var(--accent-soft); border-color: #bfdbfe; }
.badge.danger { color: var(--danger); background: var(--danger-soft); border-color: #fecaca; }
.segmented a.selected .tab-count { background: var(--surface-muted); color: var(--ink); }
.chip-filter { border-radius: 999px; background: var(--surface-muted); color: var(--ink); border-color: var(--line); font-weight: 500; }
.chip-filter:hover, .chip-filter:focus-visible { background: #e4e4e7; }

/* Notices: hairline, tinted, compact. */
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0 12px; }
.notice.gate-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 2px 8px; margin: 0 0 2px; }
.notice.gate-prompt .gate-prompt-text { min-width: 0; }
.notice.gate-prompt .gate-pill { min-height: 18px; padding: 0 6px; font-size: 11px; }
.notice.gate-prompt .button { min-height: 22px; padding: 0 7px; }
.notice.gate-prompt .slip-act { margin: 0; }
.notice.gate-prompt .slip-act[open] { flex-basis: 100%; }
.notice.gate-prompt .slip-act > form, .notice.gate-prompt .slip-act > ul, .notice.gate-prompt .slip-act > p { flex-basis: 100%; margin: 4px 0 0; }
/* Gate access prompts queue: the same compact staff table as the lists below it. Cells wrap instead of running off the right edge. */
.gate-prompts .roll-table { width: 100%; table-layout: fixed; }
.gate-prompts .roll-table th,
.gate-prompts .roll-table td { min-width: 0; overflow-wrap: anywhere; vertical-align: top; }
.gate-prompts .gp-customer { width: 18%; }
.gate-prompts .gp-status { width: 12%; }
.gate-prompts .gp-slip { width: 18%; }
.gate-prompts .gp-actions { width: 22%; }
.gate-prompts.gate-list .roll-table td[data-label="Actions"] .gate-action-row { flex-direction: row; flex-wrap: wrap; max-width: 100%; }
.gate-prompts .slip-act { margin: 6px 0 0; }
.people-on-slip .panel-header { margin-bottom: 0; }
.people-slip { list-style: none; margin: 0; padding: 4px 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.people-slip li, .people-on-slip .people-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 28px; }
.people-on-slip .inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; }
.people-on-slip .button, .people-on-slip input, .people-on-slip select { min-height: 24px; }
.people-on-slip .button { padding: 1px 8px; }
.people-on-slip .slip-act { margin: 0 12px 8px; }
.people-on-slip .people-add { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.neutral-notice { background: #fafafa; color: var(--ink-2); }
.warning-notice, .notice.warning { background: var(--warning-soft); border-color: #fde68a; color: #854d0e; }
.flag-panel { border-color: #fde68a; background: var(--warning-soft); }
.source-ribbon { background: #fafafa; border-color: var(--line); color: var(--ink-2); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; }

/* Tabs: segmented track with a raised white selection; underline tabs use ink, not blue. */
.segmented { background: var(--surface-muted); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px; gap: 2px; }
.segmented a { border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.segmented a:hover { color: var(--ink); }
.segmented a.selected, .segmented a[aria-current] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(9, 9, 11, .08); }
@media (min-width: 801px) { .segmented a { min-height: 28px; padding: 4px 10px; } }
.panel-tabs .current { border-bottom-color: var(--ink); color: var(--ink); }
.acct-nav .chip { border-color: var(--line); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--surface); }
.acct-nav .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
@media (min-width: 801px) { .acct-nav .chip { min-height: 30px; padding: 0 10px; } }

/* Pager */
.pager-number.current, .pager-sizes a.selected { box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.pager-number:hover, .pager-sizes a:hover { background: var(--surface-muted); }
@media (min-width: 801px) { .pager-number, .pager-gap, .pager-sizes a { min-width: 30px; min-height: 30px; } }

/* Dialogs */
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; box-shadow: var(--shadow-dialog); }
dialog::backdrop { background: rgba(9, 9, 11, .45); backdrop-filter: none; }
dialog h2 { font-size: 16px; letter-spacing: -.01em; margin-bottom: 10px; }
dialog p { line-height: 1.55; margin-bottom: 10px; }

/* Disclosure / details */
.disclosure > summary { color: var(--ink-2); font-weight: 500; padding: 8px 16px; }
@media (min-width: 801px) { .disclosure > summary { min-height: 32px; } }

/* Sidebar and top bar: neutral zinc instead of navy. */
.sidebar { background: var(--nav); }
.sidebar .nav-link { color: #d4d4d8; }
.sidebar .nav-link:hover { background: var(--nav-active); color: #fff; }
.sidebar .nav-link.active { background: var(--nav-active); color: #fff; box-shadow: inset 2px 0 0 #fafafa; }
.sidebar .nav-group > summary { color: #d4d4d8; }
.brand-mark { border-color: #a1a1aa; color: #e4e4e7; } .brand-mark span { background: #a1a1aa; }
.workspace-caption, .profile small { color: var(--nav-muted); }
.avatar.owner { background: #3f3f46; }
.topbar { border-bottom-color: var(--line); }
.demo-pill { background: var(--surface-muted); color: var(--ink-2); border-color: var(--line); border-radius: var(--radius-sm); }

/* Check matching and "Back to register": the drill-down's way back, the register row it came from, and the small action forms on the check record. */
.crumbs.return-back { margin: 0 0 12px; }
.roll-table tr:target > td { background: var(--warning-soft); }
.checks-page .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 0; }
.checks-page .checkbox-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; }
.checks-page .facts.check-detail { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; margin: 4px 0 8px; }
.checks-page .facts.check-detail dt { font-size: 12px; color: var(--muted); }
.checks-page .facts.check-detail dd { margin: 2px 0 0; }
.checks-page .summary-strip { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 10px 14px; }
.checks-page .summary-strip > div { display: flex; flex-direction: column; gap: 2px; }
.roll-table tr[id] { scroll-margin-top: 96px; }
/* Loan tracker: badges stay on one line in narrow cells; the assumed-terms banner and the candidate explanation read as blocks; the inline split form. */
.loans-page .tag { white-space: nowrap; }
.loans-page .notice.loan-assumed, .loans-page .notice.loan-explain { display: block; }
.loans-page .loan-explain ul { margin: 4px 0 0; padding-left: 18px; list-style: disc; }
.loans-page .loan-explain li + li { margin-top: 3px; }
.loans-page .loan-explain p { margin: 6px 0 0; }
.loans-page .loan-split { display: grid; grid-template-columns: 7em 7em; gap: 4px; align-items: center; }
.loans-page .loan-split input { width: 100%; }
.loans-page .loan-split label:has(input[name="note"]) { grid-column: 1 / -1; }
.loans-page .loan-split button { grid-column: 1 / -1; justify-self: start; }
.loans-page .loan-cands td { overflow-wrap: normal; word-break: normal; }
.loans-page .notice.loan-overlap { display: block; }
.loans-page .loan-record .form-actions { flex-wrap: wrap; gap: 6px; }
.loans-page .loan-alloc .checkbox-line { display: flex; align-items: center; gap: 6px; font-weight: 400; }
.loans-page .loan-statements .inline-form { display: inline-flex; }
.journals-page .journal-form { max-width: 980px; }
.journals-page .journal-line { border-top: 1px solid var(--line); padding-top: 10px; }
.journals-page .journal-line .micro-label { margin: 0; }
@media (min-width: 761px) { .journals-page .journal-line { grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(110px, 1fr)) minmax(160px, 1.5fr); } }
.journals-page .inline-form { display: inline-flex; margin: 0; }
.journals-page .tag { white-space: nowrap; }
.journals-page > h3.form-subhead { margin-left: 16px; margin-right: 16px; }
.loans-page .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; }
.loans-page .loan-form .checkbox-line { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-weight: 400; }
.loans-page .summary-strip { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 10px 14px; }
.loans-page .summary-strip > div { display: flex; flex-direction: column; gap: 2px; }
/* "No longer a customer" (Orbit-side flag) */
.former-status{margin:4px 0 8px}.former-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;font-size:.875rem}
.former-status.is-former .former-line{color:var(--muted,#6b7280)}.former-action{padding:2px 10px;font-size:.8125rem}.former-pill{margin-left:8px;vertical-align:middle}
.nickname-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin:4px 0 8px}.nickname-form .filter-field{margin:0}.nickname-form input[type="text"]{width:16rem;max-width:100%;min-height:44px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink);font:inherit;font-size:13px;padding:4px 10px;box-shadow:var(--shadow)}
@media (min-width:801px){.nickname-form input[type="text"]{min-height:32px}}
.customer-note-form{display:flex;flex-direction:column;gap:6px;margin:4px 0 10px}.customer-note-form .filter-field{margin:0}.customer-note-form textarea{width:100%;min-height:72px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink);font:inherit;font-size:14px;padding:8px 10px;box-sizing:border-box;resize:vertical}.customer-note-form .button{align-self:flex-start}
.customer-notes-list{list-style:none;margin:0;padding:0}.customer-notes-list .customer-note{padding:8px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}.customer-notes-list .customer-note:first-child{border-top:0}.customer-note-body{white-space:pre-line}
.gate-dismiss{margin-top:6px}
/* A value or date that fails a check (insurance V06 checklist, request dashboard): shared red */
.value-fail{color:var(--danger);font-weight:600}
.check-table td.check-values{white-space:normal}.check-table .check-values span{display:inline-block;margin-right:10px}
.gate-candidate-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:4px 0}.gate-candidate-row .gate-action-row{display:inline-flex;gap:6px;margin:0}.gate-inline-form{display:inline}

/* Month-end close (/staff/close). Grey = not started, amber = in progress or needs attention, red = check fails, green = done. */
.close-page { --c-grey: #a1a1aa; --c-amber: #d97706; --c-red: #dc2626; --c-green: #16a34a; }
.close-page .close-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-end; }
.close-page .close-head h2 { margin: 0; }
.close-picker { display: flex; gap: 4px; align-items: center; }
.close-picker input[type="month"] { height: 30px; padding: 2px 6px; font: inherit; font-size: 13px; }
.close-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c-grey); }
.close-dot.amber { background: var(--c-amber); } .close-dot.red { background: var(--c-red); } .close-dot.green { background: var(--c-green); }
.close-tag { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.6; white-space: nowrap; background: #f1f1f3; color: #52525b; }
.close-tag.amber { background: #fff1d9; color: #805111; } .close-tag.red { background: var(--danger-soft); color: var(--danger); } .close-tag.green { background: #e8f4ec; color: #266044; }
.close-progress { margin: 10px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm, 6px); background: var(--surface); }
.close-progress-top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; }
.close-counts { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; font-size: 12px; color: var(--muted); }
.close-counts span { display: inline-flex; gap: 5px; align-items: center; }
.close-bar { display: block; width: 100%; height: 6px; margin-top: 8px; border: 0; border-radius: 3px; background: var(--line-subtle); appearance: none; overflow: hidden; }
.close-bar::-webkit-progress-bar { background: var(--line-subtle); border-radius: 3px; }
.close-bar::-webkit-progress-value { background: var(--c-green); border-radius: 3px; }
.close-bar::-moz-progress-bar { background: var(--c-green); border-radius: 3px; }
.close-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.close-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.close-item { border: 1px solid var(--line); border-left: 3px solid var(--c-grey); border-radius: var(--radius-sm, 6px); background: var(--surface); padding: 7px 10px; }
.close-item.amber { border-left-color: var(--c-amber); } .close-item.red { border-left-color: var(--c-red); background: #fffafa; } .close-item.green { border-left-color: var(--c-green); }
.close-item-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.close-item-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.close-order { min-width: 16px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.close-due { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.close-due.late { color: var(--danger); font-weight: 600; }
.close-assignee { font-size: 11.5px; color: var(--muted); padding-left: 6px; border-left: 1px solid var(--line); }
.close-item-body { padding-left: 33px; font-size: 12.5px; }
.close-item-body p { margin: 3px 0; }
.close-result.red { color: var(--danger); } .close-result.amber { color: #7a4b0c; } .close-result.green { color: #1f5a3a; }
.close-lines, .close-att { margin: 3px 0; padding-left: 16px; font-size: 12px; }
.close-lines li { margin: 1px 0; } .close-lines li.bad, .close-lines li.bad a { color: var(--danger); } .close-lines li.warn { color: #7a4b0c; } .close-lines li.ok { color: #3f3f46; }
.close-who { color: #1f5a3a; font-size: 12px; } .close-note { padding: 3px 7px; border-radius: 4px; background: var(--surface-muted); font-size: 12px; }
.close-actions { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 5px; }
.close-form { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 0; }
.close-form input[type="text"], .close-form input:not([type]), .close-form textarea { min-width: 200px; padding: 3px 6px; font: inherit; font-size: 12px; }
.close-form .button.small, .close-actions .button.small { padding: 3px 10px; font-size: 12px; }
.close-more summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.close-more[open] { flex-basis: 100%; display: grid; gap: 4px; }
.close-att .inline { display: inline; } .close-att .link-button { font-size: 11px; }
.close-months ul { list-style: none; margin: 0; padding: 4px 10px 8px; }
.close-months li { display: flex; gap: 6px; align-items: center; padding: 3px 0; font-size: 12.5px; border-bottom: 1px solid var(--line-subtle); }
.close-months li a { min-width: 70px; } .close-months li .small-muted { margin-left: auto; }
.close-months li.current a { font-weight: 700; }
.close-tpl { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.close-tpl-form { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-end; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--radius-sm, 6px); background: var(--surface); font-size: 12px; }
.close-tpl-form label { display: grid; gap: 2px; min-width: 150px; } .close-tpl-form label.title { flex: 1 1 240px; } .close-tpl-form label.wide { flex: 2 1 300px; } .close-tpl-form label.narrow { min-width: 0; width: 110px; }
.close-tpl-form label span { font-size: 11px; color: var(--muted); }
.close-tpl-form input, .close-tpl-form select { padding: 3px 6px; font: inherit; font-size: 12.5px; }
.close-kind { min-width: 160px; align-self: center; } .close-tpl-actions { display: inline-flex; gap: 4px; align-items: center; margin-left: auto; }
.close-tpl-add { border-style: dashed; } .close-sub { margin: 14px 0 4px; font-size: 13px; }
@media (max-width: 860px) {
  .close-layout { grid-template-columns: 1fr; }
  .close-item-body { padding-left: 0; }
  .close-due { margin-left: 0; }
  .close-counts { margin-left: 0; }
  .close-form input:not([type]), .close-form textarea { min-width: 0; flex: 1 1 160px; }
}

/* Number search (ADR-020): grouped matches under the top search box, and the administrator "Txn #" copy chip. */
.topbar-search { position: relative; }
.number-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.number-results[hidden] { display: none; }
.number-results-status { margin: 0; padding: 4px 12px 6px; font-size: 12px; color: var(--muted); }
.number-group-title { margin: 0; padding: 6px 12px 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.number-list { list-style: none; margin: 0; padding: 0; }
.number-item { display: grid; grid-template-columns: minmax(84px, auto) auto auto 1fr auto; gap: 2px 10px; align-items: baseline; padding: 6px 12px; color: var(--ink); text-decoration: none; font-size: 13px; }
.number-item:hover, .number-item:focus { background: var(--accent-soft); outline: none; }
.number-type { font-weight: 700; }
.number-biz { font-size: 12px; font-weight: 700; color: var(--muted); }
.number-biz.biz-marina { color: #0e5f78; } .number-biz.biz-park { color: #166534; }
.number-date { color: var(--muted); white-space: nowrap; }
.number-amount { grid-column: 5; grid-row: 1; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.number-name { grid-column: 1 / 5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.number-match { grid-column: 5; font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; }
.number-more { display: block; margin: 0; padding: 2px 12px 8px; font-size: 12px; font-weight: 700; }
.search-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.search-section { min-width: 0; }
.search-section .result-list { margin: 0; }
@media (min-width: 1100px) { .search-sections { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 720px) {
  .search-sections { grid-template-columns: 1fr; }
  .number-item { grid-template-columns: minmax(0, 1fr) auto; }
  .number-amount, .number-match { grid-column: auto; }
}
.txn-chip { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-muted); color: var(--ink-2); font: inherit; font-size: 11px; font-weight: 600; line-height: 1.6; cursor: pointer; white-space: nowrap; vertical-align: middle; }
.txn-chip:hover, .txn-chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.txn-detail .txn-related a { margin-right: 2px; }

/* Suggested match on a gate record with no customer (gate list and gate record page). The cell wraps; Link and Not this person sit side by side. */
.gate-suggestion { max-width: 34ch; min-width: 0; overflow-wrap: anywhere; }
.gate-suggestion .gate-suggestion-line { margin: 0 0 6px; }
.gate-suggestion .gate-action-row { align-items: flex-start; }
.gate-suggestion form.gate-suggest-link .filter-field { max-width: 30ch; }
.gate-pick > summary { display: inline-flex; align-items: center; min-height: 32px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent); }
.gate-pick > summary:hover { text-decoration: underline; }
.gate-pick[open] { margin-top: 6px; }
.gate-pick select { max-width: 100%; }
@media (max-width: 800px) { .gate-pick > summary { min-height: 44px; } }
.gate-tab-hint { font-weight: 400; }
.gate-list .roll-table td[data-label="Actions"] .gate-action-row { flex-direction: column; align-items: flex-start; }

/* Honeypot fields on public forms: off-screen for people, still in the form for bots. Never inline style (CSP blocks it). */
.hp-field{position:absolute!important;left:-10000px!important;top:auto!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}

/* Jarvis: a panel over the page, a chat like the Claude app. It stays open across pages (the page script reopens it). */
.assistant-scrim { position: fixed; inset: 0; background: transparent; z-index: 30; pointer-events: none; }
.assistant-scrim.is-open { pointer-events: auto; }
.assistant-panel { position: fixed; top: 0; right: 0; z-index: 31; width: min(26rem, 100%); height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(16, 24, 40, .12); transform: translateX(100%); transition: transform 160ms ease; }
.assistant-panel.is-open { transform: translateX(0); }
.assistant-panel.is-dropping { outline: 2px dashed var(--accent); outline-offset: -6px; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.assistant-head-tools { display: flex; gap: 6px; }
.assistant-head-tools .button { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.assistant-head-tools .button[aria-expanded="true"] { border-color: var(--accent); color: var(--accent-hover); }
.assistant-threads { display: flex; flex-direction: column; gap: 4px; overflow: auto; max-height: 40%; flex: 0 0 auto; padding: 4px 0; border-bottom: 1px solid var(--line); }
.assistant-threads[hidden] { display: none; }
.assistant-thread { border: 0; background: transparent; color: var(--ink); border-radius: var(--radius-sm); font: inherit; font-size: 13px; line-height: 1.3; padding: 6px 8px; cursor: pointer; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assistant-thread:hover { background: var(--surface-muted); }
.assistant-thread.is-current { background: var(--accent-soft); color: var(--accent-hover); }
.assistant-thread:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.assistant-none { margin: 4px 8px; font-size: 13px; color: var(--muted); }
.assistant-log { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.assistant-log article { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-muted); max-width: 100%; }
.assistant-log article.assistant-msg { border: 0; }
.assistant-log article.from-you { align-self: flex-end; max-width: 85%; background: var(--accent-soft); border-bottom-right-radius: 4px; }
.assistant-log article.from-jarvis { align-self: stretch; background: transparent; padding: 2px 0; }
.assistant-log article.from-you .assistant-who { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.assistant-log span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.assistant-log p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: break-word; }
.assistant-log a { display: inline-block; margin-right: 8px; font-size: 13px; }
.assistant-thinking p { color: var(--muted); font-style: italic; }
.assistant-log article.assistant-card { background: var(--surface); }
.assistant-log article.assistant-card[data-phase="requested"],
.assistant-log article.assistant-card[data-phase="building"],
.assistant-log article.assistant-card[data-phase="in_review"] { border-left: 3px solid var(--accent); }
.assistant-log article.assistant-card[data-phase="live"] { border-left: 3px solid var(--positive); }
.assistant-log article.assistant-card[data-phase="waiting"] { border-left: 3px solid var(--warning); }
.assistant-log article.assistant-card[data-phase="declined"] { border-left: 3px solid var(--line-strong); }
/* Jarvis step 2 suggestion card: what Jarvis would fill in, and a button to the page where it is checked and saved. */
.assistant-log article.assistant-suggestion { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; }
.assistant-suggestion .assistant-suggestion-title { font-weight: 600; margin: 2px 0 6px; overflow-wrap: break-word; }
.assistant-suggestion dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; margin: 0 0 8px; }
.assistant-suggestion dt { color: var(--muted); }
.assistant-suggestion dd { margin: 0; overflow-wrap: break-word; }
.assistant-suggestion .assistant-suggestion-note { color: var(--muted); font-size: 0.9em; margin: 6px 0 0; }
.assistant-suggestion .button { display: inline-block; margin-top: 4px; }
.assistant-composer { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line-strong); border-radius: 16px; padding: 8px 10px; background: var(--surface); box-shadow: var(--shadow); }
.assistant-composer:focus-within { border-color: var(--accent); }
.assistant-composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; font: inherit; font-size: 15px; line-height: 1.4; min-height: 1.4em; max-height: 200px; padding: 2px 0; box-shadow: none; }
.assistant-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.assistant-files[hidden] { display: none; }
.assistant-shot { position: relative; display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); font-size: 12px; padding: 2px; }
.assistant-shot img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.assistant-shot-remove { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 0; cursor: pointer; }
.assistant-shot-remove::before { content: "\00d7"; font-size: 14px; line-height: 18px; }
.assistant-actions { position: relative; display: flex; align-items: center; gap: 6px; }
.assistant-spacer { flex: 1; }
.assistant-actions > .button { min-height: 32px; padding: 4px 10px; font-size: 13px; border-radius: 999px; }
.assistant-add, .assistant-send { width: 32px; padding: 0 !important; font-size: 0 !important; display: inline-flex; align-items: center; justify-content: center; }
.assistant-add::before { content: "+"; font-size: 20px; line-height: 1; }
.assistant-send { background: var(--primary); border-color: var(--primary); color: #fff; }
.assistant-send::before { content: "\2191"; font-size: 17px; line-height: 1; }
.assistant-send:disabled { opacity: .5; }
.assistant-menu { position: absolute; bottom: calc(100% + 6px); left: 36px; display: flex; flex-direction: column; gap: 2px; min-width: 11rem; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-dialog); z-index: 2; }
.assistant-menu[hidden] { display: none; }
.assistant-menu .button { border: 0; justify-content: flex-start; text-align: left; background: transparent; }
.assistant-menu .button:hover { background: var(--surface-muted); }
.assistant-mic[aria-pressed="true"] { border-color: var(--danger); color: var(--danger); }
.assistant-draft input, .assistant-draft select, .assistant-draft textarea { width: 100%; }
.assistant-draft { display: flex; flex-direction: column; gap: 6px; }
.top-btn.assistant-open { border: 0; background: transparent; cursor: pointer; font: inherit; }
@media (max-width: 760px) { .assistant-panel { width: 100%; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); } .assistant-composer textarea { font-size: 16px; } }
/* Not 1099 reason picker on a vendor's Payments and checks list: chip over select, Save and Clear on one compact line. Words here never break mid-word unless one alone is wider than its cell. */
#spend .roll-table td { overflow-wrap: break-word; }
.roll-table td.ap-nowrap { white-space: nowrap; }
.ap-reason-form { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; }
.ap-reason-form select { width: 17ch; min-height: 28px; padding: 0 4px; font-size: 12px; }
.ap-reason-form .button { min-height: 28px; padding: 0 8px; font-size: 12px; }
/* 1099 tables with Jan..Dec columns: tight right-aligned numbers, and on phones the rows stay a table that scrolls sideways inside its frame. */
.table-scroll.month-scroll { overflow-x: auto; max-width: 100%; }
.roll-table.month-table { width: max-content; min-width: 100%; }
.roll-table.month-table td { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.roll-table.month-table th { white-space: nowrap; }
.roll-table.month-table th.num, .roll-table.month-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; min-width: 9ch; padding-inline: 10px; }
.roll-table.month-table td:last-child { min-width: 16ch; }
.roll-table.month-table td.ap-vendor { min-width: 18ch; max-width: 30ch; white-space: normal; }
.roll-table.month-table td.ap-flag-col { min-width: 46ch; max-width: 46ch; white-space: normal; }
.roll-table.month-table td.ap-suggest { min-width: 30ch; max-width: 36ch; white-space: normal; }
.month-table .ap-flags summary { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: pointer; list-style: none; }
.month-table .ap-flags summary::-webkit-details-marker { display: none; }
.month-table .ap-flags summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.month-table .ap-flags ul { margin: 4px 0 0; padding-left: 16px; }
.month-table .ap-suggest-head { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.month-table .ap-suggest-head form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
.month-table .ap-suggest-head .button { min-height: 28px; padding: 0 8px; font-size: 12px; }
/* Desktop: the vendor and the Accept control stay on screen while the months scroll between them. */
@media (min-width: 761px) {
  .roll-table.month-table th.ap-vendor, .roll-table.month-table td.ap-vendor { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
  .roll-table.month-table th.ap-suggest, .roll-table.month-table td.ap-suggest { position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: inset 1px 0 0 var(--line); }
  .roll-table.month-table thead th.ap-vendor, .roll-table.month-table thead th.ap-suggest { z-index: 2; background: #fafafa; }
  .roll-table.month-table tbody tr:hover td.ap-vendor, .roll-table.month-table tbody tr:hover td.ap-suggest { background: #eef4fb; }
}
@media (max-width: 760px) {
  .roll-table.month-table { display: table; width: max-content; }
  .roll-table.month-table thead { display: table-header-group; position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .roll-table.month-table tbody { display: table-row-group; }
  .roll-table.month-table tr { display: table-row; padding: 0; }
  .roll-table.month-table th, .roll-table.month-table td { display: table-cell; padding: 6px 8px; white-space: nowrap; }
  .roll-table.month-table td.num { text-align: right; }
  .roll-table.month-table td::before { content: none; display: none; }
}
/* Action outcome banner (hosted/flash.mjs): full width at the top of the page, readable size, green for done and red for refused. */
.notice.flash { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; }
.notice.flash, .notice.flash p, .notice.flash strong, .notice.flash li { font-size: 14px; line-height: 1.45; }
.notice.flash .flash-title strong { font-size: 15px; }
.notice.flash .flash-body { flex: 1 1 auto; min-width: 0; }
.notice.flash p { margin: 0 0 4px; }
.notice.flash ul { margin: 4px 0 0; padding-left: 20px; }
.notice.flash .flash-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.notice.flash .flash-actions form { display: inline-flex; margin: 0; }
.notice.flash.is-ok { background: var(--positive-soft); border-color: #bbe3c9; border-left-color: var(--positive); color: #14532d; }
.notice.flash.is-error { background: var(--danger-soft); border-color: #f3c4c4; border-left-color: var(--danger); color: #7f1d1d; }
.notice.flash:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.ap-page .ap-confirm { grid-column: 1 / -1; padding: 8px 10px; border: 1px solid #eed6a3; border-radius: 8px; background: var(--warning-soft); }
.ap-page .ap-confirm input { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.ap-page .ap-confirm.needs-tick { border: 2px solid var(--danger); background: var(--danger-soft); }
.ap-page form:not(:has(select[name="paidByCard"] option[value="check"]:checked)) .pay-check { display: none; }
.ap-page form:has(select[name="paidByCard"] option[value="check"]:checked) .pay-card { display: none; }
.ap-page .pay-check-note, .ap-page .new-vendor { grid-column: 1 / -1; }
.ap-page .new-vendor summary { cursor: pointer; color: var(--accent, inherit); min-height: 44px; display: flex; align-items: center; }
.ap-page .new-vendor .button { margin-top: 6px; }
.ap-page .field.field-error select, .ap-page .field.field-error input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.ap-page .field-error-text { display: block; margin-top: 2px; color: var(--danger); font-size: 12px; font-weight: 600; }
.ap-page .form-actions .button[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 760px) { .notice.flash .flash-actions .button { flex: 1 1 auto; justify-content: center; min-height: 44px; } }
/* Pay run (hosted/lob-pages.mjs). A held check's note sits under the vendor. Phones get one compact card per bill. */
.pay-run-held { display: block; margin-top: 2px; color: var(--danger); font-size: 12px; font-weight: 600; white-space: normal; }
.pay-run-held a { font-weight: 600; }
.pay-due { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pay-due-note { display: block; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pay-due.overdue, .pay-due-note.overdue { color: var(--danger); }
.pay-due-note.soon { color: var(--warning); }
tr.pay-row-overdue > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tr.pay-total-row > th, tr.pay-total-row > td { border-top: 2px solid var(--line-strong); font-weight: 600; text-align: left; background: var(--surface); }
tr.pay-total-row > td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-totals .pay-fact-overdue strong { color: var(--danger); }
.pay-selected-line { font-variant-numeric: tabular-nums; }
.pay-over { color: var(--danger); font-size: 12px; font-weight: 600; }
/* Pay run Include column: a big tap target, Select all / Clear all, a selected-row highlight, a sticky Send bar, and the Pay online badge. */
.pay-pick-label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.pay-pick-label input[type="checkbox"], .pay-pick-head input[type="checkbox"] { width: 26px; height: 26px; margin: 0; cursor: pointer; accent-color: var(--accent, #2563eb); }
.pay-pick-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pay-pick-tools { display: inline-flex; gap: 6px; }
.pay-pick-tools[hidden] { display: none; }
.pay-pick-tools-bar { display: none; padding: 0 10px 8px; }
@media (max-width: 760px) { .pay-pick-tools-bar { display: flex; } .pay-pick-tools-bar[hidden] { display: none; } .pay-pick-tools-bar .button { min-height: 44px; flex: 1 1 0; justify-content: center; } }
.pay-pick-tools .button { min-height: 36px; padding: 4px 10px; font-size: 12px; white-space: nowrap; }
td.pay-pick, th.pay-pick { vertical-align: middle; }
tr.pay-row-pickable { cursor: pointer; }
tr.pay-row-pickable:hover > td { background: var(--surface-hover, rgba(37, 99, 235, .05)); }
tr.pay-row-selected > td { background: var(--accent-soft, #eaf2ff); }
tr.pay-row-selected > td:first-child { box-shadow: inset 4px 0 0 var(--accent, #2563eb); }
tr.pay-row-selected.pay-row-overdue > td:first-child { box-shadow: inset 4px 0 0 var(--accent, #2563eb), inset 8px 0 0 var(--danger); }
tr.pay-row-online > td { background: var(--warning-soft, #fff7e0); }
.pay-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.pay-badge-online { color: var(--warning, #92400e); background: var(--warning-soft, #fef3c7); border-color: #fde68a; }
.pay-badge-inline { margin-left: 6px; }
.pay-how { min-width: 150px; }
.pay-how .button { min-height: 36px; margin: 2px 4px 2px 0; font-size: 12px; }
.pay-online-record { display: block; }
.pay-online-record > summary { list-style: none; cursor: pointer; display: inline-flex; }
.pay-online-record > summary::-webkit-details-marker { display: none; }
.pay-online-fields { display: grid; gap: 6px; padding: 8px 0; max-width: 260px; white-space: normal; }
.pay-hidden-form { display: none; }
tr.pay-total-online > th, tr.pay-total-online > td { color: var(--muted); font-weight: 500; }
.pay-sticky-bar { position: sticky; bottom: 0; z-index: 5; background: var(--surface, #fff); border-top: 1px solid var(--line-strong, #cbd5e1); box-shadow: 0 -4px 10px rgba(15, 23, 42, .08); padding: 10px 12px; margin: 0; align-items: center; }
.pay-sticky-bar .pay-selected-line { font-size: 16px; }
@media (max-width: 600px) {
  .pay-run-page { overflow-x: hidden; }
  .pay-run-page .page-heading { margin-bottom: 4px; }
  .pay-run-page .summary-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 6px 10px; margin-bottom: 6px; }
  .pay-run-page .summary-strip > div, .pay-run-page .summary-strip > div + div { border-left: 0; padding-left: 0; }
  .pay-run-page .summary-strip strong { font-size: 15px; }
  .pay-run-page .panel-header { padding: 8px 10px 4px; gap: 8px; }
  .pay-run-page .filter-row, .pay-run-page .panel-note { padding-inline: 10px; }
  .pay-run-page .panel-note { margin: 2px 0 6px; }
  .pay-run-page input, .pay-run-page select, .pay-run-page textarea { box-sizing: border-box; max-width: 100%; }
  .pay-run-page .table-scroll, .pay-run-page .roll-table.ap-table { width: 100%; max-width: 100%; }
  .pay-run-table tr { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; padding: 6px 10px; }
  .pay-run-table td { padding: 0; min-width: 0; }
  .pay-run-table td.pay-pick, .pay-run-table td.pay-vendor, .pay-run-table td.pay-amount { padding: 2px 0; }
  .pay-run-table td.pay-pick::before, .pay-run-table td.pay-vendor::before, .pay-run-table td.pay-amount::before { content: none; display: none; }
  .pay-run-table td.pay-pick { grid-column: 1; grid-row: 1 / span 3; align-self: start; }
  .pay-run-table td.pay-pick input { width: 26px; height: 26px; margin: 0; }
  .pay-run-table td.pay-how { grid-column: 2 / 4; }
  .pay-run-table td.pay-how::before { display: none; }
  .pay-run-table tfoot tr.pay-total-row > td.pay-how { display: none; }
  .pay-run-table thead .pay-pick-head { padding: 4px 10px; }
  .pay-run-table td.pay-vendor { grid-column: 2; grid-row: 1; font-weight: 600; }
  .pay-run-table td.pay-amount { grid-column: 3; grid-row: 1; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .pay-run-table td.pay-invoice, .pay-run-table td.pay-address, .pay-run-table td.pay-due-cell { grid-column: 2 / 4; font-size: 12px; color: var(--muted); }
  .pay-run-table td.pay-invoice::before, .pay-run-table td.pay-address::before, .pay-run-table td.pay-due-cell::before { display: inline; margin: 0 4px 0 0; }
  .pay-run-table td.pay-due-cell .pay-due-note { display: inline; margin-left: 4px; }
  .pay-run-table tfoot tr.pay-total-row { grid-template-columns: minmax(0, 1fr) auto; border-top: 2px solid var(--line-strong); }
  .pay-run-table tfoot tr.pay-total-row > th { grid-column: 1; padding: 2px 0; border: 0; }
  .pay-run-table tfoot tr.pay-total-row > th::before, .pay-run-table tfoot tr.pay-total-row > td::before { content: none; display: none; }
  .pay-run-table tfoot tr.pay-total-row > td.pay-amount { grid-column: 2; grid-row: 1; padding: 2px 0; border: 0; }
  .pay-run-table tfoot tr.pay-total-row > td.pay-address { display: none; }
  .pay-run-page .pay-selected-line { flex: 1 1 100%; text-align: center; }
  .pay-run-page .form-actions { padding: 8px 10px; margin: 0; }
  .pay-run-page .form-actions .button { flex: 1 1 100%; min-height: 44px; justify-content: center; }
  .pay-run-page .form-grid { padding-inline: 10px; }
}

/* MAC listing flow: numbered stepper. A step shows a check only once staff have completed it; the current step is outlined. */
.stepper { display: flex; gap: 8px; list-style: none; margin: 4px 0 16px; padding: 0; counter-reset: none; flex-wrap: wrap; }
.stepper-step { flex: 1 1 140px; min-width: 0; }
.stepper-step a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); background: #fff; color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 500; }
.stepper-step a:hover { border-color: var(--line-strong); background: var(--line-subtle); }
.stepper-step a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 600; background: #fff; }
.stepper-step.current a { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.stepper-step.current .stepper-mark { border-color: var(--accent); background: var(--accent); color: #fff; }
.stepper-step.done .stepper-mark { border-color: var(--positive); background: var(--positive-soft); color: var(--positive); }
.stepper-step.done a { color: var(--ink); }

/* MAC listing feed preview: the listing card as a portal shows it, then the XML. */
.feed-card { max-width: 720px; margin: 8px 0 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-md, 12px); background: #fff; box-shadow: 0 1px 3px #18304712; }
.feed-card-kicker { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--positive); }
.feed-card-title { margin: 0 0 8px; font-size: 18px; line-height: 1.3; color: var(--ink); }
.feed-card-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.feed-card-facts span { padding: 3px 10px; border-radius: 999px; background: var(--line-subtle); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.feed-card-facts span:first-child { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.feed-card-address { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.feed-card-body { font-size: 14px; line-height: 1.55; color: var(--ink-2); white-space: normal; }
.feed-card-photos { margin: 12px 0 0; }
.feed-xml { max-height: 420px; overflow: auto; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); background: #0f172a; color: #e2e8f0; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.feed-xml:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.listing-previews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; margin: 8px 0 16px; }
.fb-post { max-width: 500px; border: 1px solid var(--line); border-radius: var(--radius-md, 12px); background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.fb-post-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px; }
.fb-post-head strong, .fb-post-head small { display: block; }
.fb-post-head small { color: var(--muted); font-size: 12px; }
.fb-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.fb-post-text { margin: 0; padding: 6px 14px 12px; font-size: 15px; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.fb-post-photos { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; }
.fb-post-photos.count-1 { grid-template-columns: 1fr; }
.fb-post-photos span { position: relative; display: block; }
.fb-post-photos.count-3 span:first-child { grid-column: 1 / -1; }
.fb-post-photos img { display: block; width: 100%; height: 200px; object-fit: cover; }
.fb-post-photos b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .5); color: #fff; font-size: 24px; }
.fb-post-actions { display: flex; justify-content: space-around; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 600; }
.zillow-hero { position: relative; margin: -18px -20px 14px; overflow: hidden; border-radius: var(--radius-md, 12px) var(--radius-md, 12px) 0 0; }
.zillow-hero img { display: block; width: 100%; height: 260px; object-fit: cover; }
.zillow-hero span { position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 4px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 12px; }
.preview-empty { margin: 0; padding: 18px 14px; background: var(--line-subtle); color: var(--muted); font-size: 13px; }
.preview-noimg { display: block; padding: 18px 14px; background: var(--line-subtle); color: var(--muted); font-size: 13px; }
.photo-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; list-style: none; margin: 8px 0; padding: 0; }
.photo-pick li { display: grid; align-content: start; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm, 8px); background: var(--surface, #fff); }
.photo-pick li[draggable="true"] { cursor: grab; }
.photo-pick li.dragging { opacity: .5; }
.photo-pick li:target { outline: 2px solid currentColor; outline-offset: 1px; }
.photo-pick label { display: block; min-height: 44px; cursor: pointer; }
.photo-pick-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.photo-cover[hidden] { display: none; }
.photo-default { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.photo-move { display: flex; flex-wrap: wrap; gap: 6px; }
.photo-move .button { flex: 1 1 auto; min-height: 44px; padding-inline: 8px; }
.photo-move .button:disabled { opacity: .45; box-shadow: none; cursor: default; }
.photo-pick img { display: block; width: 100%; height: 120px; margin: 6px 0; object-fit: cover; border-radius: 4px; }
.photo-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 12px 0 0; }
.photo-drop { display: grid; gap: 6px; flex: 1 1 320px; max-width: 640px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--radius-sm, 8px); cursor: pointer; }
.photo-drop:hover, .photo-drop:focus-within, .photo-drop:has(input:hover) { border-color: currentColor; }
.photo-drop input { width: 100%; min-height: 44px; }
.photo-results { display: grid; gap: 4px; list-style: none; margin: 12px 0 0; padding: 0; overflow-wrap: anywhere; }
.photo-results li { padding: 6px 10px; border-left: 3px solid var(--line); }
.photo-results li.bad { border-left-color: currentColor; font-weight: 600; }
.photo-results li.bad strong { font-weight: 700; }
.fact-list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 8px 0 14px; }
.fact-list dt { color: var(--muted); }
.fact-list dd { margin: 0; color: var(--ink); }
.guide { max-width: 680px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.guide h3 { margin: 22px 0 6px; font-size: 16px; }
.guide p { margin: 0 0 10px; }
.guide ul { margin: 0 0 10px; padding-left: 20px; }

/* Dashboard calendar: month grids beside a dated agenda; one column on a phone. */
.calendar-panel { margin-bottom: var(--space-4); padding-bottom: var(--space-3); }
.calendar-panel .panel-note, .calendar-panel .cal-filters, .calendar-panel .cal-layout, .cal-gaps, .cal-late { margin-left: 22px; margin-right: 22px; }
.cal-pager { display: inline-flex; align-items: center; gap: var(--space-2); }
.cal-nav { min-height: 44px; min-width: 44px; padding: 0; font-size: 16px; }
.cal-nav[disabled] { opacity: .4; cursor: default; }
.cal-filters { margin-bottom: var(--space-3); font-size: 12px; }
.cal-filters > summary { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 28px; color: var(--muted); cursor: pointer; }
.cal-filter-body { display: grid; gap: var(--space-1); padding-top: var(--space-1); }
.cal-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-3); margin: 0; padding: 0; border: 0; font-size: 12px; }
.cal-chips legend { float: left; margin-right: var(--space-2); padding: 0; color: var(--muted); }
.cal-chip { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 28px; cursor: pointer; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.cal-months { display: grid; gap: var(--space-3); }
.cal-month { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; font-variant-numeric: tabular-nums; }
.cal-month caption { padding-bottom: 4px; font-weight: 600; text-align: left; }
.cal-month th, .cal-month td { padding: 0; border: 0; background: none; text-align: center; font-weight: 400; color: var(--muted); }
.cal-month td { color: var(--ink); }
.cal-month td > span, .cal-month td > a { display: block; min-height: 30px; padding-top: 3px; border-radius: var(--radius-sm); line-height: 1.3; }
.calendar-panel .cal-month td > a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; }
.cal-month td > a:hover { background: var(--accent-soft); }
.cal-month td.off { color: var(--muted); opacity: .55; }
.cal-month td.today > span, .cal-month td.today > a { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-month td.run > a { background: var(--accent-soft); }
.cal-dots { display: flex; justify-content: center; gap: 2px; }
.cal-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.cal-dot.pay { background: var(--accent); } .cal-dot.book { background: var(--muted); } .cal-dot.lease { background: var(--park); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.cal-legend .cal-dot { margin-right: 4px; }
.cal-agenda { max-height: 32rem; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.cal-agenda h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-2); margin: 0; min-width: 0; flex: 1; font-size: 12px; font-weight: 400; color: var(--muted); }
.cal-agenda ul, .cal-later ol { margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.cal-later ol { margin: var(--space-2) 0 0; }
.cal-agenda > li:first-child .cal-day > summary { border-top: 0; }
.cal-day > summary { display: flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 4px 0; border-top: 1px solid var(--line); cursor: pointer; list-style: none; }
.cal-day > summary:hover { background: var(--surface-muted); }
.cal-day > summary::-webkit-details-marker, .cal-more > summary::-webkit-details-marker, .cal-review-list > summary::-webkit-details-marker { display: none; }
.cal-day > summary::before, .cal-filters > summary::before { content: '›'; flex: none; width: 10px; color: var(--muted); font-size: 14px; line-height: 1; text-align: center; }
.cal-day[open] > summary::before, .cal-filters[open] > summary::before { transform: rotate(90deg); }
.cal-day-date { font-size: 13px; font-weight: 600; color: var(--ink); }
.cal-counts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cal-count { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; line-height: 18px; color: var(--ink-2); white-space: nowrap; }
.cal-day-total { margin-left: auto; font-size: 13px; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.cal-day-total small { color: var(--muted); }
.cal-quiet { padding: 6px 0; font-size: 13px; }
.cal-later { padding-top: var(--space-2); }
.cal-more > summary { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); font-size: 12px; cursor: pointer; list-style: none; }
.cal-more > summary:hover { background: var(--surface-muted); }
details[open] > summary .cal-closed, details:not([open]) > summary .cal-opened { display: none; }
.cal-row, .cal-run > summary, .cal-vendors > li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; }
.cal-row, .cal-run > summary { border-top: 1px solid var(--line); color: var(--ink); }
a.cal-row:hover, .cal-run > summary:hover { background: var(--surface-muted); }
.cal-run > summary { cursor: pointer; list-style: none; }
.cal-run > summary::-webkit-details-marker { display: none; }
.cal-vendors { margin: 0 0 var(--space-1) var(--space-3); }
.cal-vendors > li { padding: 3px 0; }
.cal-vendor { display: inline-flex; align-items: flex-start; gap: var(--space-2); min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.cal-run-link { display: inline-block; color: var(--accent); margin: 0 0 var(--space-2) var(--space-3); font-size: 12px; }
.cal-text { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.cal-text small, .cal-vendor small { color: var(--muted); }
.cal-detail { display: block; }
.cal-amount { flex: none; max-width: 45%; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.cal-late { margin-top: 0; margin-bottom: var(--space-3); padding: 6px 10px; border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: 13px; }
.cal-review { margin: var(--space-3) 22px 0; }
.cal-review-list > summary { display: block; cursor: pointer; list-style: none; }
.cal-review h3 { display: flex; align-items: center; gap: var(--space-1); min-height: 28px; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-toggle { margin-left: auto; color: var(--accent); font-weight: 400; }
.cal-review ul { margin: var(--space-1) 0 0; padding: 0; list-style: none; }
.calendar-panel .cal-review .panel-note { margin-left: 0; margin-right: 0; }
.cal-gaps { margin-top: var(--space-2); margin-bottom: 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
/* One color per vendor, the same on every run. The name is always beside it, so identity never rests on color alone. */
.vc { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 3px; }
.vc-0 { background: #2a78d6; } .vc-1 { background: #eb6834; } .vc-2 { background: #1baf7a; } .vc-3 { background: #eda100; }
.vc-4 { background: #e87ba4; } .vc-5 { background: #008300; } .vc-6 { background: #6250d6; } .vc-7 { background: #e34948; }
@media (max-width: 760px) {
  .cal-layout { grid-template-columns: minmax(0, 1fr); }
  .cal-agenda { max-height: none; overflow: visible; }
  .cal-day > summary, .cal-more > summary, .cal-filters > summary, .cal-review h3 { min-height: 44px; }
  .cal-day-total { flex-basis: 100%; margin-left: 0; text-align: left; }
  .calendar-panel .cal-month td > span, .calendar-panel .cal-month td > a { min-height: 44px; min-width: 0; }
  .cal-pager .small-muted { display: none; }
}

/* Sign-in text floor (S4, S5): 12px and 4.5:1 for anything a person reads, and 44px for anything they tap. After the media queries above, which it must beat. */
body.landing .brand-edition, body.landing .eyebrow, body.landing .brand-intro > p, body.landing .location-eyebrow, body.landing .map-compass, body.landing .map-caption,
body.landing .map-state, body.landing .lake-facts dt, body.landing .lake-facts dd span, body.landing .lake-facts p, body.landing .lake-facts p > span, body.landing .destination span,
body.landing .workspace-label, body.landing .help-link, body.landing .text-link, body.landing .unified-note p, body.landing .unified-note p span, body.landing .account-help,
body.landing .account-help .text-link, body.landing .login-heading p, body.landing .login-footer, body.landing .login-footer > span:last-child { font-size: 12px; letter-spacing: normal; }
body.landing .workspace-label, body.landing .help-link, body.landing .login-heading p, body.landing .unified-note, body.landing .unified-note p, body.landing .unified-note p span, body.landing .account-help, body.landing .login-footer { color: #566b83; }
body.landing .help-link, body.landing .text-link, body.landing .orbit-logo, body.landing .lake-facts a { display: inline-flex; align-items: center; min-height: 44px; }
body.landing .lake-facts p > span { color: #b4cde5; }

/* Portal shell (audit A4, A5, A7, A8, A10, A12, A13) */
.portal-header { margin-bottom: 8px; }
.portal-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; font-size: 22px; font-weight: 700; line-height: 1.2; }
.portal-brand small { font-size: 13px; font-weight: 500; color: var(--muted); }
.portal-brand .portal-logo { height: 44px; }
.portal-page #main:focus { outline: none; }
.portal-page .panel .panel-note, .portal-page .panel > p:not([class]), .portal-page .panel > .filters, .portal-page .panel > .notice, .portal-page .panel > form.panel-note { padding-inline: 16px; }
.portal-page .panel > .notice { margin-inline: 16px; padding-inline: 12px; }
.portal-page .panel > form.filters { padding-bottom: 12px; }
.portal-page .panel > .panel-note:last-child { padding-bottom: 12px; }
.portal-page .account-card { padding: 0 0 8px; }
.portal-page .account-card .pay-options { padding-inline: 16px; }
.portal-page .empty-state { padding: 20px 16px; font-size: 13px; }
.portal-page .empty-state strong { color: var(--ink); font-size: 14px; }
.portal-page .facts { padding: 8px 16px 12px; }
.portal-biz .biz-pill { min-height: 44px; padding: 0 10px; white-space: nowrap; }
@media (min-width: 761px) { .portal-page .roll-table td.money { text-align: right; font-variant-numeric: tabular-nums; } }
@media (max-width: 760px) {
  .portal-page .roll-table td:empty { display: none; }
  .portal-biz { display: flex; }
  .portal-biz .biz-pill { flex: 1 1 0; font-size: 12px; padding: 0 6px; }
}
.profile-form { padding: 4px 16px 16px; max-width: 640px; }
.profile-form .addr-fields { display: contents; }
.profile-form .filter-field { flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; font-size: 13px; }
.profile-form input:not([type=hidden]), .profile-form select { width: 100%; min-height: 44px; max-width: none; padding: 8px 12px; box-sizing: border-box; border: 1px solid #6f7d8a; border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
.profile-form .form-actions { grid-column: 1 / -1; }
.profile-form .field-error { color: var(--danger, #b42318); font-size: 13px; }
/* With 16px portal inputs the file input's own width pushed the one-column insurance grid past a 390px screen. */
@media (max-width: 900px) { .portal-page .pv-grid { grid-template-columns: minmax(0, 1fr); } }
.portal-page input[type=file] { max-width: 100%; }

/* Job cost: one line per house, opened for workers and tasks. */
.job-rows { display: grid; gap: 0; }
.job-row > summary, .job-head { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(5, minmax(0, 1fr)); gap: 8px; padding: 5px 6px; border-bottom: 1px solid var(--color-border, #d7dde5); }
.job-row > summary { cursor: pointer; }
.job-head { font-weight: 600; }
.job-row > ul { margin: 6px 0 10px 16px; padding: 0; list-style: none; }
.job-lines ul { margin: 2px 0 6px 16px; padding: 0; list-style: none; font-size: 0.92em; }
.job-name a, .job-links a, .job-row li a { color: var(--color-link, #1d4ed8); text-decoration: underline; }
.job-rows-two .job-row > summary { grid-template-columns: minmax(0, 1fr) 90px; }
.job-rows .num { text-align: right; }
@media (max-width: 760px) { .job-row > summary, .job-head { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); } .job-row > summary > :nth-child(n+4), .job-head > :nth-child(n+4) { display: none; } }

/* Portal: one-row header on wide screens, office contact footer, official receipt (classes only: style-src 'self'). */
@media (min-width: 720px) { .portal-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; } .portal-header .portal-brand { margin: 0; } }
.portal-footer { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 24px 0 8px; padding-top: 12px; border-top: 1px solid var(--line, #d5dbe1); font-size: 13px; color: var(--muted, #53606e); }
.portal-footer strong { flex-basis: 100%; color: inherit; }
.receipt-doc { max-width: 560px; margin: 0 auto; color: #1b2a38; }
.receipt-logo { display: block; max-height: 72px; max-width: 220px; margin: 0 auto 8px; }
.receipt-biz { text-align: center; font-size: 12px; color: #3c4a5a; margin: 0 0 14px; }
.receipt-title { font-size: 22px; margin: 0 0 4px; }
.receipt-meta { margin: 0 0 14px; color: #53606e; }
.receipt-name { margin: 0 0 10px; }
.receipt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.receipt-table td { padding: 8px; border-bottom: 1px solid #e5e9ee; }
.receipt-table td.money { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-total td { font-weight: 700; font-size: 16px; border-top: 2px solid #1b2a38; border-bottom: 0; }
.receipt-contact { margin-top: 18px; padding-top: 10px; border-top: 1px solid #d5dbe1; font-size: 12px; line-height: 1.5; color: #53606e; }
.doc-category { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.doc-category select { max-width: 14rem; }
/* Full search results: type and business labels before each name, as in the top-box dropdown (kept on one compact line). */
.search-hit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.search-hit-tags { display: inline-flex; gap: 4px; flex: none; }
.search-hit > small { flex-basis: 100%; }

/* Portal polish 3: one business per page (its logo and accent), a white header bar, dashboard cards, and roomy one-column forms.
   Accent colours match the business pills; white text on each accent is at least 4.5:1. */
.portal-page { --portal-accent: #1d4e84; --portal-accent-strong: #163d68; --portal-accent-soft: #eaf1fa; }
.portal-theme-marina { --portal-accent: #0e7490; --portal-accent-strong: #0b5d73; --portal-accent-soft: #e7f4f7; }
.portal-theme-park { --portal-accent: #15803d; --portal-accent-strong: #116632; --portal-accent-soft: #e9f5ed; }
.portal-theme-mac { --portal-accent: #0b5c97; --portal-accent-strong: #084a7a; --portal-accent-soft: #e7f0f8; }
.portal-page { max-width: none; margin: 0; padding: 0 0 24px; }
.portal-page > #main, .portal-page > .portal-footer, .portal-page > .portal-legal { max-width: 1120px; margin-inline: auto; padding-inline: 24px; box-sizing: border-box; }
.portal-page > #main { padding-top: 0; padding-bottom: 8px; }
.portal-page .portal-header { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 28px; padding: 18px max(24px, calc((100% - 1072px) / 2)) 14px; background: #fff; border-bottom: 1px solid var(--line, #d5dbe1); box-shadow: inset 0 4px 0 var(--portal-accent); }
.portal-page .portal-brand { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 0; min-width: 0; }
.portal-page .portal-brand .portal-logo { display: block; width: auto; height: 52px; max-width: 140px; object-fit: contain; }
.portal-page .portal-brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.portal-page .portal-brand-text strong { font-size: 18px; font-weight: 700; color: var(--ink, #14212b); }
.portal-page .portal-brand-text small { font-size: 13px; font-weight: 500; color: var(--muted, #53606e); }
.portal-page nav.portal-nav { display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: 8px 16px; padding: 0; margin: 0; min-width: 0; }
.portal-page .portal-nav-links, .portal-page .portal-account { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
.portal-page .portal-nav-links .portal-signout { margin-left: 4px; }
.portal-page .portal-account { gap: 10px; padding-left: 16px; border-left: 1px solid var(--line, #d5dbe1); }
.portal-page .portal-account form { margin: 0; }
.portal-page .portal-nav-links .button.secondary { border-color: transparent; background: transparent; box-shadow: none; color: var(--ink, #14212b); font-weight: 600; }
.portal-page .portal-nav-links .button.secondary:hover { background: var(--portal-accent-soft); }
.portal-page .portal-nav-links .button[aria-current="page"] { background: var(--portal-accent-soft); color: var(--portal-accent-strong); box-shadow: inset 0 -3px 0 var(--portal-accent); }
.portal-page .button { min-height: 44px; border-radius: 10px; }
.portal-page .button.primary { background: var(--portal-accent); border-color: var(--portal-accent); color: #fff; }
.portal-page .button.primary:hover { background: var(--portal-accent-strong); border-color: var(--portal-accent-strong); }
.portal-page .button:focus-visible, .portal-page a:focus-visible, .portal-page summary:focus-visible { outline: 3px solid var(--portal-accent); outline-offset: 2px; }
.portal-page .page-heading { margin: 0 0 16px; }
.portal-page .page-heading h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; }
.portal-page .page-heading .small-muted { font-size: 14px; }
.portal-page .portal-biz { margin: 0 0 8px; }
.portal-page .portal-switch-note { margin: 0 0 16px; padding: 0; max-width: 72ch; }
.portal-page .panel { border-radius: 14px; background: #fff; overflow: hidden; }
.portal-page .panel + .panel, .portal-page .portal-cards + .panel { margin-top: 20px; }
.portal-page .panel-header { padding: 20px 20px 8px; }
.portal-page .panel-header h2 { font-size: 17px; }
.portal-page .panel .panel-note { font-size: 14px; line-height: 1.5; }

/* Dashboard cards: balance first and widest, then autopay and maintenance. One column on a phone. */
.portal-page .portal-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: stretch; }
.portal-page .portal-cards > .portal-balance { grid-column: 1 / -1; }
.portal-page .portal-cards > .panel { margin: 0; display: flex; flex-direction: column; }
.portal-page .portal-cards > .panel .portal-card-actions { margin-top: auto; }
.portal-page .portal-balance { border-top: 4px solid var(--portal-accent); }
.portal-page .portal-amount { margin: 4px 0 12px; }
.portal-page .portal-amount .balance { display: block; font-size: 40px; line-height: 1.1; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.portal-page .portal-card-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 20px 20px; }
.portal-page .portal-balance .portal-card-actions .button.primary { min-width: 160px; justify-content: center; font-size: 16px; }
.portal-page .portal-card .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.portal-page .portal-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.portal-page .portal-status-on { background: #e6f4ea; color: #14532d; }
.portal-page .portal-status-off { background: #eef1f4; color: #3b4652; }
.portal-page .portal-status-warn { background: #fdf3d8; color: #7a4b00; }
.portal-page .portal-cards .portal-card .panel-note:last-child, .portal-page .portal-cards .portal-card > .panel-note { padding-bottom: 8px; }

/* Forms: visible labels above 16px inputs, 48px fields, a clear focus ring, one column. */
.portal-page .filter-field, .portal-page .form-grid .filter-field { display: flex; flex-direction: column; align-items: stretch; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink, #14212b); }
.portal-page .filter-field input:not([type=checkbox]):not([type=radio]):not([type=file]), .portal-page .filter-field select, .portal-page .filter-field textarea, .portal-page .form-grid input:not([type=checkbox]):not([type=radio]):not([type=file]), .portal-page .form-grid select, .portal-page .form-grid textarea { width: 100%; max-width: none; min-height: 48px; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink, #14212b); background: #fff; border: 1px solid #8a97a3; border-radius: 10px; }
.portal-page .filter-field input:focus-visible, .portal-page .filter-field select:focus-visible, .portal-page .filter-field textarea:focus-visible, .portal-page .form-grid input:focus-visible, .portal-page .form-grid select:focus-visible, .portal-page .form-grid textarea:focus-visible { outline: 3px solid var(--portal-accent); outline-offset: 1px; border-color: var(--portal-accent); }
.portal-page .filter-field [aria-invalid="true"], .portal-page .form-grid [aria-invalid="true"] { border-color: #b42318; }
.portal-page .form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 560px; padding: 8px 16px 16px; }
.portal-page form.boat-form { max-width: 720px; }
.portal-page .portal-boat-list { list-style: none; margin: 0; padding: 0 16px 8px; }
.portal-page .portal-boat-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 6px 0; }
.portal-page .portal-boat-prompt .portal-card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.portal-page .portal-boat-prompt .inline-form { display: inline; margin: 0; }
@media (min-width: 720px) {
  .portal-page form.form-grid.boat-form { grid-template-columns: 1fr 1fr; }
  .portal-page form.form-grid.boat-form .wide { grid-column: 1 / -1; }
}
.portal-page .form-grid .form-actions { margin: 4px 0 0; }
.portal-page .form-grid .form-actions .button { min-width: 160px; justify-content: center; }
.portal-page .panel > form.filters:not(.ledger-period) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 560px; justify-items: start; }
.portal-page .panel > form.filters:not(.ledger-period) .filter-field { width: 100%; }
.portal-page .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; }
.portal-page .facts dd { font-size: 16px; }

/* Pay: each method is a card; the total is the biggest thing on it. */
.portal-page .pay-option { border-radius: 12px; }
.portal-page .pay-option .button.primary { min-height: 48px; font-size: 16px; }
.portal-page .pay-option strong:first-child { font-size: 15px; }

.portal-page > .portal-footer { margin-top: 32px; margin-bottom: 4px; padding-top: 16px; border-top: 0; }
.portal-page > .portal-legal { margin-top: 8px; margin-bottom: 0; }
.portal-page .past-leases > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 16px 8px; cursor: pointer; }


/* Portal type layer (customer pages only; staff pages are untouched). */
body.portal-body .portal-page { font-size: 16px; color: #14212b; }
body.portal-body .portal-page .page-heading h1, body.portal-body .portal-page h1 { font-size: 28px; line-height: 1.2; }
body.portal-body .portal-page .filter-field, body.portal-body .portal-page .filter-field span, body.portal-body .portal-page label { font-size: 14px; font-weight: 600; }
body.portal-body .portal-page th, body.portal-body .portal-page td { font-size: 15px; }
body.portal-body .portal-page .small-muted, body.portal-body .portal-page .panel-note, body.portal-body .portal-page .micro-label, body.portal-body .portal-page .sort-note { color: #4b5563; }
body.portal-body .portal-page .panel { padding: 0; }
body.portal-body .portal-page .panel .panel-note { padding-left: 20px; padding-right: 20px; }
/* Styled file picker matching .button.secondary, with the native file name still visible. */
body.portal-body .portal-page input[type=file].file-pick { font-size: 16px; width: 100%; }
body.portal-body .portal-page input[type=file].file-pick::file-selector-button { margin-right: 12px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line, #c5ced6); border-radius: 10px; background: #fff; color: #14212b; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
body.portal-body .portal-page input[type=file].file-pick::file-selector-button:hover { background: var(--portal-accent-soft); }

/* Phone ledger: a compact two-line row (date + description left, amount + balance right). */
@media (max-width: 760px) {
  body.portal-body .portal-page table.portal-ledger-table thead { display: none; }
  body.portal-body .portal-page table.portal-ledger-table tbody tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "desc amt" "date bal"; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line, #d5dbe1); }
  body.portal-body .portal-page table.portal-ledger-table tbody td { display: block; padding: 0; border: 0; font-size: 15px; }
  body.portal-body .portal-page table.portal-ledger-table tbody td::before { content: none; }
  body.portal-body .portal-page table.portal-ledger-table td[data-label="Description"] { grid-area: desc; font-weight: 600; }
  body.portal-body .portal-page table.portal-ledger-table td[data-label="Date"] { grid-area: date; color: #4b5563; font-size: 14px; }
  body.portal-body .portal-page table.portal-ledger-table td[data-label="Charges"],
  body.portal-body .portal-page table.portal-ledger-table td[data-label="Payments & credits"] { grid-area: amt; text-align: right; font-variant-numeric: tabular-nums; }
  body.portal-body .portal-page table.portal-ledger-table td[data-label="Balance"] { grid-area: bal; text-align: right; font-variant-numeric: tabular-nums; color: #4b5563; }
}

@media (max-width: 760px) {
  .portal-page > #main, .portal-page > .portal-footer, .portal-page > .portal-legal { padding-inline: 12px; }
  .portal-page .portal-header { flex-wrap: wrap; margin: 0 0 16px; padding: 10px 12px 8px; gap: 8px; }
  .portal-page .portal-brand { width: 100%; }
  .portal-page .portal-brand .portal-logo { height: 36px; max-width: 96px; }
  .portal-page .portal-brand-text strong { font-size: 16px; }
  .portal-page nav.portal-nav { width: 100%; flex-wrap: wrap; justify-content: stretch; gap: 8px; }
  .portal-page .portal-nav-links { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 4px; flex-wrap: wrap; }
  .portal-page .portal-nav-links .button { justify-content: center; padding-inline: 6px; width: 100%; }
  .portal-page .portal-nav-links .portal-signout { margin-left: 0; grid-column: 1 / -1; }
  .portal-page .portal-nav-links .portal-signout .button { width: 100%; }
  .portal-page .portal-cards { grid-template-columns: minmax(0, 1fr); }
  .portal-page .portal-card-actions .button { flex: 1 1 auto; justify-content: center; }
  .portal-page .page-heading h1 { font-size: 22px; }
  .portal-page .portal-amount .balance { font-size: 34px; }
  .portal-page .form-grid .form-actions .button, .portal-page .panel > form.filters:not(.ledger-period) .button { width: 100%; }
}

/* Accept invite / new password: rules under the field, and the show-password button (shown only when its script runs). */
body.landing .password-form .filter-field { display: grid; gap: 6px; color: #243b58; font-size: 14px; font-weight: 500; }
body.landing .password-rules { margin: -4px 0 4px; padding-left: 20px; color: #4d6180; font-size: 13px; line-height: 1.6; }
body.landing .show-password { justify-self: start; min-height: 44px; padding: 0 14px; border: 1px solid #9fbadb; border-radius: 8px; background: #fff; color: #1d4e84; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
body.landing .show-password[hidden] { display: none; }
body.landing .show-password:focus-visible { outline: 3px solid #245b99; outline-offset: 2px; }

/* Park go-live: open invoices as a compact list, the "nothing due" note, the framed ACH authorization. */
.portal-page .portal-inv-list { list-style: none; margin: 0; padding: 0 16px 8px; }
.portal-page .portal-inv-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.portal-page .portal-inv-list li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.portal-page .portal-inv-list small { color: var(--muted); font-size: 13px; }
.portal-page .portal-inv-list .money { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.portal-page .portal-all-set { margin-top: -4px; color: var(--positive); font-weight: 600; }
.portal-page .portal-mandate { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--portal-accent); border-radius: 10px; background: var(--portal-accent-soft); }
.portal-page .portal-mandate strong { display: block; margin-bottom: 4px; font-size: 14px; }
.portal-page .portal-mandate p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink); }
.portal-page .receipt-doc { padding: 20px 16px 8px; }

/* ===================================================================   Buncombe Creek dashboard theme (Nov 2026). Staff pages look like dashboard.buncombecreekmarina.com:
   its navy sidebar with the logo tile, DM Sans, the blue selected item and buttons, and its light canvas.
   Scoped to the staff shell; the customer portal, sign-in, invoices and email keep their own look.
   Colours are the dashboard's own tokens (views/partials/head.ejs in staff-dashboard), except the text, status, muted
   and placeholder colours, which keep Orbit's darker values for the 4.5:1 contrast checks.
   ========================================================================== */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(/assets/dm-sans-latin.woff2) format('woff2'); }
body:has(.app-shell) {
  --canvas: #f3f5fb;
  --surface: #ffffff;
  --surface-muted: #f0f2f8;
  --surface-2: #f0f2f8;
  --ink-2: #3b4760;
  --line: #e3e8f2;
  --line-strong: #cfd7e6;
  --line-subtle: #eef1f7;
  --accent: #0077bd;
  --accent-hover: #0064a9;
  --accent-soft: #e6f3fb;
  --primary: #0077bd;
  --primary-hover: #0064a9;
  --nav: #0e1520;
  --nav-muted: rgba(255, 255, 255, .62);
  --nav-active: rgba(255, 255, 255, .07);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 25, 55, .07);
  --shadow-dialog: 0 20px 40px rgba(15, 25, 55, .18);
  --ring: #0077bd;
  --focus: 0 0 0 3px rgba(0, 119, 189, .18);
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
}
.app-shell a:focus-visible, .app-shell button:focus-visible, .app-shell summary:focus-visible { outline-color: var(--accent); }

/* Sidebar: the dashboard's navy column. */
.app-shell > .sidebar { width: 228px; padding: 12px 10px 0; background: var(--nav); color: #fff; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.app-shell > .workspace { margin-left: 228px; }
.sidebar .sb-logo { display: block; flex-shrink: 0; margin: 0 0 8px; padding: 6px 8px; border-radius: 10px; background: #fff; text-align: center; transition: box-shadow .12s; }
.sidebar .sb-logo:hover { box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.sidebar .sb-logo img { display: block; width: 100%; height: auto; max-height: 90px; object-fit: contain; margin: 0 auto; }
.sidebar .sb-div { flex-shrink: 0; height: 1px; margin: 0 6px 10px; background: rgba(255, 255, 255, .07); }
.sidebar .dash-home, .sidebar .nav-link, .sidebar .nav-group > summary {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 36px; margin: 0 0 2px; padding: 9px 10px; border-radius: 7px; box-shadow: none;
  color: rgba(255, 255, 255, .62); font-size: 14px; font-weight: 400; line-height: 1.3; text-decoration: none; transition: background .12s, color .12s;
}
.sidebar .dash-home:hover, .sidebar .nav-link:hover, .sidebar .nav-group > summary:hover { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .85); text-decoration: none; }
.sidebar .nav-link.active, .sidebar .nav-link.active:hover { background: var(--accent); color: #fff; font-weight: 600; box-shadow: none; }
.sidebar .nav-group[open] > summary { color: #fff; font-weight: 500; }
.sidebar .nav-group > summary::after { margin-left: auto; opacity: .55; }
.sidebar .brand.orbit-wordmark { display: block; flex-shrink: 0; min-height: 0; margin: 10px 0 0; padding: 8px 10px 6px; color: var(--nav-muted); font-size: 10px; font-weight: 600; letter-spacing: 1.2px; line-height: 1.4; text-transform: uppercase; text-decoration: none; }
.sidebar .brand.orbit-wordmark:hover { color: rgba(255, 255, 255, .85); }
.sidebar .nav-primary + .nav-section, .sidebar .nav-section + .nav-section { border-top: 0; margin-top: 0; padding-top: 0; }
.sidebar .nav-group-links { margin: 0 0 6px 19px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, .1); }
.sidebar .nav-group-links .nav-link { padding: 7px 10px; font-size: 13px; }
.sidebar .nav-sub { margin: 8px 0 2px; padding: 0 10px; color: var(--nav-muted); font-size: 10px; font-variant: normal; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.sidebar .nav-count { margin-left: auto; background: var(--accent); color: #fff; }
.sidebar .nav-link.active .nav-count { background: #fff; color: var(--accent); }
.sidebar .sidebar-bottom { margin: auto -10px 0; padding: 14px 20px 16px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sidebar .profile { padding: 0; gap: 10px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.sidebar .profile small { color: var(--nav-muted); font-size: 11px; }
.sidebar .avatar.owner { width: 30px; height: 30px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .5px; }

/* Menu icons, the way the dashboard puts one before each item. Drawn in CSS so both menus (server pages and "/") stay identical text. */
.sidebar .dash-home::before, .sidebar .nav-group > summary::before, .sidebar .nav-primary .nav-link::before {
  content: ''; flex: none; width: 17px; height: 17px; background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat; mask: var(--nav-icon) center / contain no-repeat;
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}
.sidebar .dash-home::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h5v-6h4v6h5V10'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Dashboard"] .nav-link::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='4' width='7' height='7' rx='1.5'/%3E%3Crect x='4' y='13' width='7' height='7' rx='1.5'/%3E%3Crect x='13' y='13' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Customers"] .nav-link::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20v-1a5 5 0 0 1 5-5h3a5 5 0 0 1 5 5v1M16 4.5a3.5 3.5 0 0 1 0 7M21.5 20v-1a5 5 0 0 0-3.5-4.8'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Rentals"] summary::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Cpath d='M12 7v14M5 13a7 7 0 0 0 14 0M8 11h8'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Leasing"] summary::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6.5A1.5 1.5 0 0 0 5 4.5v15A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Operations"] summary::before, .sidebar nav[aria-label="Maintenance"] .nav-link::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.3 5.3L3.5 17.5a2.1 2.1 0 0 0 3 3l5.9-5.9a4 4 0 0 0 5.3-5.3l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Accounting"] summary::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M7 15h3'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Reports"] summary::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 21h18M6 17v-6M11 17V5M16 17v-9M21 17v-3'/%3E%3C/svg%3E"); }
.sidebar nav[aria-label="Management"] summary::before { --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6h9M17 6h3M4 12h3M11 12h9M4 18h11M19 18h1'/%3E%3Ccircle cx='15' cy='6' r='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3C/svg%3E"); }

/* Top bar and page: white bar over the dashboard canvas, blue buttons like the dashboard's. */
.app-shell .topbar { background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.app-shell .topbar .topbar-label { color: var(--ink); }
.app-shell .top-btn { border: 1.5px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.app-shell .top-btn:hover { background: var(--canvas); color: var(--ink); }
.app-shell .page-heading:not(.compact) h1, .app-shell .staff-page-title { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: 0; }
.app-shell .panel, .app-shell [data-contact-history].panel, .app-shell .operation-card, .app-shell .money-card, .app-shell .summary-strip, .app-shell .kpi-card { border-color: transparent; border-radius: var(--radius); box-shadow: var(--shadow); }
.app-shell th, .app-shell .roll-table thead th, .app-shell .account-table th { background: #fff; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .3px; border-bottom: 2px solid var(--line); }
.app-shell .roll-table tbody tr:hover, .app-shell .roll-table tbody tr:hover > td { background: var(--canvas); }
.app-shell .button, .app-shell a.button, .app-shell button.button { border-width: 1.5px; font-weight: 600; }
.app-shell .button.primary, .app-shell button.primary, .app-shell a.primary { background: var(--primary); border-color: transparent; color: #fff; }
.app-shell .button.primary:hover, .app-shell button.primary:hover, .app-shell a.primary:hover { background: var(--primary-hover); border-color: transparent; }
.app-shell .button.secondary, .app-shell button.secondary, .app-shell a.secondary { border-color: var(--line); color: var(--muted); box-shadow: none; }
.app-shell .button.secondary:hover, .app-shell button.secondary:hover, .app-shell a.secondary:hover { background: var(--canvas); color: var(--ink); }
.app-shell .acct-nav .chip.active { background: var(--accent); border-color: var(--accent); }
.app-shell .panel-tabs .current { border-bottom-color: var(--accent); color: var(--accent); }
@media (max-width: 800px) {
  .sidebar .sb-logo, .sidebar .sb-div { display: none; }
}
@media (max-width: 760px) {
  .app-shell > .workspace { margin-left: 0; }
  .app-shell > .sidebar { width: min(300px, 86vw); }
  .sidebar .brand.orbit-wordmark { display: none; }
  .sidebar .dash-home { order: 1; min-height: 44px; margin: 8px 0 0; }
  .sidebar .sidebar-bottom { order: 2; }
}
@media print { .app-shell > .workspace { margin-left: 0 !important; } }
/* Printed staff pages keep the look they had before the dashboard layer (which is screen only). staffLayout's hoistPageTitle moves
   the page title out of the first card on every staff page; on paper that title is drawn back as the card's own header strip
   (10px 16px inside the card's 1px edge, 18px/600 title, subtitle only on wide sheets, actions in the same row). */
@media print {
  body:has(.app-shell) #main > .page-heading.staff-heading.form-cards-heading { display: none; }
  body:has(.app-shell) #main [data-form-card-title] { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; }
  body:has(.app-shell) #main > .page-heading.staff-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 11px 17px 9px; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 1px 3px rgba(15, 25, 55, .07); clip-path: inset(-4px -4px 0 -4px); }
  body:has(.app-shell) #main > .page-heading.staff-heading:has(.close-picker) { align-items: flex-end; gap: 8px 16px; }
  body:has(.app-shell) #main > .page-heading.staff-heading > div:first-child { display: block; min-width: 0; }
  body:has(.app-shell) #main > .page-heading.staff-heading h1 { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
  body:has(.app-shell) #main > .page-heading.staff-heading > div > p { display: block; margin: 0; font-size: 12px; line-height: 1.45; }
  body:has(.app-shell) #main > .page-heading.staff-heading > div > p a { display: inline; min-width: 0; min-height: 0; color: inherit; }
  body:has(.app-shell) #main > .page-heading.staff-heading > .page-actions { display: contents; }
  body:has(.app-shell) #main > .page-heading.staff-heading + .panel { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; clip-path: inset(0 -4px -4px -4px); }
  body:has(.app-shell) #main > .page-heading.staff-heading + .panel > :is(form, .filters):first-child { margin-top: 6px; }
}
@media print and (max-width: 1200px) {
  body:has(.app-shell) #main > .page-heading.staff-heading .small-muted { display: none; }
}
/* ===================================================================   Dashboard pages (Nov 5, 2026). The content of every staff page now matches dashboard.buncombecreekmarina.com, so
   Orbit and the dashboard read as one platform: title on the canvas with a muted subtitle, white 12px cards with a hairline
   header strip, stat tiles, the Home "big button" tiles on the overview, .dt tables, soft status pills, pill tabs, the
   filter-bar fields, .bp/.bgh/.bsm buttons, soft notices, dialogs and paging (the dashboard's head.ejs components).
   Scoped to the staff shell (body:has(.app-shell)), so the customer portal, sign-in, public token pages, invoices and e-mail
   keep their own look. The whole layer is screen only (one @media screen block), so printed pages and report sheets keep their
   pre-layer look; the print block just above draws a hoisted page title back into its card. The
   scope also outranks the insurance/list (.ins) and boats sheets that load after this file.
   Text, muted and status colours stay Orbit's (--ink, --muted, --positive, --warning are pinned by the gate pill tests);
   soft pill text uses the dashboard's darker AA-safe hues (#0064a9, #006b30, #8a4f00, #c5000f).
   Sizes stay dense: the dashboard's own compact values, the 12px text floor, and 44px targets at 800px and below.
   ========================================================================== */
@media screen {
body:has(.app-shell) {
  --dash-blue-soft: #c9f3ff;
  --dash-blue-text: #0064a9;
  --dash-green-soft: #cff2da;
  --dash-green-text: #006b30;
  --dash-amber-soft: #ffe1c7;
  --dash-amber-text: #8a4f00;
  --dash-red: #c5000f;
  --dash-red-soft: #ffdcd7;
  --dash-grey-soft: #f0f2f8;
  --dash-grey-text: #4a5578;
  --dash-zebra: #f8fafd;
  --dash-shadow-raised: 0 4px 12px rgba(15, 25, 55, .09);
  /* Field outlines need 3:1 against white and the canvas (WCAG 1.4.11); card hairlines stay --line. */
  --field-border: #7f8a9b;
  --field-border-hover: #5f6b7c;
}

/* Top bar: no longer a separate white app bar. It sits on the canvas, lined up with the page's 32px inset. */
body:has(.app-shell) .topbar { background: var(--canvas); border-bottom: 1px solid var(--line); box-shadow: none; }
@media (min-width: 1181px) { body:has(.app-shell) .topbar { padding: 0 32px !important; } }
body:has(.app-shell) .topbar-search .search-field { min-height: 36px !important; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--surface); box-shadow: none; }
body:has(.app-shell) .topbar-search .search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
body:has(.app-shell) .topbar-search input::placeholder { color: #98a4af; font-style: italic; opacity: 1; }
body:has(.app-shell) .biz-pills { gap: 6px; padding: 0; background: transparent; }
body:has(.app-shell) .biz-pill { min-height: 34px; padding: 0 14px; border: 1.5px solid var(--field-border); background: var(--surface); white-space: nowrap; font-size: 13px; font-weight: 600; }
body:has(.app-shell) .biz-pill:hover { border-color: var(--accent); background: var(--surface); }
body:has(.app-shell) .biz-pill.selected { border-color: transparent; }
body:has(.app-shell) .top-btn, body:has(.app-shell) .topbar .sb-signout .button { min-height: 36px; border: 1.5px solid var(--field-border); border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; box-shadow: none; }
body:has(.app-shell) .top-btn:hover, body:has(.app-shell) .topbar .sb-signout .button:hover { background: var(--surface); color: var(--ink); }
/* The dock picker's hidden Apply button stays hidden: the 44px phone target rules must not give it a size. */
body:has(.app-shell) .dock-scope button.sr-only { position: absolute; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; margin: -1px; border: 0 !important; overflow: hidden; clip: rect(0, 0, 0, 0); }

/* Page: 32px side insets, the title straight on the canvas. */
body:has(.app-shell):not(.report-print) .workspace > main, body:has(.app-shell):not(.report-print) .hosted-page.staff-page, body:has(.app-shell):not(.report-print) .hosted-page.staff-wide, body:has(.app-shell):not(.report-print) .workspace > main#main { padding: 16px 32px 32px; padding-top: 16px !important; }
body:has(.app-shell):not(.report-print) .page-heading { align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
body:has(.app-shell):not(.report-print) .page-heading > div:first-child { min-width: 0; }
body:has(.app-shell):not(.report-print) .page-heading h1, body:has(.app-shell):not(.report-print) .page-heading.compact h1, body:has(.app-shell):not(.report-print) main .page-heading h1, body:has(.app-shell):not(.report-print) .staff-page-title, body:has(.app-shell):not(.report-print) .ins-head h1 { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: 0; color: var(--ink); margin: 0; }
body:has(.app-shell):not(.report-print) .hosted-page .panel-header h1 { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: 0; }
body:has(.app-shell):not(.report-print) h1.staff-page-title { margin: 0 0 16px; }
body:has(.app-shell):not(.report-print) main.staff-page .page-heading:not(.vendor-detail .page-heading) > div > p, body:has(.app-shell):not(.report-print) .ins-head > div > p { display: block; flex-basis: 100%; margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
body:has(.app-shell):not(.report-print) .page-heading > div:not(:first-child), body:has(.app-shell):not(.report-print) .page-heading .vendor-head-actions, body:has(.app-shell):not(.report-print) .page-heading .gate-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
body:has(.app-shell):not(.report-print) .ins-head { margin: 0 0 16px; align-items: flex-start; }
body:has(.app-shell):not(.report-print) .crumbs.staff-back:not(.return-back) a, body:has(.app-shell):not(.report-print) .back-link { color: var(--muted); font-size: 13px; text-decoration: none; }
body:has(.app-shell):not(.report-print) .crumbs.staff-back:not(.return-back) a:hover, body:has(.app-shell):not(.report-print) .back-link:hover { color: var(--dash-blue-text); }
body:has(.app-shell):not(.report-print) .crumbs.staff-back { margin: 0 0 6px; }

/* Cards (.cp): white, 12px radius, soft shadow, no border; header strip 14px 18px over a hairline; 16px between cards. */
body:has(.app-shell):not(.report-print) .panel { background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .panel + .panel, body:has(.app-shell):not(.report-print) .staff-page .panel { margin-bottom: 16px; }
body:has(.app-shell):not(.report-print) .panel + .panel { margin-top: 16px; }
body:has(.app-shell):not(.report-print) .staff-page .panel + .panel { margin-top: 0; }
body:has(.app-shell):not(.report-print) .panel-header, body:has(.app-shell):not(.report-print) .staff-page .panel-header, body:has(.app-shell):not(.report-print) #main .detail-main .panel-header, body:has(.app-shell):not(.report-print) #main .detail-aside .panel-header { align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 12px 18px; margin: 0; }
body:has(.app-shell):not(.report-print) .panel > .panel-header:not(:last-child) { border-bottom: 1px solid var(--line); }
body:has(.app-shell):not(.report-print) .panel-header h2, body:has(.app-shell):not(.report-print) .staff-page .panel-header h2 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.5; letter-spacing: 0; color: var(--ink); }
body:has(.app-shell):not(.report-print) .panel-header h2 .count-badge, body:has(.app-shell):not(.report-print) .panel-header h1 .count-badge { margin-left: 4px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > form, body:has(.app-shell):not(.report-print) .staff-page .panel > .filters, body:has(.app-shell):not(.report-print) .staff-page .panel > .notice, body:has(.app-shell):not(.report-print) .staff-page .panel > details, body:has(.app-shell):not(.report-print) .staff-page .panel > p, body:has(.app-shell):not(.report-print) .staff-page .panel > ul, body:has(.app-shell):not(.report-print) .staff-page .panel > dl, body:has(.app-shell):not(.report-print) .staff-page .panel > .facts, body:has(.app-shell):not(.report-print) .staff-page .panel > .empty-state, body:has(.app-shell):not(.report-print) .staff-page .panel > .meta-line, body:has(.app-shell):not(.report-print) .staff-page .panel > .slip-form, body:has(.app-shell):not(.report-print) .staff-page .panel > h3, body:has(.app-shell):not(.report-print) .staff-page .panel > h4, body:has(.app-shell):not(.report-print) .staff-page .panel > fieldset, body:has(.app-shell):not(.report-print) .staff-page .panel > .form-grid, body:has(.app-shell):not(.report-print) .staff-page .panel > .form-actions, body:has(.app-shell):not(.report-print) .staff-page .panel > div.small-muted { margin-left: 18px; margin-right: 18px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > .panel-header + form, body:has(.app-shell):not(.report-print) .staff-page .panel > .panel-header + .filters, body:has(.app-shell):not(.report-print) .staff-page .panel > .panel-header + p, body:has(.app-shell):not(.report-print) .staff-page .panel > .panel-header + .notice { margin-top: 14px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > form:last-child, body:has(.app-shell):not(.report-print) .staff-page .panel > .filters:last-child, body:has(.app-shell):not(.report-print) .staff-page .panel > p:last-child { margin-bottom: 16px; }
body:has(.app-shell):not(.report-print) .panel-body, body:has(.app-shell):not(.report-print) #main .detail-main .panel-body { padding: 16px 18px; }
body:has(.app-shell):not(.report-print) .panel > .panel-header:not(:last-child) + :is(form, .form-grid, .kind-toggle, fieldset, dl, .facts) { margin-top: 14px; }
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .panel > p, body:has(.app-shell):not(.report-print) #main:not(.staff-page) .panel > .sort-note { margin-left: 18px; margin-right: 18px; }
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .panel > p:last-child { margin-bottom: 14px; }
body:has(.app-shell):not(.report-print) .history-disclosure { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .operation-card, body:has(.app-shell):not(.report-print) .money-card { border: 0; border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .slip-form:not(.inline) { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }

/* Stat tiles (.stat-card): label + number + muted line, 4 across with a 14px gap. */
body:has(.app-shell):not(.report-print) .kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 0 0 16px; }
body:has(.app-shell):not(.report-print) .kpi-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px; background: var(--surface); border: 1.5px solid transparent; border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
body:has(.app-shell):not(.report-print) .kpi-card .micro-label, body:has(.app-shell):not(.report-print) .kpi-card > span:first-child:not(.stat-label) { display: block; font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-transform: none; color: var(--muted); }
body:has(.app-shell):not(.report-print) .kpi-card strong { display: block; margin: 0; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; color: var(--ink); }
body:has(.app-shell):not(.report-print) .kpi-card small { font-size: 12px; color: var(--muted); }
body:has(.app-shell):not(.report-print) .kpi-card.warn strong { color: var(--warning); } body:has(.app-shell):not(.report-print) .kpi-card.bad strong { color: var(--danger); }
body:has(.app-shell):not(.report-print) a.kpi-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
body:has(.app-shell):not(.report-print) a.kpi-card:hover, body:has(.app-shell):not(.report-print) a.kpi-card:focus-visible { border-color: var(--accent); background: var(--surface); box-shadow: var(--dash-shadow-raised); transform: translateY(-1px); text-decoration: none; }
body:has(.app-shell):not(.report-print) .summary-strip { background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .summary-strip .micro-label { font-size: 12px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .summary-strip strong { font-weight: 700; font-variant-numeric: tabular-nums; }
/* A row of figures inside a card (the overview's payables strip). */
body:has(.app-shell):not(.report-print) .stat .stat-label { font-size: 13px; font-weight: 500; line-height: 1.35; letter-spacing: 0; color: var(--muted); }
body:has(.app-shell):not(.report-print) .stat .stat-value { font-size: 22px; font-weight: 700; line-height: 1.15; }
body:has(.app-shell):not(.report-print) .stat .stat-note { font-size: 12px; line-height: 1.4; }
body:has(.app-shell):not(.report-print) .stat-row > .stat { padding: 12px 18px; }
body:has(.app-shell):not(.report-print) .ap-dash .summary-strip { margin: 0; border-radius: 0 0 12px 12px; box-shadow: none; }
body:has(.app-shell):not(.report-print) .ap-dash .summary-strip a.stat:hover { background: var(--canvas); }

/* The overview's figures are the dashboard Home tiles ("big buttons"): label and icon square, a big number, a muted line, then "View list". */
body:has(.app-shell):not(.report-print) .kpi-grid:has(> a.kpi-link) { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link { gap: 10px; min-height: 150px; padding: 18px 20px; }
body:has(.app-shell):not(.report-print) a.stat.kpi-link .stat-label { padding-right: 48px; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link .stat-value { font-size: 32px; font-weight: 700; line-height: 1; color: var(--ink); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link.warn .stat-value { color: var(--warning); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link .stat-note { max-width: none; margin-top: auto; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link .kpi-open { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--accent); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link .kpi-open::after { content: "\2192" / ""; }
body:has(.app-shell):not(.report-print) a.stat.kpi-link::before { content: ""; position: absolute; top: 16px; right: 18px; width: 38px; height: 38px; border-radius: 8px; background: var(--dash-blue-soft); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link::after { content: ""; position: absolute; top: 26px; right: 28px; width: 18px; height: 18px; background: var(--accent); -webkit-mask: var(--tile-icon) center / contain no-repeat; mask: var(--tile-icon) center / contain no-repeat; }
body:has(.app-shell):not(.report-print) a.stat.kpi-link.warn::before { background: var(--dash-amber-soft); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link.warn::after { background: #b45f00; }
body:has(.app-shell):not(.report-print) a.stat.kpi-link { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 21h18M6 17v-6M11 17V5M16 17v-9M21 17v-3'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card$="/rentable"], body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card$="/vacant"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='2'/%3E%3Cpath d='M12 7v14M5 13a7 7 0 0 0 14 0M8 11h8'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card$="/out-of-service"], body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card*="work-orders"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.3 5.3L3.5 17.5a2.1 2.1 0 0 0 3 3l5.9-5.9a4 4 0 0 0 5.3-5.3l-2.6 2.6-2.4-.6-.6-2.4z'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card$="/expiring-30"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15' rx='2'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card$="outstanding"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6.5 9.5v.01M17.5 14.5v.01'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card$="/active-leases"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6.5A1.5 1.5 0 0 0 5 4.5v15A1.5 1.5 0 0 0 6.5 21h11a1.5 1.5 0 0 0 1.5-1.5V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card*="/staff/insurance"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7.5 3v5.5c0 4.4-3.1 8-7.5 9.5-4.4-1.5-7.5-5.1-7.5-9.5V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.stat.kpi-link[data-card*="/staff/gate"] { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='12' r='3.5'/%3E%3Cpath d='M11 12h10M17 12v3M20 12v2'/%3E%3C/svg%3E"); }

/* Report index and expiry group cards: the same tile, bordered because they sit inside a card; blue "Open" footer on report tiles. */
body:has(.app-shell):not(.report-print) .acct-cards { margin: 16px 18px; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
body:has(.app-shell):not(.report-print) .acct-cards a, body:has(.app-shell):not(.report-print) .group-grid a { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
body:has(.app-shell):not(.report-print) .acct-cards a:hover, body:has(.app-shell):not(.report-print) .acct-cards a:focus-visible, body:has(.app-shell):not(.report-print) .group-grid a:hover, body:has(.app-shell):not(.report-print) .group-grid a:focus-visible { border-color: var(--accent); background: var(--surface); box-shadow: var(--dash-shadow-raised); transform: translateY(-1px); text-decoration: none; }
body:has(.app-shell):not(.report-print) .acct-cards a strong { font-size: 15px; font-weight: 600; color: var(--ink); }
body:has(.app-shell):not(.report-print) .acct-cards span { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
body:has(.app-shell):not(.report-print) .acct-cards a::after { content: "Open \2192" / ""; margin-top: auto; padding-top: 4px; font-size: 12px; font-weight: 600; color: var(--accent); }
body:has(.app-shell):not(.report-print) .group-grid strong { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: 0; }
@media (prefers-reduced-motion: reduce) { body:has(.app-shell):not(.report-print) a.kpi-card, body:has(.app-shell):not(.report-print) .acct-cards a, body:has(.app-shell):not(.report-print) .group-grid a { transition: none; } body:has(.app-shell):not(.report-print) a.kpi-card:hover, body:has(.app-shell):not(.report-print) .acct-cards a:hover, body:has(.app-shell):not(.report-print) .group-grid a:hover { transform: none; } }

/* Tables (.dt): 12px muted headers over a 2px rule, 13px rows with 10px 14px cells, hairlines, faint zebra, canvas hover. */
body:has(.app-shell):not(.report-print) th, body:has(.app-shell):not(.report-print) .roll-table thead th, body:has(.app-shell):not(.report-print) .account-table th { background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: none; border-bottom: 2px solid var(--line); }
@media (min-width: 761px) { body:has(.app-shell):not(.report-print) thead th { white-space: nowrap; } }
body:has(.app-shell):not(.report-print) td { font-size: 13px; }
@media (min-width: 761px) { body:has(.app-shell):not(.report-print) td { border-bottom: 1px solid var(--line); } }
@media (min-width: 761px) { body:has(.app-shell):not(.report-print) .roll-table td a:not(.button) { font-size: 13px; } }
body:has(.app-shell):not(.report-print) .sort-link, body:has(.app-shell):not(.report-print) .sort-button { color: var(--muted); font-weight: 600; letter-spacing: .3px; }
body:has(.app-shell):not(.report-print) .sort-link:hover, body:has(.app-shell):not(.report-print) .sort-button:hover { color: var(--ink); background: transparent; }
body:has(.app-shell):not(.report-print) .sort-link.active, body:has(.app-shell):not(.report-print) .roll-table a.sort-link.active { color: var(--ink); }
@media (min-width: 761px) {
  body:has(.app-shell):not(.report-print) .roll-table th, body:has(.app-shell):not(.report-print) .roll-table td, body:has(.app-shell):not(.report-print) .account-table th, body:has(.app-shell):not(.report-print) .account-table td, body:has(.app-shell):not(.report-print) main .roll-table td { padding: 10px 14px; }
  body:has(.app-shell):not(.report-print) .roll-table.compact td, body:has(.app-shell):not(.report-print) .roll-table.compact th { padding-top: 8px; padding-bottom: 8px; }
  body:has(.app-shell):not(.report-print) .ap-page .roll-table.ap-table td, body:has(.app-shell):not(.report-print) .ap-page .roll-table.ap-table th:not(.sortable):not(:has(> .sort-button, > .sort-link)), body:has(.app-shell):not(.report-print) .ap-page .roll-table.ap-table .sort-link, body:has(.app-shell):not(.report-print) .ap-page .roll-table.ap-table .sort-button { padding: 8px 6px; }
  body:has(.app-shell):not(.report-print) .roll-table th.sortable, body:has(.app-shell):not(.report-print) .account-table th.sortable, body:has(.app-shell):not(.report-print) table th:has(> .sort-button), body:has(.app-shell):not(.report-print) :is(.roll-table, .account-table, table) th:has(> .sort-link, > .sort-button), body:has(.app-shell):not(.report-print) .roll-table.compact th:has(> .sort-link, > .sort-button) { padding: 0; }
  body:has(.app-shell):not(.report-print) :is(.sort-link, .sort-button) { white-space: nowrap; }
  body:has(.app-shell):not(.report-print) .sort-link, body:has(.app-shell):not(.report-print) .sort-button, body:has(.app-shell):not(.report-print) main .roll-table .sort-link, body:has(.app-shell):not(.report-print) main .roll-table .sort-button { min-height: 36px; padding: 10px 14px; }
  body:has(.app-shell):not(.report-print) .roll-table tbody tr:nth-child(even) { background: var(--dash-zebra); }
  body:has(.app-shell):not(.report-print) .roll-table tbody tr:hover, body:has(.app-shell):not(.report-print) .roll-table tbody tr:hover > td, body:has(.app-shell):not(.report-print) tr[data-row-href]:hover td { background: var(--canvas); }
}
body:has(.app-shell):not(.report-print) .roll-table td.money, body:has(.app-shell):not(.report-print) .roll-table td.num, body:has(.app-shell):not(.report-print) td.num, body:has(.app-shell):not(.report-print) th.num { font-variant-numeric: tabular-nums; }
@media (min-width: 761px) { body:has(.app-shell):not(.report-print) :is(td, th).num { text-align: right; } body:has(.app-shell):not(.report-print) th.num :is(.sort-link, .sort-button) { justify-content: flex-end; text-align: right; } }

/* Status pills (.sb-*): rounded-full, soft tint, same-hue text, 12px/600. */
body:has(.app-shell):not(.report-print) .badge, body:has(.app-shell):not(.report-print) .tag, body:has(.app-shell):not(.report-print) .status-chip, body:has(.app-shell):not(.report-print) .ins .chip { align-items: center; gap: 5px; padding: 2px 9px; border: 0; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--dash-grey-soft); color: var(--dash-grey-text); }
body:has(.app-shell):not(.report-print) .count-badge, body:has(.app-shell):not(.report-print) .tab-count { align-items: center; justify-content: center; min-width: 20px; padding: 0 7px; border: 0; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.5; background: var(--dash-grey-soft); color: var(--dash-grey-text); }
body:has(.app-shell):not(.report-print) .badge.positive, body:has(.app-shell):not(.report-print) .tag.ok, body:has(.app-shell):not(.report-print) .tag.success, body:has(.app-shell):not(.report-print) .ins .status-ok, body:has(.app-shell):not(.report-print) .ins .chip.ok { background: var(--dash-green-soft); color: var(--dash-green-text); }
body:has(.app-shell):not(.report-print) .badge.warning, body:has(.app-shell):not(.report-print) .tag.warn, body:has(.app-shell):not(.report-print) .tag.warning, body:has(.app-shell):not(.report-print) .ins .status-warn, body:has(.app-shell):not(.report-print) .ins .chip.warn { background: var(--dash-amber-soft); color: var(--dash-amber-text); }
body:has(.app-shell):not(.report-print) .badge.danger, body:has(.app-shell):not(.report-print) .ins .status-bad, body:has(.app-shell):not(.report-print) .ins .chip.bad { background: var(--dash-red-soft); color: var(--dash-red); }
body:has(.app-shell):not(.report-print) .badge.blue, body:has(.app-shell):not(.report-print) .tag.soon, body:has(.app-shell):not(.report-print) .ins .chip.review { background: var(--dash-blue-soft); color: var(--dash-blue-text); }
body:has(.app-shell):not(.report-print) .tag.past { background: var(--dash-grey-soft); color: var(--dash-grey-text); }
/* Guide badge (fishing guide, insurance_requirement kind 'guide'): teal so it reads apart from the status pills. */
body:has(.app-shell):not(.report-print) .tag[data-guide], body:has(.app-shell):not(.report-print) .badge[data-guide] { background: #ccfbf1; color: #0f5f58; border-color: #5eead4; }
body:has(.app-shell):not(.report-print) .ins .status-chip::before, body:has(.app-shell):not(.report-print) .ins .chip::before, body:has(.app-shell):not(.report-print) .badge .status-dot { width: 6px; height: 6px; }

/* Tabs and chips: pill tabs (.mt-tab), the current one solid blue with white text; counts sit inside at 75%. */
body:has(.app-shell):not(.report-print) .segmented { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; background: transparent; border: 0; border-radius: 0; }
body:has(.app-shell):not(.report-print) .segmented a, body:has(.app-shell):not(.report-print) .acct-nav .chip, body:has(.app-shell):not(.report-print) .ins-tabs a, body:has(.app-shell):not(.report-print) .ins .seg a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; text-decoration: none; box-shadow: none; margin: 0; }
body:has(.app-shell):not(.report-print) .segmented a:hover, body:has(.app-shell):not(.report-print) .acct-nav .chip:hover, body:has(.app-shell):not(.report-print) .ins-tabs a:hover, body:has(.app-shell):not(.report-print) .ins .seg a:hover { border-color: var(--accent); color: var(--ink); background: var(--surface); text-decoration: none; }
body:has(.app-shell):not(.report-print) .segmented a.selected, body:has(.app-shell):not(.report-print) .segmented a[aria-current], body:has(.app-shell):not(.report-print) .acct-nav .chip.active, body:has(.app-shell):not(.report-print) .ins-tabs a[aria-current], body:has(.app-shell):not(.report-print) .ins .seg a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }
body:has(.app-shell):not(.report-print) .segmented a .tab-count, body:has(.app-shell):not(.report-print) .acct-nav .chip .count-badge { min-width: 0; padding: 0; background: transparent; color: inherit; font-weight: 500; }
body:has(.app-shell):not(.report-print) .segmented a.selected .tab-count, body:has(.app-shell):not(.report-print) .segmented a[aria-current] .tab-count, body:has(.app-shell):not(.report-print) .acct-nav .chip.active .count-badge { background: transparent; color: #fff; opacity: 1; }
body:has(.app-shell):not(.report-print) .ins-tabs { gap: 6px; border-bottom: 0; margin: 0 0 16px; padding-bottom: 2px; }
/* Link rows that act as tabs (e-sign status filter): the same pills. */
body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) { display: flex; flex-wrap: wrap; gap: 6px; }
body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) > a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; text-decoration: none; }
body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) > a:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) > a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) > a .count-badge { min-width: 0; padding: 0; background: transparent; color: inherit; }
body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) > a[aria-current] .count-badge { color: #fff; opacity: 1; }
body:has(.app-shell):not(.report-print) nav.facet-bar.acct-nav, body:has(.app-shell):not(.report-print) .staff-page nav.facet-bar { gap: 6px; }
@media (min-width: 801px) { body:has(.app-shell):not(.report-print) .segmented a, body:has(.app-shell):not(.report-print) .acct-nav .chip, body:has(.app-shell):not(.report-print) .ins-tabs a { min-height: 34px; } }
body:has(.app-shell):not(.report-print) .chip-filter { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--accent); border-radius: 999px; background: var(--dash-blue-soft); color: var(--dash-blue-text); font-size: 12px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .chip-filter:hover, body:has(.app-shell):not(.report-print) .chip-filter:focus-visible { background: #b3ecff; }

/* Fields: the filter-bar look (.si/.fsl) and the form look (.mform): 1.5px #e3e8f2, radius 8, blue border and ring on focus. */
body:has(.app-shell):not(.report-print) input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not([type=button]):not([type=range]):not([type=color]), body:has(.app-shell):not(.report-print) select, body:has(.app-shell):not(.report-print) textarea { border: 1.5px solid var(--field-border); border-radius: 8px; background-color: var(--surface); color: var(--ink); box-shadow: none; }
body:has(.app-shell):not(.report-print) .search-field input, body:has(.app-shell):not(.report-print) .search-field input:hover, body:has(.app-shell):not(.report-print) .search-field input:focus-visible { border: 0 !important; box-shadow: none !important; background: transparent; }
body:has(.app-shell):not(.report-print) .search-field { border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--surface); box-shadow: none; }
body:has(.app-shell):not(.report-print) input:hover:not(:focus):not([type=checkbox]):not([type=radio]), body:has(.app-shell):not(.report-print) select:hover:not(:focus), body:has(.app-shell):not(.report-print) textarea:hover:not(:focus), body:has(.app-shell):not(.report-print) .search-field:hover:not(:focus-within) { border-color: var(--field-border-hover); }
body:has(.app-shell):not(.report-print) input:focus-visible, body:has(.app-shell):not(.report-print) select:focus-visible, body:has(.app-shell):not(.report-print) textarea:focus-visible, body:has(.app-shell):not(.report-print) .staff-page .filter-field input:focus-visible, body:has(.app-shell):not(.report-print) .staff-page .filter-field select:focus-visible, body:has(.app-shell):not(.report-print) .staff-page .filter-field textarea:focus-visible, body:has(.app-shell):not(.report-print) .search-field:focus-within { outline: none; border-color: var(--accent) !important; box-shadow: var(--focus); }
body:has(.app-shell):not(.report-print) input::placeholder, body:has(.app-shell):not(.report-print) textarea::placeholder { color: #98a4af; font-style: italic; opacity: 1; }
body:has(.app-shell):not(.report-print) .filter-field, body:has(.app-shell):not(.report-print) .staff-page .filter-field { color: var(--muted); font-size: 13px; font-weight: 500; }
body:has(.app-shell):not(.report-print) .filter-field > span:first-child { font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .form-subhead { font-size: 14px; font-weight: 600; color: var(--ink); }
@media (min-width: 801px) {
  body:has(.app-shell):not(.report-print) .staff-page .filter-field input:not([type=checkbox]):not([type=radio]), body:has(.app-shell):not(.report-print) .staff-page .filter-field select, body:has(.app-shell):not(.report-print) .form-grid input:not([type=checkbox]):not([type=radio]), body:has(.app-shell):not(.report-print) .form-grid select, body:has(.app-shell):not(.report-print) .filter-field select { min-height: 40px; padding: 6px 12px; font-size: 13px; }
  body:has(.app-shell):not(.report-print) .form-grid input:not([type=checkbox]):not([type=radio]), body:has(.app-shell):not(.report-print) .form-grid textarea { font-size: 14px; }
  body:has(.app-shell):not(.report-print) .staff-page .filter-field textarea, body:has(.app-shell):not(.report-print) .form-grid textarea { min-height: 84px; padding: 8px 12px; font-size: 14px; }
  body:has(.app-shell):not(.report-print) form.filters .filter-field input:not([type=checkbox]):not([type=radio]), body:has(.app-shell):not(.report-print) form.filters .filter-field select, body:has(.app-shell):not(.report-print) form.filters select, body:has(.app-shell):not(.report-print) .filters input[type="date"], body:has(.app-shell):not(.report-print) .filters .search-field { min-height: 36px; padding: 5px 12px; font-size: 13px; }
  body:has(.app-shell):not(.report-print) .filters .search-field input { min-height: 30px; padding: 0; }
  body:has(.app-shell):not(.report-print) .staff-page .filters, body:has(.app-shell):not(.report-print) .staff-page .form-grid { gap: 12px 16px; }
}
body:has(.app-shell):not(.report-print) .form-actions { gap: 8px; }
/* Filter selects in a list's control row take the width of their choice, like the dashboard's .fsl, so the row stays one line. */
@media (min-width: 761px) {
  body:has(.app-shell):not(.report-print) .panel-controls .filter-panel form.filters { flex-wrap: wrap; }
  body:has(.app-shell):not(.report-print) .panel-controls .filter-panel .filter-field { flex: 0 0 auto; width: auto; max-width: none; gap: 6px; white-space: nowrap; }
  body:has(.app-shell):not(.report-print) .panel-controls .filter-panel .filter-field > span { white-space: nowrap; }
  body:has(.app-shell):not(.report-print) .panel-controls .filter-panel .filter-field select { width: auto; max-width: 300px; }
}

/* Buttons: .bp (solid blue), .bgh (ghost), .bsm (12px blue outline in rows), danger red. 36px on desktop; 44px at 800px and below (rules above). */
body:has(.app-shell):not(.report-print) .button, body:has(.app-shell):not(.report-print) a.button, body:has(.app-shell):not(.report-print) button.button { align-items: center; justify-content: center; gap: 6px; border: 1.5px solid transparent; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 600; text-decoration: none; transition: opacity .12s, background .12s, color .12s; }
body:has(.app-shell):not(.report-print) .button.primary, body:has(.app-shell):not(.report-print) button.primary, body:has(.app-shell):not(.report-print) a.primary, body:has(.app-shell):not(.report-print) .primary.button { background: var(--primary); border-color: transparent; color: #fff; box-shadow: none; }
body:has(.app-shell):not(.report-print) .button.primary:hover, body:has(.app-shell):not(.report-print) button.primary:hover, body:has(.app-shell):not(.report-print) a.primary:hover { background: var(--primary-hover); border-color: transparent; color: #fff; opacity: 1; }
body:has(.app-shell):not(.report-print) .button.secondary, body:has(.app-shell):not(.report-print) button.secondary, body:has(.app-shell):not(.report-print) a.secondary, body:has(.app-shell):not(.report-print) .secondary.button, body:has(.app-shell):not(.report-print) .button:not(.primary):not(.danger):not(.secondary) { background: transparent; border-color: var(--line); color: var(--muted); font-weight: 500; box-shadow: none; }
body:has(.app-shell):not(.report-print) .panel .button.secondary, body:has(.app-shell):not(.report-print) .panel .button:not(.primary):not(.danger):not(.secondary) { background: var(--surface); }
body:has(.app-shell):not(.report-print) .button.secondary:hover, body:has(.app-shell):not(.report-print) button.secondary:hover, body:has(.app-shell):not(.report-print) a.secondary:hover, body:has(.app-shell):not(.report-print) .button:not(.primary):not(.danger):not(.secondary):hover { background: var(--canvas); border-color: var(--line); color: var(--ink); }
body:has(.app-shell):not(.report-print) .button.danger, body:has(.app-shell):not(.report-print) button.danger:not(.link-button) { background: var(--dash-red); border-color: transparent; color: #fff; }
body:has(.app-shell):not(.report-print) .button.danger:hover, body:has(.app-shell):not(.report-print) button.danger:not(.link-button):hover { background: #9c000c; color: #fff; opacity: 1; }
body:has(.app-shell):not(.report-print) .button.secondary.danger { background: var(--surface); border-color: var(--dash-red); color: var(--dash-red); }
body:has(.app-shell):not(.report-print) .button.secondary.danger:hover { background: var(--dash-red-soft); color: var(--dash-red); opacity: 1; }
body:has(.app-shell):not(.report-print) .button[aria-disabled="true"], body:has(.app-shell):not(.report-print) .button.is-disabled, body:has(.app-shell):not(.report-print) .button:disabled { opacity: .55; cursor: default; }
body:has(.app-shell):not(.report-print) .button.small, body:has(.app-shell):not(.report-print) td .button.secondary, body:has(.app-shell):not(.report-print) td .button:not(.primary):not(.danger):not(.secondary), body:has(.app-shell):not(.report-print) .panel-header .button.secondary.small { gap: 5px; border-color: var(--accent); background: var(--surface); color: var(--dash-blue-text); font-size: 12px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .button.small:hover, body:has(.app-shell):not(.report-print) td .button.secondary:hover, body:has(.app-shell):not(.report-print) td .button:not(.primary):not(.danger):not(.secondary):hover { background: var(--dash-blue-soft); color: var(--dash-blue-text); border-color: var(--accent); }
body:has(.app-shell):not(.report-print) td .button { font-size: 12px; }
@media (min-width: 801px) {
  body:has(.app-shell):not(.report-print) .button, body:has(.app-shell):not(.report-print) a.button, body:has(.app-shell):not(.report-print) button.button, body:has(.app-shell):not(.report-print) .filters .button, body:has(.app-shell):not(.report-print) .pager-nav .button { min-height: 36px; padding: 0 16px; }
  body:has(.app-shell):not(.report-print) .button.small, body:has(.app-shell):not(.report-print) td .button, body:has(.app-shell):not(.report-print) .panel-header .button.small { min-height: 28px; padding: 0 10px; }
  body:has(.app-shell):not(.report-print) .filters .search-field + .button, body:has(.app-shell):not(.report-print) form.filters > .button, body:has(.app-shell):not(.report-print) form.filters > button { min-height: 36px; }
}
body:has(.app-shell):not(.report-print) .text-button, body:has(.app-shell):not(.report-print) .link-button { color: var(--dash-blue-text); font-weight: 600; }

/* Notices: soft fill, 13px/500, radius 8; warning, success and error carry a 1px border of their tone, info has none. */
body:has(.app-shell):not(.report-print) .notice:not(.gate-prompt, .flash) { border: 1px solid transparent; border-radius: 8px; padding: 10px 14px; background: #eaf6fd; color: #0b3f63; font-size: 13px; font-weight: 500; }
body:has(.app-shell):not(.report-print) .notice.compact:not(.gate-prompt, .flash) { padding: 8px 12px; }
body:has(.app-shell):not(.report-print) .notice:not(.gate-prompt, .flash) p, body:has(.app-shell):not(.report-print) .notice:not(.gate-prompt, .flash) strong { font-size: 13px; }
body:has(.app-shell):not(.report-print) .notice a, body:has(.app-shell):not(.report-print) .notice summary, body:has(.app-shell):not(.report-print) .neutral-notice summary, body:has(.app-shell):not(.report-print) .source-ribbon a, body:has(.app-shell):not(.report-print) .source-ribbon summary { color: var(--dash-blue-text); }
body:has(.app-shell):not(.report-print) .notice.warning:not(.gate-prompt, .flash), body:has(.app-shell):not(.report-print) .warning-notice:not(.gate-prompt), body:has(.app-shell):not(.report-print) .notice.warn:not(.gate-prompt, .flash), body:has(.app-shell):not(.report-print) .flag-panel { background: var(--dash-amber-soft); border-color: #e9a25f; color: #6b3e00; }
body:has(.app-shell):not(.report-print) .notice.success:not(.gate-prompt, .flash), body:has(.app-shell):not(.report-print) .notice-line { background: var(--dash-green-soft); border-color: #5fbf86; color: #00561f; }
body:has(.app-shell):not(.report-print) .notice.danger:not(.gate-prompt, .flash), body:has(.app-shell):not(.report-print) .notice.error:not(.gate-prompt, .flash), body:has(.app-shell):not(.report-print) .form-error { background: var(--dash-red-soft); border-color: var(--dash-red); color: #9c000c; }
body:has(.app-shell):not(.report-print) .neutral-notice:not(.gate-prompt), body:has(.app-shell):not(.report-print) .notice.neutral:not(.gate-prompt, .flash), body:has(.app-shell):not(.report-print) .source-ribbon { background: #eaf6fd; border-color: transparent; color: #0b3f63; }
body:has(.app-shell):not(.report-print) .source-ribbon { border-radius: 8px; padding: 8px 12px; }
body:has(.app-shell):not(.report-print) .warn-line { background: var(--dash-amber-soft); color: #6b3e00; }

/* Empty states: a quiet muted line in a card; the titled kind is centred with a blue info mark. */
body:has(.app-shell):not(.report-print) p.empty-state, body:has(.app-shell):not(.report-print) .empty-inline { color: var(--muted); font-size: 13px; }
body:has(.app-shell):not(.report-print) .empty-state:has(> h3), body:has(.app-shell):not(.report-print) .staff-page .empty-state:has(> h3) { display: flex; flex-direction: column; align-items: center; max-width: none; padding: 32px 16px; text-align: center; color: var(--muted); }
body:has(.app-shell):not(.report-print) .empty-state:has(> h3)::before, body:has(.app-shell):not(.report-print) .staff-page .empty-state:has(> h3)::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 0 8px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.5'/%3E%3C/svg%3E") center / contain no-repeat; }
body:has(.app-shell):not(.report-print) .empty-state:has(> h3) > svg { display: none; }
body:has(.app-shell):not(.report-print) .empty-state h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
body:has(.app-shell):not(.report-print) .empty-state:has(> h3) p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* Paging (.pag/.pb): white 1.5px outlined squares, the current page solid blue. */
body:has(.app-shell):not(.report-print) .pager-number, body:has(.app-shell):not(.report-print) .pager-sizes a { border: 1.5px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 12px; box-shadow: none; }
body:has(.app-shell):not(.report-print) .pager-number:hover, body:has(.app-shell):not(.report-print) .pager-sizes a:hover { border-color: var(--accent); background: var(--surface); }
body:has(.app-shell):not(.report-print) .pager-number.current, body:has(.app-shell):not(.report-print) .pager-sizes a.selected { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none; }
body:has(.app-shell):not(.report-print) .pager-status, body:has(.app-shell):not(.report-print) nav.pager .small-muted { font-size: 12px; color: var(--muted); }

/* Dialogs (.mo/.mb): 12px radius, dialog shadow, navy-tinted blurred backdrop; a bottom sheet on phones. */
body:has(.app-shell):not(.report-print) dialog { border: 0; border-radius: 12px; padding: 20px 24px; box-shadow: var(--shadow-dialog); }
body:has(.app-shell):not(.report-print) dialog::backdrop { background: rgba(15, 20, 40, .45); backdrop-filter: blur(2px); }
body:has(.app-shell):not(.report-print) dialog h2 { font-size: 16px; font-weight: 700; letter-spacing: 0; }

/* The vendor page's side-by-side 1099 and W-9 cards keep their tighter, test-pinned header and fields (vendor-header-layout). */
body:has(.app-shell):not(.report-print) .vendor-detail .vendor-split .panel-header { padding: 6px 12px; }
body:has(.app-shell):not(.report-print) .vendor-detail .vendor-split .panel > form.form-grid { margin: 0; padding: 2px 12px 10px; }
body:has(.app-shell):not(.report-print) .vendor-detail .vendor-split .panel > .panel-note, body:has(.app-shell):not(.report-print) .vendor-detail .vendor-split .panel > .inline-form { margin: 0; padding: 4px 12px; }
@media (min-width: 801px) { body:has(.app-shell):not(.report-print) .vendor-detail .vendor-split .field input:not([type=checkbox]):not([type=radio]), body:has(.app-shell):not(.report-print) .vendor-detail .vendor-split .field select { min-height: 32px; padding: 4px 10px; font-size: 13px; } }

/* Phones (Orbit's 760px switch): 16px gutters, 18px title, two tiles across, 16px fields (no iOS zoom), sheets from the bottom. */
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .workspace > main, body:has(.app-shell):not(.report-print) .hosted-page.staff-page, body:has(.app-shell):not(.report-print) .hosted-page.staff-wide, body:has(.app-shell):not(.report-print) .workspace > main#main { padding: 16px 16px 24px; padding-top: 16px !important; }
  body:has(.app-shell):not(.report-print) .page-heading h1, body:has(.app-shell):not(.report-print) .page-heading.compact h1, body:has(.app-shell):not(.report-print) main .page-heading h1, body:has(.app-shell):not(.report-print) .staff-page-title, body:has(.app-shell):not(.report-print) .ins-head h1, body:has(.app-shell):not(.report-print) .hosted-page .panel-header h1 { font-size: 18px; }
  body:has(.app-shell):not(.report-print) main.staff-page .page-heading:not(.vendor-detail .page-heading) > div > p, body:has(.app-shell):not(.report-print) .ins-head > div > p { font-size: 13px; }
  body:has(.app-shell):not(.report-print) .page-heading { margin-bottom: 12px; }
  body:has(.app-shell):not(.report-print) .panel-header, body:has(.app-shell):not(.report-print) .staff-page .panel-header { padding: 12px 14px; }
  body:has(.app-shell):not(.report-print) .staff-page .panel > form, body:has(.app-shell):not(.report-print) .staff-page .panel > .filters, body:has(.app-shell):not(.report-print) .staff-page .panel > .notice, body:has(.app-shell):not(.report-print) .staff-page .panel > details, body:has(.app-shell):not(.report-print) .staff-page .panel > p, body:has(.app-shell):not(.report-print) .staff-page .panel > ul, body:has(.app-shell):not(.report-print) .staff-page .panel > dl, body:has(.app-shell):not(.report-print) .staff-page .panel > .facts, body:has(.app-shell):not(.report-print) .staff-page .panel > .empty-state, body:has(.app-shell):not(.report-print) .staff-page .panel > .meta-line, body:has(.app-shell):not(.report-print) .staff-page .panel > .slip-form { margin-left: 14px; margin-right: 14px; }
  body:has(.app-shell):not(.report-print) .kpi-grid, body:has(.app-shell):not(.report-print) .kpi-grid:has(> a.kpi-link) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body:has(.app-shell):not(.report-print) .kpi-card { padding: 14px 16px; }
  body:has(.app-shell):not(.report-print) .kpi-card strong { font-size: 22px; }
  body:has(.app-shell):not(.report-print) a.stat.kpi-link { min-height: 130px; gap: 8px; padding: 14px; }
  body:has(.app-shell):not(.report-print) a.stat.kpi-link .stat-label { padding-right: 40px; font-size: 14px; }
  body:has(.app-shell):not(.report-print) a.stat.kpi-link .stat-value { font-size: 26px; }
  body:has(.app-shell):not(.report-print) a.stat.kpi-link::before { top: 12px; right: 12px; width: 32px; height: 32px; }
  body:has(.app-shell):not(.report-print) a.stat.kpi-link::after { top: 19px; right: 19px; }
  body:has(.app-shell):not(.report-print) input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]):not([type=button]), body:has(.app-shell):not(.report-print) select, body:has(.app-shell):not(.report-print) textarea { font-size: 16px; }
  body:has(.app-shell):not(.report-print) .badge, body:has(.app-shell):not(.report-print) .tag { white-space: normal; }
  body:has(.app-shell):not(.report-print) dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 12px 12px 0 0; padding: 16px; max-height: 92dvh; }
}
@media (max-width: 359px) {
  body:has(.app-shell):not(.report-print) .kpi-grid, body:has(.app-shell):not(.report-print) .kpi-grid:has(> a.kpi-link) { grid-template-columns: 1fr; }
}

/* Review round (Nov 5, 2026): the second pass after the page-by-page review. Same scope and rules as above. */
/* Page title on the canvas: staffLayout moves a first-card title out of the card (hoistPageTitle); actions sit top-right. */
body:has(.app-shell):not(.report-print) .page-heading.staff-heading { margin: 0 0 16px; }
body:has(.app-shell):not(.report-print) .page-heading.staff-heading h1, body:has(.app-shell):not(.report-print) .page-heading.staff-heading h1.staff-page-title { margin: 0; }
body:has(.app-shell):not(.report-print) .page-heading.staff-heading > div:first-child { flex: 1 1 480px; }
body:has(.app-shell):not(.report-print) .page-heading > .page-actions { flex: 0 1 auto; margin-left: auto; }
body:has(.app-shell):not(.report-print) .page-heading .page-actions > :is(p, form, div) { padding: 0; }
body:has(.app-shell):not(.report-print) .page-heading .page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
body:has(.app-shell):not(.report-print) .page-heading .page-actions > :is(p, form, div) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
body:has(.app-shell):not(.report-print) .page-heading .page-actions > p.small-muted { font-size: 13px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > :first-child:not(.panel-header):not(.table-scroll):not(table):not(.panel-body):not(style):not(.kpi-grid) { margin-top: 16px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > p.panel-note + p.panel-note { margin-top: 8px; }
/* Whatever follows a card header starts 14px under its rule, like the dashboard's card body. */
body:has(.app-shell):not(.report-print) .panel > .panel-header:not(:last-child) + :is(nav, .filter-row, .segmented, .sort-menu, .type-cards, ul, ol, p, .table-tools, .status-row, div.small-muted, .notice, .filters, .inline-form, details) { margin-top: 14px; }
/* Tab and chip rows line up with the card's 18px inset. */
body:has(.app-shell):not(.report-print) .panel > :is(nav.acct-nav, nav.facet-bar, nav.chip-row, nav.filters, p.seg, .filter-row), body:has(.app-shell):not(.report-print) .staff-page .panel > nav.acct-nav, body:has(.app-shell):not(.report-print) .staff-page .panel > nav.filters { margin: 12px 18px; padding: 0; }
body:has(.app-shell):not(.report-print) :is(p.seg, nav.chip-row, nav.facet-bar) { display: flex; flex-wrap: wrap; gap: 6px; }

/* Section tabs written as p.seg links (naming review): the same pill tabs. */
body:has(.app-shell):not(.report-print) p.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; white-space: nowrap; text-decoration: none; }
body:has(.app-shell):not(.report-print) p.seg a:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
body:has(.app-shell):not(.report-print) p.seg a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
/* Filters, not navigation (business, basis, lease status, how far ahead, reconciliation lists): the dashboard's lighter filter chips. */
body:has(.app-shell):not(.report-print) :is(nav.facet-bar:not(.acct-nav), nav.chip-row) > a.chip, body:has(.app-shell):not(.report-print) nav.acct-nav:is([aria-label="Business"], [aria-label="Basis"], [aria-label="Lease status"]) .chip, body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; text-decoration: none; box-shadow: none; }
body:has(.app-shell):not(.report-print) :is(nav.facet-bar:not(.acct-nav), nav.chip-row) > a.chip:hover, body:has(.app-shell):not(.report-print) nav.acct-nav:is([aria-label="Business"], [aria-label="Basis"], [aria-label="Lease status"]) .chip:hover, body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a:hover { border-color: var(--accent); color: var(--ink); background: var(--surface); text-decoration: none; }
body:has(.app-shell):not(.report-print) :is(nav.facet-bar:not(.acct-nav), nav.chip-row) > a.chip:is(.active, .on, [aria-current]), body:has(.app-shell):not(.report-print) nav.acct-nav:is([aria-label="Business"], [aria-label="Basis"], [aria-label="Lease status"]) .chip:is(.active, [aria-current]), body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a:is(.selected, [aria-current]) { background: var(--dash-blue-soft); border-color: var(--accent); color: var(--dash-blue-text); font-weight: 600; }
body:has(.app-shell):not(.report-print) nav.acct-nav:is([aria-label="Business"], [aria-label="Basis"], [aria-label="Lease status"]) .chip .count-badge, body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a .tab-count, body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a:is(.selected, [aria-current]) .tab-count { color: inherit; background: transparent; }
/* Tabs drawn as buttons (time off, price-sheet years): pill tabs like every other page. */
body:has(.app-shell):not(.report-print) :is(p, div, nav):has(> a.button[aria-current]) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
body:has(.app-shell):not(.report-print) :is(p, div, nav):has(> a.button[aria-current]) > a.button { min-height: 34px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-weight: 600; }
body:has(.app-shell):not(.report-print) :is(p, div, nav):has(> a.button[aria-current]) > a.button:hover { border-color: var(--accent); background: var(--surface); color: var(--ink); }
body:has(.app-shell):not(.report-print) :is(p, div, nav):has(> a.button[aria-current]) > a.button[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
body:has(.app-shell):not(.report-print) .staff-page .panel > p.form-actions:has(> a.button[aria-current]) { margin-top: 14px; margin-bottom: 12px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > p.form-actions:has(> a.button[aria-current]) + p { margin-bottom: 12px; }

/* Links read as links: the dashboard draws them in the accent (AA-safe #0064a9); the current one is ink and underlined. */
body:has(.app-shell):not(.report-print):not(:has([data-staff-customer-edit])) :is(.panel-note, .small-muted, .meta-line, .page-note, dd, .details-list) a:not(.button):not(.chip):not(.biz-pill), body:has(.app-shell):not(.report-print) a.small-link { color: var(--dash-blue-text); font-weight: 600; text-decoration: none; }
body:has(.app-shell):not(.report-print):not(:has([data-staff-customer-edit])) :is(.panel-note, .small-muted, .meta-line, .page-note, dd, .details-list) a:not(.button):not(.chip):not(.biz-pill):hover, body:has(.app-shell):not(.report-print) a.small-link:hover { text-decoration: underline; }
body:has(.app-shell):not(.report-print):not(:has([data-staff-customer-edit])) :is(.panel-note, .small-muted, .meta-line, .page-note) a[aria-current]:not(.button):not(.chip) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
body:has(.app-shell):not(.report-print) :is(p.crumbs, nav.breadcrumb) a { color: var(--muted); font-size: 13px; text-decoration: none; }
body:has(.app-shell):not(.report-print) :is(p.crumbs, nav.breadcrumb) a:hover { color: var(--dash-blue-text); text-decoration: underline; }

/* Fields: 12px inner padding everywhere (labels above, 13px/500 muted), in-row controls 30px tall. */
body:has(.app-shell):not(.report-print) :is(label.field, .field):not(.ap-page td *):not(.vendor-split *) > :is(span:first-child, legend) { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) label.field:not(.vendor-split *):not(.ap-page td *) { font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) :is(label.field, .field):not(.vendor-split *):not(.ap-page *) > :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select) { box-sizing: border-box; min-height: 40px; padding: 6px 12px; color: var(--ink); }
body:has(.app-shell):not(.report-print) :is(label.field, .field):not(.vendor-split *):not(.ap-page *) > textarea { box-sizing: border-box; padding: 8px 12px; color: var(--ink); }
@media (min-width: 801px) {
  body:has(.app-shell):not(.report-print) :is(form.inline-form, .filter-bar) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select):not(.ap-page *):not(.vendor-split *) { box-sizing: border-box; max-width: 100%; min-height: 36px; padding: 5px 12px; font-size: 13px; }
  body:has(.app-shell):not(.report-print) td :is(form.inline-form, form.filters) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select):not(.ap-page *):not(.vendor-split *) { min-height: 30px; padding: 4px 10px; }
}
body:has(.app-shell):not(.report-print) .staff-page .panel > form.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body:has(.app-shell):not(.report-print) form.inline-form:not(.ap-page *) > label:not(.sr-only):not(.field) { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .staff-page .panel > :is(p, form, .notice) + form, body:has(.app-shell):not(.report-print) .staff-page .panel > form + :is(p, .notice) { margin-top: 12px; }
@media (min-width: 801px) { body:has(.app-shell):not(.report-print) .amazon-work .filter-bar :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select) { min-height: 36px; padding: 5px 12px; } }
body:has(.app-shell):not(.report-print) .ap-page form.inline-form > label.field > select[name="year"] { min-width: 90px; min-height: 30px; padding: 4px 10px; }
body:has(.app-shell):not(.report-print) input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--ink); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
/* Time off decisions: approve green, decline red outline. */
body:has(.app-shell):not(.report-print) td form.inline-form > button[value="approve"] { background: var(--dash-green-text); border-color: transparent; color: #fff; }
body:has(.app-shell):not(.report-print) td form.inline-form > button[value="approve"]:hover { background: #00561f; }
body:has(.app-shell):not(.report-print) td form.inline-form > button[value="decline"] { border-color: var(--dash-red); color: var(--dash-red); background: var(--surface); }
body:has(.app-shell):not(.report-print) td form.inline-form > button[value="decline"]:hover { background: var(--dash-red-soft); color: #9c000c; }

/* One card, several sections: each h3 is a header strip (title left, actions right); full-bleed tables stay full bleed. */
body:has(.app-shell):not(.report-print) .staff-page .panel > h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0 0; padding: 12px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--ink); }
body:has(.app-shell):not(.report-print) .staff-page .panel > h3 + :is(p, form, ul, .notice, .filters, div.small-muted) { margin-top: 12px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > h3 .small-muted { font-size: 13px; font-weight: 400; }
body:has(.app-shell):not(.report-print) .staff-page .panel > h3 > a.button:first-of-type, body:has(.app-shell):not(.report-print) .staff-page .panel > h3 > button:first-of-type { margin-left: auto; }
body:has(.app-shell):not(.report-print) .staff-page .panel > form:has(> .table-scroll) { margin-left: 0; margin-right: 0; }
body:has(.app-shell):not(.report-print) .staff-page .panel > form:has(> .table-scroll) > :not(.table-scroll) { margin-left: 18px; margin-right: 18px; }
body:has(.app-shell):not(.report-print) .form-grid > :is(h3, h4, .form-subhead) { grid-column: 1 / -1; margin: 8px 0 0; }
body:has(.app-shell):not(.report-print) ul.plain-list:has(> li > a.button) { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 18px 16px; padding: 0; list-style: none; }
body:has(.app-shell):not(.report-print) .staff-page .panel > :is(ul.plain, ol.history):not(.gate-page *) { margin: 12px 18px 16px; padding-left: 0; list-style: none; }
body:has(.app-shell):not(.report-print) .panel > .form-grid:last-child, body:has(.app-shell):not(.report-print) .cf-section > .form-grid:last-child { padding-bottom: 16px; }
/* Amazon orders: the card body has the 18px inset, header links grouped on the right. */
body:has(.app-shell):not(.report-print) .amazon-work { padding: 0 18px 16px; }
body:has(.app-shell):not(.report-print) .amazon-work > .panel-header { margin: 0 -18px 12px; }
body:has(.app-shell):not(.report-print) .amazon-work > .panel-header > p { margin: 0; }

/* One inset per card: sheets that pad their own card bodies (insurance, linked files) do not also get the 18px margin. */
body:has(.app-shell):not(.report-print) .ins .panel > :is(p, form, ul, pre, details, .filters, .panel-body):not(.seg) { margin-left: 0; margin-right: 0; padding-left: 18px; padding-right: 18px; }
body:has(.app-shell):not(.report-print) .ins .panel > p.seg { margin: 12px 18px; padding: 0; }
body:has(.app-shell):not(.report-print) .boats .search-card { padding: 0 0 8px; }
body:has(.app-shell):not(.report-print) .boats .panel > form:not(.find), body:has(.app-shell):not(.report-print) .boats .panel > .panel-note { padding-left: 0; padding-right: 0; }
body:has(.app-shell):not(.report-print) .boats .search-card > .results > :is(p, details) { margin-left: 18px; margin-right: 18px; }
body:has(.app-shell):not(.report-print) .staff-page .panel > form.actions { padding-left: 0; padding-right: 0; }
body:has(.app-shell):not(.report-print) .linked-files > p.panel-note { margin-left: 18px; margin-right: 18px; padding-left: 0; padding-right: 0; }
/* Nested blocks inside a card are ruled sections, not cards on cards. */
body:has(.app-shell):not(.report-print) .panel :is(.panel, .summary-strip, .rentals-summary, .history-disclosure, .kpi-card) { box-shadow: none; }
body:has(.app-shell):not(.report-print) .panel > :is(.history-disclosure, .panel) { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
body:has(.app-shell):not(.report-print) .panel :is(.summary-strip, .rentals-summary.summary-strip), body:has(.app-shell):not(.report-print) .panel .kpi-card { border: 1px solid var(--line); border-radius: 8px; }
body:has(.app-shell):not(.report-print) .panel > .kpi-grid { margin: 14px 18px; }

/* 1099 Suggested column: room for the badge and the Accept form on one line now that its sort header is not padded twice. */
body:has(.app-shell):not(.report-print) .roll-table.month-table td.ap-suggest { width: 38ch; min-width: 38ch; max-width: 40ch; }
/* Sortable lists: dates and e-mails stay on one line in the audit log; boat owners keep their name and e-mail whole. */
@media (min-width: 761px) {
  body:has(.app-shell):not(.report-print) main:has(a[href^="/staff/audit.csv"]) .roll-table td:nth-child(-n+2) { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
  body:has(.app-shell):not(.report-print) .boats td :is(a, small) { overflow-wrap: normal; word-break: normal; }
}

/* Stat tiles: a 36px soft icon square top-right on every tile (amber when it warns, red when bad). */
body:has(.app-shell):not(.report-print) .kpi-card:not(.kpi-link) { padding-right: 66px; --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 21h18M6 17v-6M11 17V5M16 17v-9M21 17v-3'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) .kpi-card:not(.kpi-link)::before { content: ""; position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 8px; background: var(--dash-blue-soft); }
body:has(.app-shell):not(.report-print) .kpi-card:not(.kpi-link)::after { content: ""; position: absolute; top: 25px; right: 25px; width: 18px; height: 18px; background: var(--accent); -webkit-mask: var(--tile-icon) center / contain no-repeat; mask: var(--tile-icon) center / contain no-repeat; }
body:has(.app-shell):not(.report-print) .kpi-card.warn:not(.kpi-link)::before { background: var(--dash-amber-soft); }
body:has(.app-shell):not(.report-print) .kpi-card.warn:not(.kpi-link)::after { background: #b45f00; }
body:has(.app-shell):not(.report-print) .kpi-card.bad:not(.kpi-link)::before { background: var(--dash-red-soft); }
body:has(.app-shell):not(.report-print) .kpi-card.bad:not(.kpi-link)::after { background: var(--dash-red); }
body:has(.app-shell):not(.report-print) a.kpi-card[href*="/staff/gate"]:not(.kpi-link) { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='12' r='3.5'/%3E%3Cpath d='M11 12h10M17 12v3M20 12v2'/%3E%3C/svg%3E"); }
body:has(.app-shell):not(.report-print) a.kpi-card[href*="/staff/insurance"]:not(.kpi-link) { --tile-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7.5 3v5.5c0 4.4-3.1 8-7.5 9.5-4.4-1.5-7.5-5.1-7.5-9.5V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
/* Grids: tiles stretch to fill the row; six tiles sit 3 + 3, never 5 + 1. */
body:has(.app-shell):not(.report-print) .kpi-grid:not(:has(> a.kpi-link)):has(> :nth-child(2)) { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (min-width: 761px) { body:has(.app-shell):not(.report-print) .kpi-grid:not(:has(> a.kpi-link)):has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Summary strips become a row of stat tiles (sentence-case 13px labels); the vendor strip and the AP dashboard strip keep their pinned shape. */
body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 0 0 16px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) > :is(div, a) { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 14px 18px; background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip) .micro-label { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) strong { font-size: 22px; line-height: 1.15; }
body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip) small { font-size: 12px; color: var(--muted); }
body:has(.app-shell):not(.report-print) .panel .summary-strip { margin: 12px 18px; }
body:has(.app-shell):not(.report-print) section.rentals-summary:not(.summary-strip):not(.panel *):not(.summary-block *) { padding: 14px 18px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
/* Report index and lease-expiry tiles: equal heights, label first. */
body:has(.app-shell):not(.report-print) :is(.acct-cards, .group-grid) > li { display: flex; }
body:has(.app-shell):not(.report-print) :is(.acct-cards, .group-grid) > li > a { flex: 1; box-sizing: border-box; }
body:has(.app-shell):not(.report-print) .group-grid a > strong { order: 2; }
body:has(.app-shell):not(.report-print) .group-grid a > small { order: 3; }

/* Keyboard focus: a solid 2px accent outline on every pill, tab, tile and button (the soft --focus ring is only 1.3:1). */
body:has(.app-shell):not(.report-print) :is(.button, a.button, button.button, .ins-tabs a, .ins .seg a, p.seg a, .segmented a, .acct-nav .chip, nav.facet-bar > a.chip, nav.chip-row > a.chip, nav.filters > a, .pager-number, .pager-sizes a, a.kpi-card, .acct-cards a, .group-grid a, .chip-filter, .sort-link, .sort-button):focus-visible, body:has(.app-shell) :is(.biz-pill, .top-btn):focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 2px; }

/* Phones and small tablets: 44px targets on every tab and chip. */
@media (max-width: 800px) {
  body:has(.app-shell):not(.report-print) :is(nav.facet-bar:not(.acct-nav), nav.chip-row) > a.chip, body:has(.app-shell):not(.report-print) nav.acct-nav:is([aria-label="Business"], [aria-label="Basis"], [aria-label="Lease status"]) .chip, body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a, body:has(.app-shell):not(.report-print) nav.filters:not(:has(input, select)) > a, body:has(.app-shell):not(.report-print) :is(.acct-nav .chip, nav.facet-bar > a.chip, nav.chip-row > a.chip, p.seg a, .segmented a, .ins-tabs a, .ins .seg a), body:has(.app-shell):not(.report-print) :is(p, div, nav):has(> a.button[aria-current]) > a.button { min-height: 44px; }
}
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .panel > :is(nav.acct-nav, nav.facet-bar, nav.chip-row, nav.filters, p.seg, .filter-row), body:has(.app-shell):not(.report-print) .staff-page .panel > nav.acct-nav, body:has(.app-shell):not(.report-print) .staff-page .panel > nav.filters, body:has(.app-shell):not(.report-print) .ins .panel > p.seg { margin: 12px 14px; }
  body:has(.app-shell):not(.report-print) .ins .panel > :is(p, form, ul, pre, details, .filters, .panel-body):not(.seg) { padding-left: 14px; padding-right: 14px; }
  /* Section sub-navs and tab rows scroll sideways in one line, like the dashboard's tab bars (gate tabs keep wrapping). */
  body:has(.app-shell):not(.report-print) nav.acct-nav, body:has(.app-shell):not(.report-print) .segmented:not(.gate-page *):not([aria-label="Gate access lists"]):not([aria-label="Match strength"]) { width: auto; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 3px 2px; }
  body:has(.app-shell):not(.report-print) nav.acct-nav .chip, body:has(.app-shell):not(.report-print) .segmented:not(.gate-page *):not([aria-label="Gate access lists"]):not([aria-label="Match strength"]) a { flex: 0 0 auto; min-width: 0; padding-inline: 14px; }
  /* Insurance filters: chips wrap inside the card; search, sort and export stack. */
  body:has(.app-shell):not(.report-print) .ins .seg a { white-space: normal; max-width: 100%; }
  body:has(.app-shell):not(.report-print) .ins form.filters { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  body:has(.app-shell):not(.report-print) .ins form.filters > :is(label, .filter-field, .button, a.button) { flex: 0 0 auto; width: 100%; max-width: none; text-align: left; }
  body:has(.app-shell):not(.report-print) .ins form.filters > :is(label, .filter-field) { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  body:has(.app-shell):not(.report-print) .kpi-grid:not(:has(> a.kpi-link)):has(> :nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:has(.app-shell):not(.report-print) td:has(> form.inline-form > button[value="approve"]) { grid-column: 1 / -1; flex: 1 1 100%; width: auto; max-width: none; }
  /* Fields: 12px inner padding and 44px at phone size; in-row inputs fill their cell. */
  body:has(.app-shell):not(.report-print) :is(label.field, .field, label) > :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select, textarea):not(.ap-page *):not(.vendor-split *) { padding: 8px 12px; }
  body:has(.app-shell):not(.report-print) td :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), select):not(.ap-page *) { width: 100%; min-height: 44px; }
  body:has(.app-shell):not(.report-print) td form.inline-form:has(> button[value="approve"]) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  body:has(.app-shell):not(.report-print) td form.inline-form:has(> button[value="approve"]) > input, body:has(.app-shell):not(.report-print) td form.inline-form:has(> button[value="approve"]) > label:not(.sr-only) { grid-column: 1 / -1; }
  body:has(.app-shell):not(.report-print) td form.inline-form:has(> button[value="approve"]) > .button { min-height: 54px; font-size: 15px; font-weight: 700; }
  /* Stat tiles and strips two across. */
  body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) > :is(div, a) { padding: 12px 14px; }
  body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) strong { font-size: 20px; }
  body:has(.app-shell):not(.report-print) .kpi-card:not(.kpi-link) { padding-right: 48px; }
  body:has(.app-shell):not(.report-print) .kpi-card:not(.kpi-link)::before { top: 12px; right: 12px; width: 28px; height: 28px; }
  body:has(.app-shell):not(.report-print) .kpi-card:not(.kpi-link)::after { top: 18px; right: 18px; width: 16px; height: 16px; }
  body:has(.app-shell):not(.report-print) .acct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px; }
  body:has(.app-shell):not(.report-print) :is(.acct-cards, .group-grid) a { align-items: flex-start; text-align: left; }
  body:has(.app-shell):not(.report-print) .dash-panel .panel-header { align-items: flex-start; }
  body:has(.app-shell):not(.report-print) .page-heading .page-actions { justify-content: flex-start; }
  body:has(.app-shell):not(.report-print) .amazon-work { padding: 0 14px 14px; }
  body:has(.app-shell):not(.report-print) .amazon-work > .panel-header { margin: 0 -14px 12px; }
  /* Top bar: business pills stay one line; the dock picker gets its own full-width row. */
  body:has(.app-shell) .biz-pills { gap: 4px; }
  body:has(.app-shell) .biz-pill { padding: 0 10px; }
  body:has(.app-shell) .biz-slot { flex-wrap: wrap; }
  body:has(.app-shell) .biz-slot .dock-scope { flex: 1 1 100%; min-width: 0; }
  body:has(.app-shell) .biz-slot .dock-scope .filter-field { display: flex; width: 100%; min-width: 0; }
  body:has(.app-shell) .biz-slot .dock-scope select { flex: 1; width: 100%; min-width: 0; max-width: none; min-height: 44px !important; }
}

@media (max-width: 359px) { body:has(.app-shell):not(.report-print) .kpi-grid:not(:has(> a.kpi-link)):has(> :nth-child(2)) { grid-template-columns: 1fr; } }

/* Round 2 (Nov 5, 2026): report sheets on screen, sentence-case labels, the remaining small gaps and the navy phone bar. Same scope. */
/* Printable report sheets, on screen only (print keeps its own sheet): title, muted eyebrow and subtitle, the sheet as a card, .bgh toolbar, .dt table. */
@media screen {
  body:has(.app-shell).report-print .workspace > main#main { max-width: none; padding: 16px 32px 32px; padding-top: 16px !important; }
  body:has(.app-shell).report-print .crumbs.staff-back { margin: 0 0 8px; }
  body:has(.app-shell).report-print .crumbs.staff-back a { color: var(--muted); font-size: 13px; text-decoration: none; }
  body:has(.app-shell).report-print .crumbs.staff-back a:hover { color: var(--dash-blue-text); text-decoration: underline; }
  body:has(.app-shell).report-print .report-sheet { max-width: none; margin: 0; padding: 0; background: var(--surface); border: 0; border-radius: 12px; box-shadow: var(--shadow); }
  body:has(.app-shell).report-print .report-actions { gap: 8px; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); }
  body:has(.app-shell).report-print .report-actions .button { min-height: 36px; padding: 0 14px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 500; text-decoration: none; box-shadow: none; }
  body:has(.app-shell).report-print .report-actions .button:hover { background: var(--canvas); border-color: var(--field-border-hover); color: var(--ink); }
  body:has(.app-shell).report-print .report-actions .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  body:has(.app-shell).report-print .report-actions .small-muted { font-size: 12px; color: var(--muted); }
  body:has(.app-shell).report-print .report-head { padding: 16px 18px 14px; }
  body:has(.app-shell).report-print .report-head .eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
  body:has(.app-shell).report-print .report-head h1 { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: 0; color: var(--ink); }
  body:has(.app-shell).report-print .report-head p:not(.eyebrow):not(.small-muted) { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
  body:has(.app-shell).report-print .report-head p.small-muted { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
  body:has(.app-shell).report-print .report-table th { background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .3px; text-transform: none; }
  body:has(.app-shell).report-print .report-table td { font-size: 13px; }
  body:has(.app-shell).report-print .report-foot { margin: 0; padding: 14px 18px 16px; font-size: 12px; color: var(--muted); }
  body:has(.app-shell).report-print .report-foot p { margin: 0 0 4px; }
  body:has(.app-shell).report-print .report-foot p:last-child { margin-bottom: 0; }
}
@media screen and (min-width: 761px) {
  body:has(.app-shell).report-print .report-table thead th { padding: 10px 14px; border-bottom: 2px solid var(--line); white-space: nowrap; }
  body:has(.app-shell).report-print .report-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
  body:has(.app-shell).report-print .report-table thead th:has(> .sort-button, > .sort-link) { padding: 0; }
  body:has(.app-shell).report-print .report-table thead :is(.sort-button, .sort-link) { min-height: 36px; padding: 10px 14px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
  body:has(.app-shell).report-print .report-table thead :is(.sort-button, .sort-link):hover { color: var(--ink); background: transparent; }
  body:has(.app-shell).report-print .report-table tbody tr:nth-child(even) { background: var(--dash-zebra); }
  body:has(.app-shell).report-print .report-table tbody tr:hover, body:has(.app-shell).report-print .report-table tbody tr:hover > td { background: var(--canvas); }
  body:has(.app-shell).report-print .report-table tfoot th { padding: 10px 14px; border-top: 2px solid var(--line); border-bottom: 1px solid var(--line); background: var(--canvas); color: var(--ink); font-size: 13px; font-weight: 700; letter-spacing: 0; }
}
@media screen and (max-width: 760px) {
  body:has(.app-shell).report-print .workspace > main#main { padding: 16px 16px 24px; padding-top: 16px !important; }
  body:has(.app-shell).report-print .report-actions { padding: 10px 14px; }
  body:has(.app-shell).report-print .report-actions .button { min-height: 44px; }
  body:has(.app-shell).report-print .report-head { padding: 14px 14px 12px; }
  body:has(.app-shell).report-print .report-head h1 { font-size: 18px; }
  body:has(.app-shell).report-print .report-head p:not(.eyebrow):not(.small-muted) { font-size: 13px; }
  body:has(.app-shell).report-print .report-sheet .table-scroll { padding: 0 14px; }
  body:has(.app-shell).report-print .report-foot { padding: 12px 14px 14px; }
}

/* Sentence case like the dashboard. Labels typed in capitals in the "/" app (rent roll, property, occupancy, reminder preview) read as
   sentence case; none holds an acronym or a proper name (the lease summary's "as of" date label is left out on purpose). */
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .rentals-summary:not([aria-label="Lease summary"]) .micro-label { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: lowercase; color: var(--muted); }
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .rentals-summary:not([aria-label="Lease summary"]) .micro-label::first-letter { text-transform: uppercase; }
/* Key/value and tile labels drawn in capitals by CSS: sentence case, muted, 12-13px. Tiny section captions (the sidebar headings,
   the gate review's day and tier captions, the search groups, statement section rows) keep the dashboard's small capitals. */
body:has(.app-shell):not(.report-print) :is(.facts dt, .gate-fact dt, .gate-phone-sides dt) { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
body:has(.app-shell):not(.report-print) :is(.money-card h2, .mgmt-page .summary-strip .micro-label, .set-group h3) { font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); }
body:has(.app-shell):not(.report-print) .set-group h3 { font-weight: 600; }
body:has(.app-shell):not(.report-print) :is(.feed-card-kicker, .page-heading .eyebrow, .eyebrow) { letter-spacing: 0; text-transform: none; }

/* Close checklist: the lead line is the subtitle (hoistPageTitle); the add-item form uses the standard 40px fields, no dashed box. */
body:has(.app-shell):not(.report-print) .close-tpl-form { gap: 12px 16px; align-items: flex-end; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 13px; }
body:has(.app-shell):not(.report-print) .close-tpl-form.close-tpl-add { margin: 14px 18px 16px; padding: 0; border: 0; }
body:has(.app-shell):not(.report-print) .close-tpl-form label { gap: 5px; }
body:has(.app-shell):not(.report-print) .close-tpl-form label.narrow { width: 150px; }
body:has(.app-shell):not(.report-print) .close-tpl-form label span { font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .close-tpl-form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select) { box-sizing: border-box; min-height: 36px; padding: 6px 12px; font-size: 13px; }
body:has(.app-shell):not(.report-print) .close-tpl-add :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select) { min-height: 40px; font-size: 14px; }
body:has(.app-shell):not(.report-print) .close-tpl-add .button { min-height: 40px; padding: 0 16px; }
body:has(.app-shell):not(.report-print) .close-tpl { margin: 12px 18px; gap: 8px; }
/* Month-end close: the dashboard's soft status pills and tones instead of its own grey/amber/red/green. */
body:has(.app-shell):not(.report-print) .close-page { --c-grey: #98a2b8; --c-amber: #d97400; --c-red: var(--dash-red); --c-green: #00893e; }
body:has(.app-shell):not(.report-print) .close-tag { padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.5; background: var(--dash-grey-soft); color: var(--dash-grey-text); }
body:has(.app-shell):not(.report-print) .close-tag.amber { background: var(--dash-amber-soft); color: var(--dash-amber-text); }
body:has(.app-shell):not(.report-print) .close-tag.red { background: var(--dash-red-soft); color: var(--dash-red); }
body:has(.app-shell):not(.report-print) .close-tag.green { background: var(--dash-green-soft); color: var(--dash-green-text); }
body:has(.app-shell):not(.report-print) .close-progress { margin: 12px 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
body:has(.app-shell):not(.report-print) .close-bar, body:has(.app-shell):not(.report-print) .close-bar::-webkit-progress-bar { height: 8px; border-radius: 4px; background: var(--line); }
body:has(.app-shell):not(.report-print) .close-bar::-webkit-progress-value { border-radius: 4px; }
body:has(.app-shell):not(.report-print) .close-items { gap: 8px; }
body:has(.app-shell):not(.report-print) .close-item { padding: 10px 14px; border-top-color: var(--line); border-right-color: var(--line); border-bottom-color: var(--line); border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .close-item.red { background: #fff8f7; }
body:has(.app-shell):not(.report-print) .close-item-head h3 { font-size: 14px; }
body:has(.app-shell):not(.report-print) :is(.close-due, .close-assignee, .close-order) { font-size: 12px; }
body:has(.app-shell):not(.report-print) .close-due.late, body:has(.app-shell):not(.report-print) .close-result.red, body:has(.app-shell):not(.report-print) .close-lines li.bad, body:has(.app-shell):not(.report-print) .close-lines li.bad a { color: var(--dash-red); }
body:has(.app-shell):not(.report-print) .close-result.amber, body:has(.app-shell):not(.report-print) .close-lines li.warn { color: var(--dash-amber-text); }
body:has(.app-shell):not(.report-print) .close-result.green, body:has(.app-shell):not(.report-print) .close-who { color: var(--dash-green-text); }
body:has(.app-shell):not(.report-print) .close-item-body { font-size: 13px; }
body:has(.app-shell):not(.report-print) .close-note { padding: 4px 8px; border-radius: 8px; background: var(--canvas); font-size: 12px; }
body:has(.app-shell):not(.report-print) .close-months li { font-size: 13px; border-bottom-color: var(--line); }
body:has(.app-shell):not(.report-print) .close-form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), textarea) { min-height: 30px; padding: 4px 10px; font-size: 13px; }

/* Dashboard calendar ("/"): card header strip with ghost pager, pill day counts, blue day accents, ghost "Show more". */
body:has(.app-shell):not(.report-print) .calendar-panel { padding-bottom: 16px; }
body:has(.app-shell):not(.report-print) .calendar-panel :is(.panel-note, .cal-filters, .cal-layout), body:has(.app-shell):not(.report-print) :is(.cal-gaps, .cal-late) { margin-left: 18px; margin-right: 18px; }
body:has(.app-shell):not(.report-print) .calendar-panel > .cal-filters { margin-top: 14px; }
body:has(.app-shell):not(.report-print) .cal-review { margin: 14px 18px 0; }
body:has(.app-shell):not(.report-print) .cal-pager { gap: 8px; }
body:has(.app-shell):not(.report-print) .cal-pager .small-muted { font-size: 13px; color: var(--muted); }
body:has(.app-shell):not(.report-print) .cal-filters > summary { gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .cal-chips { gap: 6px 8px; font-size: 13px; }
body:has(.app-shell):not(.report-print) .cal-chip { gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--field-border); border-radius: 99px; background: var(--surface); color: var(--muted); font-weight: 500; }
body:has(.app-shell):not(.report-print) .cal-chip:has(input:checked) { border-color: var(--accent); background: var(--dash-blue-soft); color: var(--dash-blue-text); font-weight: 600; }
body:has(.app-shell):not(.report-print) .cal-chip input { accent-color: var(--accent); }
body:has(.app-shell):not(.report-print) .cal-layout { gap: 24px; }
body:has(.app-shell):not(.report-print) .cal-month { font-size: 12px; border-spacing: 2px; border-collapse: separate; }
body:has(.app-shell):not(.report-print) .cal-month caption { padding-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
body:has(.app-shell):not(.report-print) .cal-month th { padding: 0 0 4px; border: 0; background: none; font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
body:has(.app-shell):not(.report-print) .cal-month td { padding: 0; border: 0; }
body:has(.app-shell):not(.report-print) .cal-month td > :is(span, a) { min-height: 32px; padding-top: 5px; border-radius: 8px; }
body:has(.app-shell):not(.report-print) .calendar-panel .cal-month td > a { color: var(--dash-blue-text); }
body:has(.app-shell):not(.report-print) .cal-month td > a:hover { background: var(--dash-blue-soft); }
body:has(.app-shell):not(.report-print) .cal-month td.today > :is(span, a) { box-shadow: inset 0 0 0 1.5px var(--accent); }
body:has(.app-shell):not(.report-print) .calendar-panel .cal-month td.run > a { background: var(--dash-blue-soft); }
body:has(.app-shell):not(.report-print) .cal-dot.pay { background: var(--accent); }
body:has(.app-shell):not(.report-print) .cal-legend { gap: 6px; margin-top: 4px; }
body:has(.app-shell):not(.report-print) .cal-legend li { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; background: var(--dash-grey-soft); color: var(--dash-grey-text); font-size: 12px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .cal-day > summary { min-height: 40px; padding: 6px 4px; border-top-color: var(--line); border-radius: 0; }
body:has(.app-shell):not(.report-print) .cal-day > summary:hover, body:has(.app-shell):not(.report-print) :is(a.cal-row, .cal-run > summary):hover { background: var(--canvas); }
body:has(.app-shell):not(.report-print) .cal-day-date { font-size: 13px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .cal-count { gap: 5px; padding: 2px 9px; border: 0; border-radius: 99px; background: var(--dash-grey-soft); color: var(--dash-grey-text); font-size: 12px; font-weight: 600; line-height: 1.5; }
body:has(.app-shell):not(.report-print) :is(.cal-row, .cal-run > summary) { padding: 8px 4px; border-top-color: var(--line); }
body:has(.app-shell):not(.report-print) .cal-more > summary { gap: 6px; min-height: 36px; padding: 0 14px; border: 1.5px solid var(--field-border); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; }
body:has(.app-shell):not(.report-print) .cal-more > summary:hover { background: var(--canvas); color: var(--ink); }
body:has(.app-shell):not(.report-print) .cal-run-link, body:has(.app-shell):not(.report-print) .cal-toggle { color: var(--dash-blue-text); font-weight: 600; }
body:has(.app-shell):not(.report-print) .cal-review h3 { font-size: 13px; font-weight: 600; color: var(--ink); }
body:has(.app-shell):not(.report-print) .cal-late { border-radius: 8px; background: var(--dash-amber-soft); color: var(--dash-amber-text); }
@media (min-width: 801px) { body:has(.app-shell):not(.report-print) .cal-nav { min-width: 36px; min-height: 36px; padding: 0; font-size: 16px; } }

/* Gate access: phone list rows are cards; stat tile labels stay left; the list tabs wrap from the left. */
@container gate-table (max-width: 760px) {
  body:has(.app-shell):not(.report-print) main.gate-page .gate-list .roll-table tbody tr { margin: 0 14px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
  body:has(.app-shell):not(.report-print) main.gate-page .gate-list .roll-table tbody tr:first-child { margin-top: 4px; border-top: 1px solid var(--line); }
}
body:has(.app-shell):not(.report-print) .kpi-card, body:has(.app-shell):not(.report-print) .kpi-card .micro-label { text-align: left; }
@media (max-width: 760px) { body:has(.app-shell):not(.report-print) .segmented:is(.gate-page *, [aria-label="Gate access lists"]) { justify-content: flex-start; } }

/* The one-line empty list (MAC, accounting registers): the centred dashboard empty state with its blue info mark; the count sits under it. */
body:has(.app-shell):not(.report-print) .panel:not(:has(> h3)) > p.empty-state.panel-note:has(+ p.small-muted.panel-note) { display: flex; flex-direction: column; align-items: center; box-sizing: border-box; width: auto; max-width: none; align-self: stretch; margin-top: 8px; margin-bottom: 0; padding: 24px 16px 4px; text-align: center; font-size: 14px; color: var(--muted); }
body:has(.app-shell):not(.report-print) .panel:not(:has(> h3)) > p.empty-state.panel-note:has(+ p.small-muted.panel-note)::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 0 8px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.5'/%3E%3C/svg%3E") center / contain no-repeat; }
body:has(.app-shell):not(.report-print) .panel:not(:has(> h3)) > p.empty-state.panel-note + p.small-muted.panel-note { box-sizing: border-box; width: auto; max-width: none; margin-top: 0; padding-bottom: 20px; text-align: center; font-size: 12px; }
/* A second section header inside a card (the register's "Upcoming") gets its rule above. */
body:has(.app-shell):not(.report-print) .panel > section.panel-header:not(:first-child) { margin-top: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* "/" detail cards: a sub-section heading (slip "History") is a header strip, like the server pages' card sections. */
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .panel > h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; padding: 12px 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--ink); }
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .panel > h3 + .table-tools { margin: 10px 18px; }
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .panel > :is(.status-current, .small-muted) { margin-left: 18px; margin-right: 18px; }

/* Checkbox fields (price sheet "New dock"): the box sits inline beside its label, on the row's field line. */
body:has(.app-shell):not(.report-print) .filter-field:has(> input[type=checkbox]:only-of-type):not(.ins *) { flex-direction: row; align-items: center; align-self: flex-end; gap: 8px; min-height: 40px; width: auto; flex: 0 0 auto; }
body:has(.app-shell):not(.report-print) .filter-field:has(> input[type=checkbox]:only-of-type):not(.ins *) > input[type=checkbox] { order: -1; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
/* Insurance forms on phones: labels above their fields, left-aligned. */
body:has(.app-shell):not(.report-print) .ins .fields > label.filter-field { align-items: stretch; text-align: left; }
body:has(.app-shell):not(.report-print) .ins .fields > label.filter-field > span { display: block; }

/* Slip naming review: compact rows again, the size, note, Reviewed and Save controls on one line. */
body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; }
@media (min-width: 761px) {
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] :is(input[name=length], input[name=width]) { width: 58px; min-height: 32px; padding: 4px 8px; font-size: 13px; }
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] input[name=note] { width: 140px; min-height: 32px; padding: 4px 10px; font-size: 13px; }
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] .button { min-height: 32px; padding: 0 12px; }
}
body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] > label:not(.sr-only) { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; color: var(--muted); }
body:has(.app-shell):not(.report-print) td ul.plain { margin: 0; padding-left: 0; list-style: none; }

/* Amazon orders: the header strip now leads the card, so the work area keeps only its body inset. */
body:has(.app-shell):not(.report-print) .amazon-work { padding-top: 14px; }

/* Lease template editor: the title on the canvas, the tools and each page in dashboard cards. */
body:has(.app-shell):not(.report-print) .lease-editor-heading { margin-bottom: 16px; }
body:has(.app-shell):not(.report-print) .lease-editor { gap: 16px; }
body:has(.app-shell):not(.report-print) .lease-tools { padding-bottom: 14px; }
body:has(.app-shell):not(.report-print) .lease-tools > :is(.filter-field, .lease-field-list, p) { margin-left: 18px; margin-right: 18px; }
body:has(.app-shell):not(.report-print) .lease-tools > .filter-field { display: flex; flex-direction: column; gap: 5px; box-sizing: border-box; width: auto; max-width: none; margin-top: 14px; }
body:has(.app-shell):not(.report-print) .lease-field-list li { padding: 8px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
body:has(.app-shell):not(.report-print) .lease-field-list li.selected { margin: 0 -6px; padding: 8px 6px; background: var(--dash-blue-soft); }
body:has(.app-shell):not(.report-print) .lease-field-pick { color: var(--dash-blue-text); font-size: 13px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .lease-pages { gap: 16px; }
body:has(.app-shell):not(.report-print) .lease-page { padding: 0 18px 18px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); }
body:has(.app-shell):not(.report-print) .lease-page figcaption { margin: 0 -18px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); }
body:has(.app-shell):not(.report-print) .lease-canvas { border: 1px solid var(--line); border-radius: 4px; box-shadow: none; }
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .lease-page { padding: 0 12px 12px; }
  body:has(.app-shell):not(.report-print) .lease-page figcaption { margin: 0 -12px 12px; padding: 12px 14px; }
  body:has(.app-shell):not(.report-print) .lease-tools > :is(.filter-field, .lease-field-list, p) { margin-left: 14px; margin-right: 14px; }
}

/* Round 2 review (Nov 5, 2026): spacing, overflow and focus fixes from the round-2 review. Same scope. */
/* Month-end close: the checklist column sits on the card's 18px inset (the Months strip stays flush right). */
body:has(.app-shell):not(.report-print) .close-layout { margin: 0 0 16px 18px; }
/* Close checklist: fields never overflow the card; "Add item" is the primary button; Remove is a small red outline button. */
body:has(.app-shell):not(.report-print) .close-tpl-form select { max-width: 100%; }
/* The :not()s lift this above the ghost rule for bare card buttons (.panel .button:not(.primary):not(.danger):not(.secondary)), which otherwise left white text on white. */
body:has(.app-shell):not(.report-print) .panel .close-tpl-form.close-tpl-add button.button:not(.secondary):not(.danger) { background: var(--primary); border-color: transparent; color: #fff; font-size: 13px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .panel .close-tpl-form.close-tpl-add button.button:not(.secondary):not(.danger):hover { background: var(--primary-hover); color: #fff; }
body:has(.app-shell):not(.report-print) button.link-button { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
body:has(.app-shell):not(.report-print) .close-tpl-actions button.link-button.danger { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1.5px solid var(--dash-red); border-radius: 8px; color: var(--dash-red); font-size: 12px; font-weight: 600; }
body:has(.app-shell):not(.report-print) .close-tpl-actions button.link-button.danger:hover { background: var(--dash-red-soft); }
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .close-layout { margin: 0 14px 16px; }
  body:has(.app-shell):not(.report-print) .close-tpl-form label, body:has(.app-shell):not(.report-print) .close-tpl-form label.narrow { flex: 1 1 100%; width: 100%; min-width: 0; max-width: 100%; }
  body:has(.app-shell):not(.report-print) .close-tpl-form select { width: 100%; }
}

/* Dashboard ("/"): the calendar card sits 16px under the card above it. Its chips are 44px targets on phones; the disabled pager
   arrow is a faded outline button; legend pills wrap whole. */
body:has(.app-shell):not(.report-print) #main > :not(.page-heading) + div:has(> section.calendar-panel) { margin-top: 16px; }
body:has(.app-shell):not(.report-print) .cal-nav { border-color: var(--field-border); }
body:has(.app-shell):not(.report-print) .cal-nav:disabled { background: var(--surface) !important; border-color: var(--field-border) !important; color: var(--muted) !important; opacity: .4; }
body:has(.app-shell):not(.report-print) .cal-legend { flex-wrap: wrap; gap: 4px; }
body:has(.app-shell):not(.report-print) .cal-legend li { padding: 2px 8px; white-space: nowrap; }
@media (max-width: 800px) { body:has(.app-shell):not(.report-print) .cal-chip { min-height: 44px; } }

/* "/" summary strips (rent roll): equal tiles that fill the row with their tops aligned; a text value is 16px/600, not the 22px number. */
body:has(.app-shell):not(.report-print) .summary-block .rentals-summary.summary-strip { align-items: stretch; }
body:has(.app-shell):not(.report-print) .summary-block .rentals-summary.summary-strip > div { max-width: none; }
body:has(.app-shell):not(.report-print) .rentals-summary strong.summary-label, body:has(.app-shell):not(.report-print) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) strong.summary-label { font-size: 16px; font-weight: 600; line-height: 1.35; }

/* "/" detail headers: the actions sit at the right, beside the (i) button. */
body:has(.app-shell):not(.report-print) #main:not(.staff-page) .page-heading > div:first-child + div:not(:last-child) { margin-left: auto; }

/* Slip naming review: the size, note, Reviewed and Save controls stay on one line; on phones the Review cell spans the card. */
@media (min-width: 761px) {
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] { flex-wrap: nowrap; }
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] input[name=note] { width: 110px; }
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] > label:not(.sr-only) { white-space: nowrap; }
}
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) td:has(> form.filters[action$="/review/save"]) { grid-column: 1 / -1; }
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] :is(input[name=length], input[name=width]) { flex: 0 0 76px; width: 76px; }
  body:has(.app-shell):not(.report-print) td form.filters[action$="/review/save"] input[name=note] { flex: 1 1 100%; width: 100%; }
}
/* A cell's secondary line (".sub") sits under the main value as a 12px muted line, like the dashboard's .boatline. */
body:has(.app-shell):not(.report-print) .roll-table td .sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

/* Amazon orders: the work area's layout (its inline style is blocked by the page's CSP), on the card's single inset. */
body:has(.app-shell):not(.report-print) .amazon-work { min-width: 0; overflow-wrap: anywhere; }
body:has(.app-shell):not(.report-print) .amazon-work .filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 12px 0; }
body:has(.app-shell):not(.report-print) .amazon-work .filter-bar > * { min-width: 0; max-width: 100%; }
body:has(.app-shell):not(.report-print) .amazon-work label { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 100%; font-size: 13px; font-weight: 500; color: var(--muted); }
body:has(.app-shell):not(.report-print) .amazon-work .filter-bar label { flex: 1 1 14rem; }
body:has(.app-shell):not(.report-print) .amazon-work fieldset { min-width: 0; max-width: 100%; margin: 12px 0; }
body:has(.app-shell):not(.report-print) .amazon-work fieldset label { flex-direction: row; align-items: center; min-height: 36px; color: var(--ink); }
body:has(.app-shell):not(.report-print) .amazon-work details { margin: 12px 0; }
body:has(.app-shell):not(.report-print) .amazon-work details > summary { color: var(--dash-blue-text); font-size: 13px; font-weight: 600; cursor: pointer; }
body:has(.app-shell):not(.report-print) .amazon-work form.filters { padding-left: 0; padding-right: 0; }
@media (max-width: 800px) { body:has(.app-shell):not(.report-print) .amazon-work fieldset label { min-height: 44px; } }

/* Slip page: "Hide this unit" on the card inset, apart from the buttons above; the size override fields are 36px inline fields. */
body:has(.app-shell):not(.report-print) .staff-page .panel > .slip-hide { margin: 12px 18px 0; }
body:has(.app-shell):not(.report-print) .slip-form.inline input:not([type=hidden]):not([type=checkbox]):not([type=radio]) { box-sizing: border-box; width: 64px; min-height: 36px; padding: 6px 10px; }
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .staff-page .panel > .slip-hide { margin: 12px 14px 0; }
  body:has(.app-shell):not(.report-print) .slip-form.inline input:not([type=hidden]):not([type=checkbox]):not([type=radio]) { min-height: 44px; }
}

/* Gate access: the dock-access button stands apart from the status card; the preview card's body starts 14px under its rule. */
body:has(.app-shell):not(.report-print) main.gate-page > p:has(> a[href="/staff/gate/dock-access"]) { margin: 0 0 16px; }
body:has(.app-shell):not(.report-print) .gate-preview > .panel-header + * { margin-top: 14px; }

/* Action buttons in a card line or a table cell keep the dashboard's 8px gap, across and when they wrap. */
body:has(.app-shell):not(.report-print) .panel > p.panel-note:has(> a.button + a.button) { display: flex; flex-wrap: wrap; gap: 8px; }
body:has(.app-shell):not(.report-print) .roll-table td > form.inline:has(+ a.button) { display: inline-block; margin: 0 8px 8px 0; vertical-align: middle; }

/* Selects show their whole choice: on phones the lease template picker, filter fields with a select and the insurance coverage cells are full width. */
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .lease-tools > .filter-field select { width: 100%; max-width: 100%; }
  body:has(.app-shell):not(.report-print) .staff-page form.filters > .filter-field:has(> select) { flex: 1 1 100%; width: 100%; max-width: 100%; }
  body:has(.app-shell):not(.report-print) .ins .roll-table td:has(> select[name^="cov_"]) { grid-column: 1 / -1; }
  body:has(.app-shell):not(.report-print) .ins .roll-table td > select[name^="cov_"] { width: 100%; max-width: 100%; }
  body:has(.app-shell):not(.report-print) .roll-table td:has(> form.inline-form > select[name="approver_account_id"]) { grid-column: 1 / -1; }
  body:has(.app-shell):not(.report-print) .roll-table td > form.inline-form:has(> select[name="approver_account_id"]) { display: flex; gap: 8px; align-items: center; }
  body:has(.app-shell):not(.report-print) .roll-table td > form.inline-form > select[name="approver_account_id"] { flex: 1 1 auto; width: auto; min-width: 0; }
  body:has(.app-shell):not(.report-print) .roll-table td > form.inline-form:has(> select[name="approver_account_id"]) > button { flex: none; white-space: nowrap; }
  /* Pill tabs and business chips wrap their own text instead of running past the card edge (the longest chart-of-accounts business name). */
  body:has(.app-shell):not(.report-print) .segmented a, body:has(.app-shell):not(.report-print) .acct-nav .chip, body:has(.app-shell):not(.report-print) .ins-tabs a, body:has(.app-shell):not(.report-print) .ins .seg a, body:has(.app-shell):not(.report-print) p.seg a,
  body:has(.app-shell):not(.report-print) :is(nav.facet-bar:not(.acct-nav), nav.chip-row) > a.chip, body:has(.app-shell):not(.report-print) nav.acct-nav:is([aria-label="Business"], [aria-label="Basis"], [aria-label="Lease status"]) .chip, body:has(.app-shell):not(.report-print) .segmented[aria-label="Business"] a { max-width: 100%; white-space: normal; }
}
@media (min-width: 761px) {
  body:has(.app-shell):not(.report-print) .ins .roll-table td > select[name^="cov_type_"] { min-width: 200px; }
  body:has(.app-shell):not(.report-print) .ins .roll-table td > select[name^="cov_basis_"] { min-width: 176px; }
  body:has(.app-shell):not(.report-print) .acct form.filters > .filter-field:has(> select[name="bank"]) { flex: 0 0 auto; min-width: 260px; }
  body:has(.app-shell):not(.report-print) .acct form.filters > .filter-field > select[name="bank"] { width: 100%; }
}

/* MAC and accounting sub-navs on phones wrap from the left, so the current page's tab is always in view. */
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) nav.acct-nav { flex-wrap: wrap; overflow-x: visible; }
}

/* Report sheets on screen: rows with links are as tight as other rows (the links keep their 24px targets). */
@media screen and (min-width: 761px) {
  body:has(.app-shell).report-print .report-table td:has(> a) { padding-block: 7px; }
}

/* The dock picker's Apply button shows itself when it has keyboard focus. */
body:has(.app-shell) .dock-scope button.sr-only:focus-visible { position: static; width: auto !important; height: auto !important; min-height: 36px !important; margin: 0; padding: 0 12px !important; overflow: visible; clip: auto; clip-path: none; white-space: nowrap; border: 1.5px solid var(--field-border) !important; border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; }

/* Phones: the dashboard's navy top bar (#0e1520) with white text and icons; light-tint business pills, the selected one solid white.
   Every control, its order, its name and its 44px target stay; the page below stays light; desktop and print are unchanged. */
@media screen and (max-width: 760px) {
  body:has(.app-shell) .topbar { background: var(--nav); border-bottom: 0; box-shadow: none; color: #fff; }
  body:has(.app-shell) .topbar :is(.mobile-menu, .search-toggle, .topbar-label) { color: #fff; background: transparent; }
  body:has(.app-shell) .topbar :is(.mobile-menu, .search-toggle):hover { background: rgba(255, 255, 255, .1); }
  body:has(.app-shell) .topbar .orbit-mark { border-color: #7cc4ff; }
  body:has(.app-shell) .topbar .orbit-mark::after { background: #7cc4ff; }
  body:has(.app-shell) .topbar :is(.top-btn, .sb-signout .button) { min-height: 44px; border: 1.5px solid rgba(255, 255, 255, .42); background: transparent; color: #fff; }
  body:has(.app-shell) .topbar a.top-btn { min-width: 44px; }
  body:has(.app-shell) .topbar :is(.top-btn, .sb-signout .button):hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .7); color: #fff; }
  body:has(.app-shell) .topbar .biz-pill { min-height: 44px; border: 1.5px solid rgba(255, 255, 255, .42); background: transparent; color: #fff; }
  body:has(.app-shell) .topbar .biz-pill:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .7); }
  body:has(.app-shell) .topbar .biz-pill.biz-marina { color: #8fdcf2; }
  body:has(.app-shell) .topbar .biz-pill.biz-park { color: #98e6b3; }
  body:has(.app-shell) .topbar .biz-pill.biz-mac { color: #ffbf9e; }
  body:has(.app-shell) .topbar .biz-pill.biz-unmapped { color: #ffd38f; }
  body:has(.app-shell) .topbar .biz-pill.selected { background: #fff; border-color: #fff; color: var(--nav); font-weight: 700; }
  body:has(.app-shell) .topbar .biz-pill.biz-marina.selected { color: #0e5f78; }
  body:has(.app-shell) .topbar .biz-pill.biz-park.selected { color: #166534; }
  body:has(.app-shell) .topbar .biz-pill.biz-mac.selected { color: #7c2d12; }
  body:has(.app-shell) .topbar .biz-pill.biz-unmapped.selected { color: #8a4b00; }
  body:has(.app-shell) .topbar :is(a, button, label, .biz-pill, .top-btn, .button):focus-visible { outline: 2px solid #fff !important; outline-offset: 2px; }
  body:has(.app-shell) .topbar .topbar-search .search-field { border-color: #fff; }
  body:has(.app-shell) .topbar .dock-scope :is(span, label) { color: #fff; }
  /* Focus on navy is always the 2px white outline, the dock picker and Sign out included (this outranks the accent focus rings). */
  body:has(.app-shell) .topbar.topbar :is(a, button, button.button, label, .biz-pill, .top-btn, .button, select):focus-visible, body:has(.app-shell):not(.report-print) .topbar.topbar :is(a, button, button.button, label, .biz-pill, .top-btn, .button, select):focus-visible { outline: 2px solid #fff !important; outline-offset: 2px; }
  body:has(.app-shell) .topbar .dock-scope button.sr-only:focus-visible { min-height: 44px !important; border-color: rgba(255, 255, 255, .42) !important; background: transparent; color: #fff; }
  body:has(.app-shell) .topbar :is(.assistant-open, .search-toggle) { min-width: 44px; }
}
@media screen and (max-width: 359px) {
  body:has(.app-shell) .topbar { column-gap: 8px; }
  body:has(.app-shell) .topbar .biz-pill { padding: 0 8px; font-size: 12px; }
}


/* ---- Customer page: denser top, larger info text, small empty sections (layout only) ----
   Contact + notes sit in a side column next to the account summary on a wide screen; two across on a tablet; stacked on a phone. */
body:has(.app-shell):not(.report-print) .customer-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; margin: 0 0 12px; }
body:has(.app-shell):not(.report-print) .customer-top-side, body:has(.app-shell):not(.report-print) .customer-top-main { display: grid; gap: 12px; min-width: 0; align-content: start; }
body:has(.app-shell):not(.report-print) .customer-top-side:empty, body:has(.app-shell):not(.report-print) .customer-top-main:empty { display: none; }
body:has(.app-shell):not(.report-print) .customer-top .panel { margin: 0; }
body:has(.app-shell):not(.report-print) .customer-top .account-summaries { display: grid; gap: 12px; }
@media (min-width: 720px) { body:has(.app-shell):not(.report-print) .customer-top-side { grid-template-columns: repeat(2, minmax(0, 1fr)); } body:has(.app-shell):not(.report-print) .customer-top-side > :only-child { grid-column: 1 / -1; } }
/* Side by side from a 1100px window up (about 920px of page beside the sidebar): the media rules carry the same prefix as the base rules, or they lose to them. */
@media (min-width: 1100px) { body:has(.app-shell):not(.report-print) .customer-top { grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); } body:has(.app-shell):not(.report-print) .customer-top-side { grid-template-columns: minmax(0, 1fr); } }
body:has(.app-shell):not(.report-print) .customer-top:has(> .customer-top-side:empty), body:has(.app-shell):not(.report-print) .customer-top:has(> .customer-top-main:empty) { grid-template-columns: minmax(0, 1fr); }
body:has(.app-shell):not(.report-print) .customer-top .panel-header, body:has(.app-shell):not(.report-print) .customer-top .panel-header.table-header { padding: 8px 14px 4px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-contact .contact-lines { padding: 8px 14px 6px; }
body:has(.app-shell):not(.report-print) .customer-top .contact-lines p { margin: 0 0 3px; font-size: 16px; line-height: 1.45; }
body:has(.app-shell):not(.report-print) .customer-top .customer-contact .nickname-form { margin: 0; padding: 6px 14px 10px; border-top: 1px solid var(--line); flex-wrap: nowrap; align-items: center; gap: 8px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-contact .nickname-form .filter-field { flex: 1 1 auto; flex-direction: row; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; }
body:has(.app-shell):not(.report-print) .customer-top .customer-contact .nickname-form input[type="text"] { flex: 1 1 auto; width: auto; min-width: 0; }
body:has(.app-shell):not(.report-print) .customer-top [data-customer-notes] > .notice { margin: 4px 14px 8px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-note-form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 2px 14px 8px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-note-form .filter-field { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 3px; font-size: 14.5px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-note-form textarea { min-height: 52px; font-size: 16px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-note-form .check { flex: 1 1 auto; font-size: 14.5px; line-height: 1.35; }
body:has(.app-shell):not(.report-print) .customer-top .customer-note-form .button { align-self: center; }
body:has(.app-shell):not(.report-print) .customer-top .customer-notes-list { padding: 0 14px 8px; font-size: 16px; }
body:has(.app-shell):not(.report-print) .customer-top .customer-notes-list .customer-note { padding: 6px 0; line-height: 1.4; }
body:has(.app-shell):not(.report-print) .customer-top .customer-note .small-muted { font-size: 14px; }
/* "No notes yet." and "Nothing open.": one quiet line, not a padded centred block. */
body:has(.app-shell):not(.report-print) .customer-top .empty-state { display: block; padding: 0 14px 10px; margin: 0; text-align: left; font-size: 14.5px; }
body:has(.app-shell):not(.report-print) .customer-top .account-empty { margin: 0; padding: 0 14px 8px; font-size: 14.5px; }
body:has(.app-shell):not(.report-print) .customer-top .account-summary .small-muted, body:has(.app-shell):not(.report-print) .customer-top .account-facts .small-muted { font-size: 14px; }
body:has(.app-shell):not(.report-print) .customer-top .account-money { grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); gap: 8px 16px; margin: 2px 14px 8px; }
body:has(.app-shell):not(.report-print) .customer-top .account-balance { padding: 8px 12px; }
body:has(.app-shell):not(.report-print) .customer-top .account-balance strong { font-size: 26px; }
body:has(.app-shell):not(.report-print) .customer-top .account-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 16px; }
body:has(.app-shell):not(.report-print) .customer-top .account-facts dt { font-size: 13px; }
body:has(.app-shell):not(.report-print) .customer-top .account-facts dd { margin-top: 1px; font-size: 16px; line-height: 1.4; }
body:has(.app-shell):not(.report-print) .customer-top .account-summary .overview-subhead { margin: 6px 0 0; padding: 6px 14px 2px; font-size: 16px; }
body:has(.app-shell):not(.report-print) .customer-top .account-summary .panel-fact { margin: 0; padding: 0 14px 2px; }
body:has(.app-shell):not(.report-print) .customer-top .account-summary .panel-header .panel-fact { padding: 0; }
body:has(.app-shell):not(.report-print) .customer-top .account-table td { padding: 6px 6px; font-size: 14.5px; }
body:has(.app-shell):not(.report-print) .customer-top .account-table td a, body:has(.app-shell):not(.report-print) .customer-top .account-table td .small-muted { font-size: inherit; }
body:has(.app-shell):not(.report-print) .customer-top .account-table th { padding: 6px 6px; }
body:has(.app-shell):not(.report-print) .customer-top .account-table td:nth-child(3) { min-width: 0; }
body:has(.app-shell):not(.report-print) .customer-top .account-upcoming { margin: 0 14px 8px; }
body:has(.app-shell):not(.report-print) .customer-top .account-upcoming li { padding: 6px 10px; font-size: 15.5px; }
body:has(.app-shell):not(.report-print) .customer-top .account-actions .button { min-height: 32px; padding-top: 3px; padding-bottom: 3px; }
/* The heading's action row and the "No longer a customer" line take less room. */
body:has(.app-shell):not(.report-print) .page-heading .customer-page-actions { gap: 6px 8px; }
body:has(.app-shell):not(.report-print) .page-heading:has(.customer-page-actions) + .former-status, body:has(.app-shell):not(.report-print) .page-heading + .former-status { margin: 0 0 8px; }
body:has(.app-shell):not(.report-print) .former-status .former-line { font-size: 14.5px; }
body:has(.app-shell):not(.report-print) .former-status .former-action { min-height: 28px; padding: 1px 10px; font-size: 14px; }
@media (min-width: 720px) {
  body:has(.app-shell):not(.report-print) .page-heading .customer-page-actions { flex: 1 1 560px; }
  body:has(.app-shell):not(.report-print) .page-heading .customer-page-actions .button { min-height: 32px; padding-top: 3px; padding-bottom: 3px; }
  body:has(.app-shell):not(.report-print) .former-status:not(.is-former) { margin: -4px 0 8px; }
  body:has(.app-shell):not(.report-print) .former-status:not(.is-former) .former-action { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--accent); font-size: 14px; text-decoration: underline; }
}
body:has(.app-shell):not(.report-print) .customer-top .account-summary > .panel-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
body:has(.app-shell):not(.report-print) .customer-top .account-summary > .panel-header > div:first-child { flex: 1 1 auto; }
body:has(.app-shell):not(.report-print) .customer-top .account-summary .account-actions { width: auto; }
@media (max-width: 719px) {
  body:has(.app-shell):not(.report-print) .customer-top .customer-note-form .button { min-height: 44px; }
  body:has(.app-shell):not(.report-print) .customer-top .customer-contact .nickname-form { flex-wrap: wrap; }
  body:has(.app-shell):not(.report-print) .customer-top .account-money { grid-template-columns: 1fr; }
  body:has(.app-shell):not(.report-print) .customer-top .account-table td { padding: 8px 12px; }
}

/* AP inbox "hide finished rows": the phone layout makes each row a grid, which would otherwise win over the hidden attribute. */
body:has(.app-shell):not(.report-print) .ap-table tr[hidden] { display: none !important; }

/* Customer page: cards and section headers sit closer together, and the info text is larger. */
body:has(.app-shell):not(.report-print) .customer-top .panel-header, body:has(.app-shell):not(.report-print) .customer-top .panel-header.table-header { padding: 6px 14px 2px; }
body:has(.app-shell):not(.report-print) .customer-top .panel-header h2, body:has(.app-shell):not(.report-print) .customer-top .panel-header h3 { margin: 0; font-size: 17px; line-height: 1.25; }
body:has(.app-shell):not(.report-print):has(.customer-top) .page-heading.compact { margin-bottom: 6px; }
body:has(.app-shell):not(.report-print):has(.customer-top) .business-section .panel-header, body:has(.app-shell):not(.report-print):has(.customer-top) .business-section .panel-header.table-header { padding: 8px 14px 4px; }
body:has(.app-shell):not(.report-print):has(.customer-top) .business-section { margin-bottom: 10px; }
body:has(.app-shell):not(.report-print):has(.customer-top) .business-section td, body:has(.app-shell):not(.report-print):has(.customer-top) .business-section th { padding-top: 6px; padding-bottom: 6px; }
body:has(.app-shell):not(.report-print):has(.customer-top) .business-section td { font-size: 15px; }
body:has(.app-shell):not(.report-print):has(.customer-top) .business-section { margin-top: 12px; }

/* AP inbox: the top of the page is tighter so the list starts higher; maintenance buttons sit in a collapsed Tools menu. */
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) > :is(div, a) { flex: 0 1 auto; flex-direction: row; flex-wrap: nowrap; align-items: baseline; gap: 0 6px; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) .micro-label { font-size: 13px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) strong { font-size: 17px; line-height: 1.2; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .summary-strip:not(.vendor-summary):not(.vendor-summary .summary-strip):not(.ap-dash .summary-strip):not(.panel .summary-strip) small { display: none; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .panel > .panel-header { padding-top: 6px; padding-bottom: 2px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .acct-nav { gap: 4px; margin-bottom: 6px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .acct-nav .chip { min-height: 30px; padding: 0 12px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .segmented { gap: 4px; margin-top: 2px; margin-bottom: 4px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .segmented a { min-height: 28px; padding: 2px 9px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .panel-note { margin-top: 2px; margin-bottom: 4px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin: 0 16px 6px; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk .filter-field { flex: 1 1 auto; min-width: 0; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk .filter-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk .filter-field input { width: 100%; }
/* Phone: one line cannot hold the tick, the count, the reason and the button; they wrap, with the reason on its own full-width line. */
@media (max-width: 760px) {
  body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk { flex-wrap: wrap; }
  body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk .check,
  body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk #ap-selected-count { flex: 0 0 auto; white-space: nowrap; }
  body:has(.app-shell):not(.report-print) .ap-page:has(.ap-list-tools) .ap-bulk .filter-field { flex: 1 1 100%; }
}
body:has(.app-shell) .ap-page .ap-list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
body:has(.app-shell) .ap-page .ap-tools[open] { flex: 1 0 100%; }
body:has(.app-shell) .ap-page .ap-tools > summary { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 10px; cursor: pointer; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 13px; }
body:has(.app-shell) .ap-page .ap-tools[open] > summary { background: var(--surface-muted); }
body:has(.app-shell) .ap-page .ap-tools-body { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 8px 0 4px; }
body:has(.app-shell) .ap-page .ap-tools-body form { margin: 0; }
body:has(.app-shell) .ap-page .ap-tools-body .panel-note { margin: 2px 0 0; padding: 0; max-width: 34ch; }

/* Pay run: rows with no address get plain links to the bill pages (void / card paid); the bill's own pages keep their checks. */
body:has(.app-shell) .pay-run-page .pay-noaddr-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 6px; }
body:has(.app-shell) .pay-run-page .pay-noaddr-actions .pay-row-link { min-height: 32px; padding: 4px 10px; font-size: 13px; text-decoration: none; }
body:has(.app-shell) .pay-run-page .pay-noaddr-actions small { max-width: 26ch; }
body:has(.app-shell) .pay-run-page td.pay-amount a, body:has(.app-shell) .pay-run-page td a[href^="/staff/txn/"] { font-variant-numeric: tabular-nums; }

/* AP review form: Business is the first field, full width, with its evidence line. */
body:has(.app-shell) form[action$="/inbox/approve"] > label.field:has(> select[name="entity"]) { grid-column: 1 / -1; }
body:has(.app-shell) .ap-biz-why { display: block; margin-top: 4px; }
body:has(.app-shell) .ap-biz-why .badge { margin-right: 6px; }
body:has(.app-shell) .ap-biz-note:empty { display: none; }
body:has(.app-shell) .ap-biz-note { display: block; margin-top: 4px; }

/* AP review: what a scanned check of ours says (payer, business, payee, number, date, amount, memo), each a suggestion with its confidence. */
body:has(.app-shell) .ap-check-read { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); }
body:has(.app-shell) .ap-check-read .form-subhead { margin: 0 0 2px; }
body:has(.app-shell) .ap-check-read .panel-note { margin: 0 0 6px; }
body:has(.app-shell) .ap-check-read [data-check-payer-flag] { margin: 6px 0; }
body:has(.app-shell) .ap-check-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
body:has(.app-shell) .ap-check-table th, body:has(.app-shell) .ap-check-table td { padding: 4px 8px 4px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
body:has(.app-shell) .ap-check-table th { width: 7.5em; font-weight: 600; color: var(--muted); }
body:has(.app-shell) .ap-check-table td { overflow-wrap: anywhere; }
body:has(.app-shell) .ap-check-table .badge { margin-left: 4px; }
body:has(.app-shell) .ap-check-table small { display: block; white-space: normal; }

/* AP inbox list: one heading line, the tab rows share a line, filters and tools share a line, so the list starts higher. */
body:has(.app-shell) .ap-page .ap-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
body:has(.app-shell) .ap-page.mgmt-page .page-heading.compact > .ap-list-head { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; }
body:has(.app-shell) .ap-page.mgmt-page .page-heading.compact > .ap-list-head > p { margin: 0; }
body:has(.app-shell) .ap-page.mgmt-page .page-heading.compact > .ap-list-head > h1 { flex: 0 0 auto; margin: 0; }
body:has(.app-shell) .ap-page .ap-tab-rows { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; }
body:has(.app-shell) .ap-page .ap-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 16px; }
body:has(.app-shell) .ap-page .ap-controls > form.filters { flex: 1 1 560px; margin: 0; align-items: center; }
body:has(.app-shell) .ap-page .ap-controls > form.filters .filter-field { flex-direction: row; align-items: center; gap: 6px; }
body:has(.app-shell) .ap-page .ap-controls > form.filters .filter-field > span { white-space: nowrap; }
body:has(.app-shell) .ap-page:has(.ap-controls) .ap-bulk { padding: 0; margin-top: 0; margin-bottom: 4px; }
body:has(.app-shell) .ap-page .ap-controls > .ap-list-tools { flex: 0 1 auto; margin: 0 16px 6px 0; }
body:has(.app-shell) .ap-page .ap-about > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
body:has(.app-shell) .ap-page .ap-about[open] { flex: 1 0 100%; }
body:has(.app-shell) .ap-page .ap-about p { margin: 4px 0 0; max-width: 90ch; }

}
/* End of the "Dashboard pages" layer: every rule above, back to its opening comment, is screen only, so printed staff pages keep their own look. */

/* Dark mode (portal only; staff pages and the shared sign-in stay light). Logos sit on a light badge so dark artwork never disappears.
   Text/background pairs are 4.5:1 or better: ink #e8eef4 / muted #a9b7c4 on surface #16212c; white on accent buttons. */
@media (prefers-color-scheme: dark) {
  body.portal-body { background: #0d151d; color: #e8eef4; }
  .portal-body .portal-page { --canvas: #0d151d; --surface: #16212c; --surface-muted: #1d2a37; --ink: #e8eef4; --muted: #a9b7c4; --line: #2c3b4a; --accent: #7fb2ff; --accent-hover: #a6c9ff; --accent-soft: #1b2b44; --positive: #6fd39a; --positive-soft: #12301f; --warning: #f3c56b; --warning-soft: #33270f; --danger: #ff9a95; --danger-soft: #3a1b1b; color: var(--ink); background: var(--canvas); }
  .portal-body .portal-theme-park { --portal-accent: #15803d; --portal-accent-strong: #16a34a; --portal-accent-soft: #10291a; }
  .portal-body .portal-theme-marina { --portal-accent: #0e7490; --portal-accent-strong: #1592b3; --portal-accent-soft: #0d2a33; }
  .portal-body .portal-theme-mac { --portal-accent: #0b5c97; --portal-accent-strong: #1873b8; --portal-accent-soft: #0e2335; }
  .portal-body .portal-theme-orbit { --portal-accent: #2563d4; --portal-accent-strong: #3b78e6; --portal-accent-soft: #14233d; }
  .portal-body .portal-page .portal-header { background: #111b25; border-bottom-color: var(--line); }
  .portal-body .portal-page .portal-brand .portal-logo { background: #fff; border-radius: 10px; padding: 4px; box-sizing: border-box; }
  .portal-body .portal-page .portal-brand-text strong, .portal-body .portal-page h1, .portal-body .portal-page h2, .portal-body .portal-page h3, .portal-body .portal-page strong { color: var(--ink); }
  .portal-body .portal-page .small-muted, .portal-body .portal-page .portal-brand-text small, .portal-body .portal-page .panel-note { color: var(--muted); }
  .portal-body .portal-page .panel, .portal-body .portal-page .pay-option, .portal-body .portal-page .empty-state { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: none; }
  .portal-body .portal-page .empty-state span { color: var(--muted); }
  .portal-body .portal-page .portal-balance { border-top-color: var(--portal-accent); }
  .portal-body .portal-page .portal-all-set { color: var(--positive); }
  .portal-body .portal-page .button.secondary { background: var(--surface-muted); border-color: #3a4b5c; color: var(--ink); }
  .portal-body .portal-page .button.secondary:hover { background: #24364a; }
  .portal-body .portal-page .portal-nav-links .button.secondary { background: transparent; border-color: transparent; color: var(--ink); }
  .portal-body .portal-page .portal-nav-links .button[aria-current="page"] { background: var(--portal-accent-soft); color: #86efac; }
  .portal-body .portal-theme-marina .portal-nav-links .button[aria-current="page"], .portal-body .portal-theme-mac .portal-nav-links .button[aria-current="page"], .portal-body .portal-theme-orbit .portal-nav-links .button[aria-current="page"] { color: #a6d8ff; }
  .portal-body .portal-page .button.primary { color: #fff; }
  .portal-body .portal-page .roll-table, .portal-body .portal-page .roll-table th, .portal-body .portal-page .roll-table td { background: transparent; color: var(--ink); border-color: var(--line); }
  .portal-body .portal-page .roll-table td::before, .portal-body .portal-page .roll-table th { color: var(--muted); }
  .portal-body .portal-page .count-badge { background: var(--surface-muted); color: var(--ink); }
  .portal-body .portal-page .portal-status-on { background: #12301f; color: #86efac; }
  .portal-body .portal-page .portal-status-off { background: #243241; color: #d3dde6; }
  .portal-body .portal-page .portal-status-warn { background: #33270f; color: #f3c56b; }
  .portal-body .portal-page .notice { background: var(--surface-muted); border-color: var(--line); color: var(--ink); }
  .portal-body .portal-page .notice.warning { background: var(--warning-soft); color: #f8dca0; }
  .portal-body .portal-page a:not(.button) { color: #8cc4ff; }
  .portal-body .portal-page .biz-pill { background: var(--surface-muted); color: var(--ink); border-color: var(--line); }
  .portal-body .portal-page .filter-field, .portal-body .portal-page .form-grid .filter-field { color: var(--ink); }
  .portal-body .portal-page input:not([type=checkbox]):not([type=radio]):not([type=file]), .portal-body .portal-page select, .portal-body .portal-page textarea { background: #0f1923; color: var(--ink); border-color: #4a5d70; }
  .portal-body .portal-page .portal-footer, .portal-body .portal-page .portal-footer span { color: var(--muted); }
  /* The receipt stays a white "paper" card: it is the document the customer keeps or prints. */
  .portal-body .portal-page .receipt-doc { background: #fff; color: #1b2a38; border-radius: 10px; margin: 12px; padding-bottom: 16px; }
  .portal-body .portal-page .receipt-doc * { color: #1b2a38; }
  .portal-body .portal-page .receipt-doc a { color: #1d4e84; }
  .portal-body .portal-page .receipt-doc td, .portal-body .portal-page .receipt-doc tr { border-color: #dce3e8; }
}

/* E-mail sign-in link confirm page, dark (see the light rules next to .quiet-card). */
/* Dark: the page and card darken; the logo band stays white so dark artwork never disappears. 4.5:1 or better: #e8eef4 / #a9b7c4 on #16212c. */
@media (prefers-color-scheme: dark) {
  body.landing.signin-confirm { background: #0d151d; }
  body.landing.signin-confirm.portal-theme-park { --signin-accent-strong: #16a34a; }
  body.landing.signin-confirm.portal-theme-marina { --signin-accent-strong: #1592b3; }
  body.landing.signin-confirm.portal-theme-mac { --signin-accent-strong: #1873b8; }
  body.landing.signin-confirm .signin-card { background: #16212c; color: #e8eef4; box-shadow: 0 18px 44px #00000080; }
  body.landing.signin-confirm .signin-logos { border-bottom-color: #2c3b4a; }
  body.landing.signin-confirm .signin-card h1 { color: #f3f7fb; }
  body.landing.signin-confirm .signin-card .quiet-lede { color: #c9d5e1; }
  body.landing.signin-confirm .signin-note { color: #a9b7c4; }
  body.landing.signin-confirm .quiet-foot { color: #a9b7c4; }
}

/* Shared staff contact history: compact, wrapping values in both color schemes. */
[data-contact-history] .history { margin: 0; padding: 8px 16px 12px 32px; font-size: 13px; }
[data-contact-history] .history li { padding: 4px 0; overflow-wrap: anywhere; }
/* Follow the staff page theme. */
[data-contact-history].panel { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-contact-history] .panel-header { border-color: var(--line); }
/* Keep every business logo on white in either color scheme. */
.portal-body .portal-page .portal-brand .portal-logo { background: #fff; border-radius: 10px; padding: 4px; box-sizing: border-box; }
body.landing.signin-confirm .quiet-form + .quiet-form { margin-top: 24px; }
body.landing.signin-confirm .quiet-form .filter-field { display: grid; gap: 6px; text-align: left; color: #243b58; }
body.landing.signin-confirm .quiet-form .filter-field input { color: #14212b; }
@media (prefers-color-scheme: dark) {
  body.landing.signin-confirm .quiet-form .filter-field { color: #e8eef4; }
  body.landing.signin-confirm .quiet-form .filter-field input { background: #0f1923; color: #e8eef4; border-color: #4a5d70; }
}
/* Customer Google sign-in (Google's standard light button): top of the sign-in, accept and forgot cards. */
.gsi-block { display: flex; justify-content: center; margin: 4px 0 0; }
a.gsi-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 400px; min-height: 52px; box-sizing: border-box; padding: 0 16px; background: #fff; color: #1f1f1f; border: 1px solid #747775; border-radius: 26px; font-family: Roboto, Arial, sans-serif; font-size: 16px; font-weight: 500; letter-spacing: .25px; text-decoration: none; box-shadow: 0 1px 2px #3c40434d; }
a.gsi-button:hover { background: #f8f9fa; color: #1f1f1f; text-decoration: none; box-shadow: 0 1px 3px #3c40434d, 0 4px 8px #3c404326; }
a.gsi-button:focus-visible { outline: 3px solid #245b99; outline-offset: 3px; }
.gsi-button .gsi-icon { display: flex; width: 20px; height: 20px; }
.gsi-button .gsi-icon svg { width: 20px; height: 20px; display: block; }
.or-sep { display: flex; align-items: center; gap: 12px; margin: 16px 0 14px; color: #5c7090; font-size: 13px; text-transform: lowercase; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: #dfe6ee; }
body.landing .customer-email-sep { display: none; }
body.landing .staff-entry { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed #dfe6ee; font-size: 13px; color: #4f6580; text-align: center; }
body.landing .staff-entry span { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 10px; background: #eef2f7; color: #243b58; font-weight: 600; font-size: 12px; }
/* AP invoice page: "Search Square items" card (same card, field and button look as the portal polish in #378). */
.inv-desc-text { display: block; white-space: normal; overflow-wrap: anywhere; }
textarea.inv-desc { display: block; width: 100%; min-width: 0; box-sizing: border-box; min-height: 2.75rem; resize: vertical; field-sizing: content; font: inherit; font-size: 15px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.inv-sq-inputs { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 6px; }
.inv-sq-inputs input { min-width: 0; }
.inv-cands { list-style: none; margin: 6px 0 0; padding: 0; border-top: 1px solid var(--line-subtle, #f0f0f2); }
.inv-cands li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line-subtle, #f0f0f2); font-size: 14px; }
.inv-cand-name { min-width: 0; overflow-wrap: anywhere; }
.inv-cands .button { min-height: 32px; padding: 4px 10px; white-space: nowrap; }
/* AP invoice page, Inventory and landed cost.
   Wide screens (1700px and up): one fixed-width table row per line, numbers right-aligned with padding either side, Square item
   (picture first, with room before it) and Match at the right. Narrower screens (a 1024 or 1280px window with the staff sidebar): each
   line is a card of three tidy rows: number, checkboxes and description; the money boxes, each with its caption; the Square item and Match. */
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table th, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td { vertical-align: top; padding: 10px 12px; box-sizing: border-box; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-no-col { width: 48px; text-align: center; padding-left: 8px; padding-right: 8px; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-chk-col { width: 70px; text-align: center; padding-left: 4px; padding-right: 4px; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-desc-col { width: 190px; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-qty-col { width: 72px; text-align: right; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-price-col { width: 96px; text-align: right; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-money-col { width: 92px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-sq-col { padding-left: 24px; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-match-col { width: 150px; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table thead th { font-size: 12px; white-space: normal; line-height: 1.25; vertical-align: bottom; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table thead .sort-button, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table thead .sort-link { white-space: normal; min-height: 0; padding: 4px 6px; line-height: 1.25; }
.inv-no { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9rem; height: 1.9rem; padding: 0 6px; box-sizing: border-box; border-radius: 999px; background: var(--line-subtle, #f0f0f2); font-variant-numeric: tabular-nums; font-size: 14px; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table input.inv-in { display: block; width: 100%; min-width: 0; box-sizing: border-box; padding: 6px 8px; text-align: right; font-variant-numeric: tabular-nums; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-price-col small { display: block; text-align: right; }
.inv-sq-wrap { display: flex; align-items: flex-start; gap: 12px; }
.inv-sq-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.inv-sq-inputs { display: grid; grid-template-columns: minmax(0, 1fr) 7.5rem; gap: 6px; }
.inv-sq-inputs input { min-width: 0; }
.inv-find-link { font-size: 14px; }
.inv-thumb-col { flex: 0 0 48px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.inv-thumb { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--line-subtle, #f0f0f2); }
.inv-thumb-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.inv-thumb-sm { flex-basis: 32px; width: 32px; height: 32px; border-radius: 6px; }
.inv-thumb-empty { background: transparent; border: 1px dashed var(--line-strong, #d4d4d8); box-sizing: border-box; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-thumb-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-thumb-tools a, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-thumb-tools button { display: inline; min-height: 0; padding: 1px 0; font: inherit; font-size: 11px; font-weight: 500; color: var(--accent, #2563eb); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.inv-thumb-note { display: block; max-width: 64px; font-size: 10px; line-height: 1.15; text-align: center; color: var(--muted, #62626b); }
.inv-thumbs-switch { margin: 0 6px 8px 2px; vertical-align: middle; }
.inv-thumbs-label { display: inline-block; margin: 0 0 8px; font-size: 14px; cursor: pointer; }
.inv-thumbs-switch:not(:checked) ~ .table-scroll .inv-thumb { display: none; }
.inv-think { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border: 1px solid var(--line, #e4e4e7); border-radius: 10px; background: var(--surface-subtle, #fafafa); }
.inv-think-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; font-size: 14px; }
.inv-think-lead { font-weight: 600; }
.inv-think-warn { color: var(--warning, #92400e); font-weight: 600; font-size: 13px; }
.inv-think-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.inv-think-actions .button { min-height: 32px; padding: 4px 10px; white-space: nowrap; }
.inv-match { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.inv-match-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inv-confirm { display: flex; align-items: center; gap: 6px; }
.inv-choose { margin-top: 4px; padding: 12px; border: 1px solid var(--accent, #2563eb); border-radius: 10px; background: var(--surface, #fff); display: flex; flex-direction: column; gap: 8px; }
.inv-choose-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.inv-choose-search { display: flex; gap: 6px; }
.inv-choose-search input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 36px; box-sizing: border-box; padding: 6px 10px; font: inherit; font-size: 15px; border: 1px solid var(--line-strong, #d4d4d8); border-radius: 8px; }
.inv-choose-search .button { min-height: 36px; }
.inv-choose-hint { margin: 0; line-height: 1.5; }
.inv-chip { display: inline-block; margin: 0 4px 2px 0; padding: 1px 9px; border: 1px solid var(--line-strong, #d4d4d8); border-radius: 999px; font-size: 13px; text-decoration: none; }
.inv-choose-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-subtle, #f0f0f2); }
.inv-choose-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-subtle, #f0f0f2); }
.inv-choose-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; font-size: 14px; }
.inv-choose-item .button { flex: 0 0 auto; min-height: 32px; padding: 4px 12px; }
.inv-choose-none { margin: 0; }
@media (max-width: 1699px) {
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table tbody { display: block; width: 100%; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table tbody tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; padding: 14px 12px; border-bottom: 1px solid var(--line, #e4e4e7); }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table th, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td { display: block; width: auto; padding: 0; border: 0; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-no-col { flex: 0 0 36px; text-align: left; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-chk-col { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding-top: 6px; text-align: left; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-desc-col { flex: 1 1 calc(100% - 280px); min-width: 14rem; width: auto; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-chk-col::before { content: attr(data-label); font-size: 12px; color: var(--muted, #62626b); order: 2; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-qty-col, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-price-col, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-money-col { flex: 0 0 auto; padding: 0 14px 0 0; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-money-col { line-height: 36px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-qty-col { width: 64px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-price-col { width: 92px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-money-col { width: 96px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-qty-col::before, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-price-col::before, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-money-col::before { content: attr(data-label); display: block; font-size: 11px; line-height: 1.2; color: var(--muted, #62626b); text-align: right; white-space: normal; min-height: 2.4em; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-qty-col { margin-left: 44px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-sq-col { flex: 1 1 100%; padding: 8px 0 0 44px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-match-col { flex: 1 1 100%; width: auto; padding-left: 44px; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-match-col::before, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-sq-col::before { content: none; }
  body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-match { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
}
@media (max-width: 720px) { body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table td.inv-qty-col { margin-left: 0; } body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-sq-col, body:not(.report-print):has(.ap-page) .ap-page .roll-table.ap-table.inv-table .inv-match-col { padding-left: 0; } .inv-sq-inputs { grid-template-columns: 1fr; } }
.sq-card { margin: 20px 0 8px; padding: 16px; background: var(--surface, #fff); border: 1px solid var(--line, #e4e4e7); border-radius: 14px; box-shadow: 0 1px 2px rgba(9, 9, 11, .04); }
.sq-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; }
.sq-card-head .form-subhead { margin: 0; font-size: 16px; }
.sq-form { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin: 0; }
.sq-form .filter-field { text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink, #09090b); }
.sq-form select, .sq-input input { width: 100%; min-height: 44px; box-sizing: border-box; padding: 10px 12px; font: inherit; font-size: 15px; font-weight: 400; color: var(--ink, #09090b); background: #fff; border: 1px solid var(--line-strong, #d4d4d8); border-radius: 10px; }
.sq-input { position: relative; display: block; }
.sq-input input { padding-left: 38px; }
.sq-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted, #62626b); pointer-events: none; }
.sq-form select:focus-visible, .sq-input input:focus-visible { outline: 3px solid var(--accent, #2563eb); outline-offset: 1px; border-color: var(--accent, #2563eb); }
.sq-go { min-height: 44px; border-radius: 10px; }
.sq-live .sq-go { display: none; }
.sq-live .sq-form { grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); }
.sq-results { margin-top: 12px; }
.sq-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line, #e4e4e7); border-radius: 12px; max-height: 420px; overflow-y: auto; }
.sq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line-subtle, #f0f0f2); cursor: default; }
.sq-row:first-child { border-top: 0; }
.sq-row[aria-selected="true"] { background: var(--accent-soft, #eff6ff); box-shadow: inset 3px 0 0 var(--accent, #2563eb); }
.sq-name { display: block; font-size: 15px; color: var(--ink, #09090b); overflow-wrap: anywhere; }
.sq-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: 13px; color: var(--muted, #62626b); }
.sq-chip { display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; background: var(--surface-muted, #f4f4f5); color: var(--ink-2, #3f3f46); font-weight: 600; }
.sq-price { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink, #09090b); white-space: nowrap; }
.sq-use { min-height: 36px; border-radius: 10px; white-space: nowrap; }
.sq-state { padding: 14px 12px; border: 1px dashed var(--line-strong, #d4d4d8); border-radius: 12px; color: var(--ink-2, #3f3f46); font-size: 14px; }
.sq-state-loading { color: var(--muted, #62626b); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 720px) { .sq-form, .sq-live .sq-form { grid-template-columns: 1fr; } .sq-row { grid-template-columns: minmax(0, 1fr) auto; } .sq-use { grid-column: 1 / -1; } }

/* Customer page: open invoices, Orbit-made leases, billing activity, communications, portal sign-ins (customer-overview.ts). */
.overview-block{margin:8px 0 12px}.overview-subhead{margin:0 0 4px;font-size:.9375rem;font-weight:600}
.overview-total{margin:0 0 6px}.overview-empty{margin:4px 0 8px}.overview-more{margin-top:6px}
.customer-overview tr[hidden],.overview-block tr[hidden],.customer-overview [hidden]{display:none!important}
.overview-resend{display:inline-flex;margin:0}.overview-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.overview-actions .button{padding:2px 10px;font-size:.8125rem}
.comm-preview{padding:8px 10px;border:1px solid var(--line,#d9dee5);border-radius:6px;background:var(--surface-muted,#f8fafc)}
.comm-preview-head{margin:0 0 6px}.comm-preview-text{margin:0 0 8px;max-height:320px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:.875rem;line-height:1.5}
.roll-table tr.comm-preview-row td::before{content:none;display:none}
@media (max-width:700px){.overview-actions .button{min-height:40px;padding:6px 12px}.comm-preview-text{max-height:260px}}

/* ---- Table layout: columns keep sensible widths (Chris, layout cleanup) --------------------------------------------------------
   On desktop a cell breaks only between words, so a wide memo next to it can no longer squeeze a payee or account name to one letter
   or word per line (overflow-wrap: anywhere let the browser shrink a column to a single character). Money, dates, types and check
   numbers stay on one line; names and memo text get a minimum width. A very long unbroken string scrolls with the table. Phones keep
   the stacked cards above, where every cell is full width. */
@media (min-width: 761px) {
  .roll-table td { overflow-wrap: break-word; }
  .roll-table td.num, .roll-table th.num, .roll-table td.nowrap, .roll-table th.nowrap { white-space: nowrap; }
  .roll-table .col-name { min-width: 11rem; }
  .roll-table .col-text { min-width: 16rem; max-width: 36rem; }
}

/* Long text clamped with Show more (clamp-text.mjs): the short part shows until the reader opens it, then the whole text. */
details.clamp-text { display: block; }
details.clamp-text > summary { display: inline; cursor: pointer; list-style: none; }
details.clamp-text > summary::-webkit-details-marker { display: none; }
details.clamp-text .clamp-toggle { color: var(--accent); font-weight: 600; white-space: nowrap; }
details.clamp-text > summary:hover .clamp-toggle, details.clamp-text > summary:focus-visible .clamp-toggle { text-decoration: underline; }
details.clamp-text[open] .clamp-short, details.clamp-text .clamp-when-open, details.clamp-text[open] .clamp-when-closed { display: none; }
details.clamp-text[open] .clamp-when-open { display: inline; }
details.clamp-text[open] > summary { float: right; margin-left: 8px; }

/* Quick date buttons (This month / Last month) and All | Money in | Money out beside From and To on the registers and the general ledger. Same
   secondary look as Outstanding checks / Record check; the option in effect is drawn selected. They wrap under the dates on a phone. Kept
   after the dark-mode block and unscoped (the dashboard layer above must stay screen-only and staff-scoped, and nothing after the dark block
   names the staff shell); [href] lifts the selected state above the layer's `.panel .button.secondary` rule. */
.quick-dates { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-dates .button { white-space: nowrap; }
.quick-dates a.button.secondary[aria-current="true"][href], .panel .quick-dates a.button.secondary[aria-current="true"][href] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); font-weight: 600; }

/* Account summary (customer landing ledger): one block per business under the customer's name. Same markup on the customer page and the
   MAC tenant page. Balance red when owed, green "Paid up", blue for a credit. Stacks on a phone. */
.account-summaries { display: grid; gap: 12px; margin: 0 0 12px; }
.account-summary .panel-header { gap: 8px; flex-wrap: wrap; }
.account-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.account-money { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 12px 20px; align-items: start; margin: 4px 0 12px; }
.account-balance { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-muted); }
.account-balance strong { font-size: 30px; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-balance.tone-owes { border-color: var(--danger); background: var(--danger-soft); }
.account-balance.tone-owes strong { color: var(--danger); }
.account-balance.tone-paid strong { color: var(--positive); }
.account-balance.tone-paid { background: var(--positive-soft); }
.account-balance.tone-credit strong { color: var(--accent); }
.account-balance.tone-credit { background: var(--accent-soft); }
.account-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 16px; margin: 0; }
.account-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.account-facts dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.account-facts .is-late dd strong, .account-table tr.is-late td:first-child { color: var(--danger); }
.account-upcoming { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.account-upcoming li { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.account-upcoming .button { margin-left: 6px; }
.account-empty { margin: 4px 0 10px; }
.account-filter { margin: 2px 0 6px; }
@media (max-width: 640px) {
  .account-money { grid-template-columns: 1fr; }
  .account-actions { width: 100%; }
  .account-actions .button { flex: 1 1 auto; text-align: center; }
}

/* New invoice: one column on a phone, a row of fields on a desktop, and the page itself does not scroll sideways. */
.staff-invoice { max-width: 100%; overflow-x: clip; }
.staff-invoice-line { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(4.5rem, .7fr) minmax(5.5rem, .9fr) minmax(0, 1.6fr) minmax(0, .8fr) auto; gap: 8px 10px; align-items: end; margin: 0 0 10px; }
.staff-invoice .picks { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-invoice .picks button, .staff-invoice .picks a { max-width: 100%; }
.staff-invoice-preview { width: 100%; max-width: 100%; min-height: 420px; border: 1px solid var(--line, #d5dde4); background: #fff; }
@media (max-width: 760px) {
  .staff-invoice-line { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .staff-invoice-line .desc, .staff-invoice-line .acct { grid-column: 1 / -1; }
}

/* Cash count sheets (/staff/cash-counts/sheets): list, sheet, and the staff form. Staff pages only. */
.cash-sheet-list caption.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.cash-sheet-list th.money, .cash-sheet-list td.money, .cash-view-table td.money { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cash-sheet-list td { vertical-align: middle; }
.cash-sheet-list tr.cash-month th { background: var(--surface-muted, #f4f6f8); color: var(--ink); font-size: 13px; font-weight: 600; text-align: left; padding: 8px 12px; border-top: 1px solid var(--line); }
.cash-month-net { margin-left: 12px; font-weight: 500; color: var(--muted); font-size: 12px; }
.cash-month-net small { color: var(--muted); }
.cash-sheet-list td.cash-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cash-dow { display: inline-block; min-width: 2.4em; color: var(--muted); }
.cash-muted { color: var(--muted); }
.cash-os { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cash-os.is-over { color: var(--positive, #15803d); }
.cash-os.is-short { color: var(--danger, #b91c1c); }
.cash-os.is-even { color: var(--ink); font-weight: 500; }
.cash-os.is-missing { color: var(--muted); font-weight: 400; }
.cash-sheet-store + .cash-sheet-store { margin-top: 20px; }
.cash-sheet-pager { margin: 12px 0; }
.cash-form-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; }
.cash-form-link { border: 1px solid var(--line); border-radius: var(--radius, 8px); padding: 12px 14px; background: var(--surface, #fff); }
.cash-form-link strong { display: block; font-size: 14px; }
.cash-form-link span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.cash-form-link p { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cash-sheet-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cash-kpis .kpi-card.good { border-top-color: var(--positive, #15803d); }
.cash-kpis .kpi-card.bad { border-top-color: var(--danger, #b91c1c); }
.cash-kpis .kpi-card strong { font-variant-numeric: tabular-nums; font-size: 24px; overflow-wrap: anywhere; }
.cash-kpis .kpi-card strong .cash-muted, .cash-kpis .kpi-card strong .cash-os.is-missing { font-size: 15px; font-weight: 500; }
.cash-view-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; margin: 16px 0; }
.cash-view-table caption { text-align: left; font-weight: 600; font-size: 13px; padding: 0 0 6px; color: var(--ink); }
.cash-view-table th { font-weight: 400; text-align: left; }
.cash-view-table tr.total th, .cash-view-table tr.total td { font-weight: 600; }
.cash-view-table tr.grand th, .cash-view-table tr.grand td { font-weight: 700; border-top: 2px solid var(--line-strong, #9aa7b3); }
.cash-office dt { font-weight: 600; margin-top: 8px; }
.cash-office dd { margin: 2px 0 0; }
/* The staff form, laid out like the paper sheet. */
form.cash-sheet { max-width: 760px; }
form.cash-sheet h3 { margin: 12px 0; }
form.cash-sheet .cash-sheet-table, .cash-sheet-table { width: 100%; border-collapse: collapse; margin: 0 0 16px; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius-sm, 6px); }
.cash-sheet-table caption { text-align: left; font-weight: 600; font-size: 13px; padding: 0 0 6px; }
.cash-sheet-table th, .cash-sheet-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cash-sheet-table th { text-align: left; font-weight: 400; }
.cash-sheet-table th small { color: var(--muted); }
.cash-sheet-table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cash-sheet-table tr.total th, .cash-sheet-table tr.total td { font-weight: 600; background: var(--surface-muted, #f4f6f8); }
.cash-sheet-table [data-total] { font-weight: 600; }
input.cash-sheet-money { width: 9em; text-align: right; font-variant-numeric: tabular-nums; }
.cash-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
form.cash-sheet.is-preview { border-left: 3px solid var(--accent); padding-left: 14px; }
.cash-sheet-flags { border: 1px solid #fde68a; background: var(--warning-soft, #fffbeb); border-radius: var(--radius-sm, 6px); padding: 10px 14px; margin: 12px 0; }
.cash-sheet-flags h3 { margin: 0 0 6px; font-size: 14px; color: var(--warning); }
.cash-sheet-flags ul { margin: 0 0 6px; padding-left: 18px; }
.cash-sheet-ok { color: var(--positive, #15803d); font-weight: 500; }
.cash-sheet-notes { color: var(--muted); font-size: 12px; padding-left: 18px; }
/* Staff cash count sheet form: aligned columns, right-aligned numbers, clear denomination labels, inline checks and a summary before Submit. */
form.cash-sheet { max-width: 860px; }
.cash-sheet-table th.num, .cash-count-table td.cash-each, .cash-count-table td.cash-pieces, .cash-count-table td.cash-amount { text-align: right; }
.cash-count-table { table-layout: fixed; }
.cash-count-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--line); }
.cash-count-table th[scope="row"] { width: 36%; font-weight: 500; }
.cash-count-table td.cash-each { width: 12%; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cash-count-table td.cash-amount { width: 20%; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cash-count-table td.cash-pieces { width: 10%; color: var(--muted); font-variant-numeric: tabular-nums; }
.cash-count-table td.cash-msg-col { width: 22%; text-align: left; white-space: normal; }
.cash-sheet-table td.cash-amount { text-align: right; white-space: nowrap; }
.cash-cur { color: var(--muted); margin-right: 4px; }
.cash-sheet-table input.cash-sheet-money { width: 8.5em; max-width: 100%; box-sizing: border-box; text-align: right; font-variant-numeric: tabular-nums; }
.cash-sheet-table input[aria-invalid="true"], form.cash-sheet input[aria-invalid="true"] { border-color: var(--danger, #b42318); outline: 2px solid color-mix(in srgb, var(--danger, #b42318) 25%, transparent); }
.cash-field-msg { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.cash-field-msg:empty { display: none; }
.cash-field-msg.is-warning { color: var(--warning, #92400e); }
.cash-field-msg.is-error { color: var(--danger, #b42318); font-weight: 600; }
.cash-sheet-table td.cash-amount .cash-field-msg { text-align: right; margin-left: auto; max-width: 26em; }
.cash-checks { margin: 16px 0 8px; }
.cash-checks:empty { display: none; }
.cash-checks h3 { margin: 0 0 6px; font-size: 14px; }
.cash-checks ul { margin: 0 0 6px; padding-left: 18px; }
.cash-checks p { margin: 0; font-size: 13px; }
.cash-checks .notice { margin: 0 0 10px; }
.cash-confirm { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--warning, #92400e); border-radius: var(--radius-sm, 6px); background: var(--warning-soft, #fffbeb); font-weight: 600; font-size: 14px; }
.cash-confirm[hidden] { display: none; }
.cash-confirm input { margin-top: 3px; min-width: 20px; min-height: 20px; }
.cash-confirmed { margin: 12px 0; }
@media (max-width: 720px) { .cash-count-table { table-layout: auto; } .cash-count-table td.cash-msg-col { width: auto; } }
@media (max-width: 760px) {
  input.cash-sheet-money { width: 7em; }
  .cash-sheet-list td.money { text-align: left; }
}

/* Autopay conversion: call log (migration 460). */
.call-notes { font-size: 12px; max-width: 28ch; overflow-wrap: anywhere; white-space: pre-line; margin-top: 2px; }
.call-log, .call-history { margin-top: 4px; font-size: 12px; }
.call-log > summary { cursor: pointer; color: #1d4f9c; }
.call-earlier { margin-top: 4px; }
.call-form { display: grid; gap: 6px; margin-top: 6px; min-width: 220px; }
.call-form label { display: grid; gap: 2px; font-size: 12px; }
.call-form textarea { width: 100%; box-sizing: border-box; font: inherit; }
.roll-table tr.row-ended td { color: #6b7280; }
.roll-table tr.row-review td { background: #fff7e0; }
.review-note { font-size: 12px; max-width: 32ch; overflow-wrap: anywhere; white-space: pre-line; margin-top: 4px; }
.review-edit, .manual-add { margin-top: 4px; font-size: 12px; }
.review-edit > summary, .manual-add > summary { cursor: pointer; color: #1d4f9c; }
.roll-table tr.row-review td { background: #fff7e0; }
.review-note { font-size: 12px; max-width: 32ch; overflow-wrap: anywhere; white-space: pre-line; margin-top: 4px; }
.review-edit, .manual-add { margin-top: 4px; font-size: 12px; }
.review-edit > summary, .manual-add > summary { cursor: pointer; color: #1d4f9c; }
