/*
 * Kept intentionally minimal — Backstage's design system (tokens, layout,
 * buttons, forms, tables, badges, cards, modals, etc.) lives in
 * tokens.css, linked directly in the layout with no build step. This file
 * is only for de minimis Rails-generated boilerplate a future page might
 * need; prefer adding new component classes to tokens.css (and its source
 * of truth, docs/design/tokens.css) instead of ad hoc CSS here.
 */
/* Media previews stay within the detail card at narrow viewport widths. */
.media-asset-preview { max-width: 100%; min-width: 0; overflow: hidden; }
.media-asset-preview-image { display: block; max-width: 100%; height: auto; }
.media-asset-preview img,
.media-asset-preview video,
.media-asset-preview audio { display: block; max-width: 100%; height: auto; }
.media-asset-preview audio { width: min(100%, 40rem); }
.media-asset-file-icon { font-size: var(--text-sm); font-weight: var(--weight-semibold); margin: 0 0 var(--space-2); }
.media-asset-preview-placeholder { overflow-wrap: anywhere; }
.poll-preview-context { margin: 0 0 var(--space-3); color: var(--color-text-secondary); font-size: var(--text-sm); }
.form-layout.form-narrow { grid-template-columns: minmax(0, 1fr); }
.member-instrument-field .field-label { display: flex; flex-wrap: nowrap; align-items: baseline; gap: var(--space-1); white-space: nowrap; }
.member-instrument-field .optional { white-space: nowrap; }

/* Home & account page patterns, scoped outside the shared token system. */
.home-next-gig { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); padding: 0; }
.home-next-copy { display: grid; gap: var(--space-2); min-width: 0; padding-block: var(--space-4); }
.home-next-copy .poster-title { font-size: var(--text-2xl); overflow-wrap: normal; }
.home-next-actions { display: flex; gap: var(--space-2); padding-inline-end: var(--space-4); }
.home-content-grid { margin-top: var(--space-5); }
.home-pipeline-head { margin-top: var(--space-6); }
.home-funnel-group { margin-top: var(--space-4); }
.home-funnel-group > .field-label { margin-bottom: var(--space-2); }
.home-funnel-group .funnel { grid-template-columns: repeat(auto-fit, minmax(6rem, 1fr)); }
.list-row.home-task-row { grid-template-columns: minmax(0, 1fr) auto; }
.home-task-row > div { min-width: 0; }
.home-task-row > .badge { flex-shrink: 0; white-space: nowrap; }
.home-follow-up-status { display: flex; justify-content: flex-end; flex-shrink: 0; white-space: nowrap; }
.home-view-tasks { margin-top: var(--space-3); }
.task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.task-list { display: grid; gap: var(--space-2); }
.theme-form { margin: 0; }
.theme-form .form-actions { margin-top: var(--space-3); }
.profile-layout { align-items: start; }
.profile-acts { margin-inline: calc(-1 * var(--space-4)); }
.theme-options { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; padding: 0; border: 0; }
.theme-option { display: inline-flex; align-items: center; gap: var(--space-1); min-height: var(--size-touch); padding: 0 var(--space-2); border: var(--border-frame) solid var(--color-frame); font-family: var(--font-display); font-weight: var(--weight-black); text-transform: uppercase; cursor: pointer; }
.theme-option:has(input:checked) { background: var(--color-inverse); color: var(--color-on-inverse); }
.theme-option input { accent-color: var(--color-accent-fill); }
@media (max-width: 768px) {
  .home-next-gig { grid-template-columns: auto minmax(0, 1fr); padding-inline-end: var(--space-3); }
  .home-next-actions { grid-column: 1 / -1; padding: 0 var(--space-3) var(--space-3); }
  .home-next-actions .btn { flex: 1; }
  .home-next-copy .poster-title { font-size: var(--text-xl); }
}
@media (max-width: 560px) {
  .task-row { grid-template-columns: minmax(0, 1fr); }
  .home-funnel-group .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-next-gig .date-block { min-width: 4rem; }
}

/* Booking page layouts: keep action menus outside table scrollers. */
.pipeline-board { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pipeline-col, .pipeline-col-body, .lead-card, .gig-list-copy { min-width: 0; }
.lead-card .venue { font-family: var(--font-sans); font-weight: var(--weight-semibold); text-transform: none; overflow-wrap: anywhere; }
.lead-card.is-lost .venue, .lead-card.is-lost .meta-line, .lead-card.is-lost .list-row-meta, .lead-card.is-lost .fee { text-decoration: line-through; }
.lead-card .meta-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); }
.lead-card .badge { min-width: 0; white-space: normal; }
.gig-status-filter { margin-inline-start: auto; flex-wrap: wrap; }
.gig-list-section + .gig-list-section { margin-top: var(--space-5); }
.gig-list-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.gig-list-row .gig-list-copy { display: grid; gap: var(--space-1); }
.gig-list-row .gig-list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.gig-list-row .gig-list-actions > .badge { min-width: 0; white-space: normal; }
.gig-fee { text-align: end; white-space: nowrap; }
@media (max-width: 768px) {
  .pipeline-board { grid-template-columns: repeat(5, minmax(13rem, 1fr)); }
  .gig-status-filter { margin-inline-start: 0; width: 100%; }
  .gig-list-row { grid-template-columns: auto minmax(0, 1fr); }
  .gig-list-row .gig-fee { grid-column: 2; text-align: start; }
  .gig-list-row .gig-list-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .gig-list-row .menu-wrap { position: relative; }
}
.gig-list-section:last-child .gig-list-row:last-child .menu-wrap > .menu { top: auto; bottom: calc(100% + var(--space-2)); }

/* The lead lifecycle shows all four steps in a readable mini-grid. */
.lifecycle.booking-lead-lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
.lifecycle.booking-lead-lifecycle .lifecycle-step { min-width: 0; }
.lifecycle.booking-lead-lifecycle .lifecycle-step:nth-child(-n+2) { border-bottom: var(--border-frame) solid var(--color-frame); }
.lifecycle.booking-lead-lifecycle .lifecycle-step:nth-child(2n) { border-right: 0; }
.lead-quotes-list { border: 0; margin: 0 calc(-1 * var(--space-4)) calc(-1 * var(--space-4)); }
.lead-quotes-list .list-row { grid-template-columns: minmax(0, 1fr) auto auto; }
@media (max-width: 480px) { .lead-quotes-list .list-row { grid-template-columns: minmax(0, 1fr) auto; } .lead-quotes-list .list-row > :nth-child(3) { grid-column: 1 / -1; } }
.lead-quote-amount { font-size: var(--text-xl); }
.lead-notes-editor { margin-top: var(--space-3); }
.lead-detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: var(--space-5); align-items: start; }
.lead-detail-main, .lead-detail-sidebar { min-width: 0; }
.lead-activity-timeline .timeline-item-label { display: block; font-weight: var(--weight-semibold); }
.lead-activity-timeline .timeline-item-description { display: block; color: var(--color-text-muted); }
@media (max-width: 768px) { .lead-detail-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .lifecycle.booking-lead-lifecycle .lifecycle-step { padding: var(--space-2); }
  .lifecycle.booking-lead-lifecycle .lifecycle-label { overflow-wrap: anywhere; }
  .module-header .menu-wrap > .menu { left: 0; right: auto; }
}
@media (max-width: 560px) {
  .module-body .list-row-end > .menu-wrap > .menu { left: 0; right: auto; }
  /* Keep filtered timezone choices in flow so they don't cover currency. */
  .module-body .act-profile-locale-grid .combobox-listbox { position: static; margin-top: var(--space-1); }
}

.module-body form > .card + .card, .module-body form > .card + .form-actions { margin-top: var(--space-4); }
.module-body > * + .section-head { margin-top: var(--space-6); }
/* Page rhythm, continued: stacked blocks never touch, on every module page */
.module-body > .kpi-strip + * { margin-top: var(--space-4); }
.module-body > .callout + *, .module-body > * + .callout { margin-top: var(--space-4); }
/* Row actions keep a gap; tokens.css loads after this file (:app is alphabetical) and resets the margin inside tables, so this selector must out-rank it */
.module-body .table .row-actions > * + * { margin-inline-start: var(--space-2); }

/* Booking review round two: layout refinements use scoped selectors to win
   against tokens.css, which is loaded after this stylesheet. */
.module-body > .lead-next-step { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.lead-next-step > div:first-child { min-width: 0; }
.lead-next-step .title-actions { margin-inline-start: auto; flex: none; }
.lead-detail-layout { gap: var(--space-4); }
.lead-detail-main.stack, .lead-detail-sidebar.stack { gap: var(--space-4); }
.lead-detail-main > .card > .card-title.booking-section-title,
.lead-detail-main > .card > h2.card-title,
.lead-detail-sidebar > .card > h2.card-title { margin-top: calc(-1 * var(--space-5)); }
.lead-detail-main > .card.card-compact > .card-title,
.lead-detail-sidebar > .card.card-compact > .card-title { margin-top: calc(-1 * var(--space-4)); }
.module-body .gig-list-row { grid-template-columns: 4.5rem minmax(0, 1fr) auto max-content; align-items: center; }
.gig-list-row .date-block-sm { box-sizing: border-box; width: 4.5rem; min-width: 4.5rem; height: 4.5rem; padding: var(--space-2); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gig-list-row .gig-list-actions { justify-content: flex-end; }
.filter-bar:has(.gig-status-filter) { display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(10rem, 12rem) auto minmax(max-content, auto); align-items: center; }
.filter-bar:has(.gig-status-filter) .gig-status-filter { margin-inline-start: 0; justify-self: end; flex-wrap: nowrap; }
.filter-bar:has(> .segmented[role="group"]) { display: grid; grid-template-columns: minmax(16rem, 1fr) auto auto; align-items: center; }
.filter-bar:has(> .segmented[role="group"]) > .filter-chip { justify-self: end; }
.module-body > .filter-bar:has(.segmented[role="group"]) { margin-bottom: var(--space-3); }
.menu-wrap > .icon-btn { width: 36px; height: 36px; border: var(--border-frame) solid var(--color-frame); border-radius: 0; background: var(--color-surface); color: var(--color-text); }
.menu-wrap > .icon-btn:hover { background: var(--color-bg-muted); }
.lead-next-step .title-actions form { display: inline-flex; margin: 0; }
.lead-next-step .title-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.booking-lead-lifecycle + .stack { margin-top: var(--space-3); }
.gig-status-timeline { margin-bottom: var(--space-4); }
.gig-status-timeline .lifecycle-step { min-width: 0; }

.gig-hub-content { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; column-gap: var(--space-4); row-gap: var(--space-6); }
.gig-hub-content > .card { min-width: 0; }
.gig-hub-content > .card.gig-schedule-card,
.gig-hub-content > .card.gig-money-card,
.gig-hub-content > .card.gig-details-card,
.gig-hub-content > .card.gig-logistics-card { min-width: 0; }
.gig-hub-content > .card { grid-column: auto; grid-row: auto; }
.gig-hub-content > .card.gig-details-card { grid-column: 1; grid-row: 1; }
.gig-deposits-card .table-scroll > .deposit-table { width: 100%; min-width: 0; table-layout: fixed; }
.deposit-table th, .deposit-table td { min-width: 0; overflow-wrap: anywhere; }
.gig-deposits-card .deposit-table .num { white-space: normal; overflow-wrap: anywhere; }
.gig-deposits-card .deposit-table .badge { white-space: nowrap; }
.deposit-table th:first-child { width: 34%; }
.deposit-table th:nth-child(2), .deposit-table th:nth-child(3) { width: 33%; }
.gig-deposits-card .card { box-sizing: border-box; max-width: 100%; min-width: 0; }
.gig-hub-content > .card.gig-money-card { grid-column: 2; grid-row: 1; }
.gig-hub-content > .card.gig-status-card { grid-column: 3; grid-row: 1; }
.gig-hub-content > .card.gig-schedule-card { grid-column: 1; grid-row: 2; }
.gig-hub-content > .card.gig-deposits-card { grid-column: 2; grid-row: 2; }
.gig-hub-content > .card.gig-settlement-card { grid-column: 3; grid-row: 2; }
.gig-hub-content > .card.gig-public-card { grid-column: 1; grid-row: 3; }
.gig-hub-content > .card.gig-contacts-card { grid-column: 2; grid-row: 3; }
.gig-hub-content > .card.gig-logistics-card { grid-column: 3; grid-row: 3; }
.gig-hub-content > .card.gig-feeds-card { grid-column: 1 / span 2; grid-row: 4; }
.gig-hub-content > .card.gig-activity-card { grid-column: 3; grid-row: 4; }
.gig-hub-content > .card[aria-labelledby="contracts-heading"] { grid-column: 1 / -1; grid-row: 5; }
.gig-hub-content .kv-grid > .span-2 { grid-column: 1 / -1; }
@media (max-width: 1099px) {
  .gig-hub-content { grid-template-columns: minmax(0, 1fr); }
  .gig-hub-content > .card { grid-column: auto !important; grid-row: auto !important; }
  .filter-bar:has(.gig-status-filter) { grid-template-columns: minmax(0, 1fr) minmax(10rem, 12rem) auto; }
  .filter-bar:has(.gig-status-filter) .gig-status-filter { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 768px) {
  .lifecycle.gig-status-timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .gig-status-timeline .lifecycle-step { padding: var(--space-1); }
  .gig-status-timeline .lifecycle-label { font-size: var(--text-xs); }
  .gig-hub-content > .gig-details-card { order: 1; }
  .gig-hub-content > .gig-money-card { order: 2; }
  .gig-hub-content > .gig-status-card { order: 3; }
  .gig-hub-content > .gig-schedule-card { order: 4; }
  .gig-hub-content > .gig-deposits-card { order: 5; }
  .gig-hub-content > .gig-settlement-card { order: 6; }
  .gig-hub-content > .gig-public-card { order: 7; }
  .gig-hub-content > .gig-contacts-card { order: 8; }
  .gig-hub-content > .gig-logistics-card { order: 9; }
  .gig-hub-content > .gig-feeds-card { order: 10; }
  .gig-hub-content > .gig-activity-card { order: 11; }
  .gig-hub-content > .card[aria-labelledby="contracts-heading"] { order: 12; }
  .module-body > .lead-next-step { align-items: stretch; flex-direction: column; }
  .lead-next-step .title-actions { margin-inline-start: 0; }
  .lead-next-step .title-actions > * { flex: 1; }
  .filter-bar:has(.gig-status-filter) { display: flex; align-items: stretch; }
  .filter-bar:has(.gig-status-filter) > * { flex: 1 1 10rem; }
  .filter-bar:has(.gig-status-filter) .gig-status-filter { flex-basis: 100%; flex-wrap: wrap; }
  .filter-bar:has(> .segmented[role="group"]) { display: flex; align-items: stretch; }
  .filter-bar:has(> .segmented[role="group"]) > * { flex: 1 1 auto; }
  .gig-hub-content { grid-template-columns: minmax(0, 1fr); }
  .gig-hub-content > .card { grid-column: 1 !important; grid-row: auto !important; }
  .module-body .gig-list-row { grid-template-columns: auto minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .filter-bar:has(.gig-status-filter) > .input { flex-basis: 100%; }
  .filter-bar:has(.gig-status-filter) .gig-status-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar:has(.gig-status-filter) .gig-status-filter .segmented-item { min-width: 0; white-space: nowrap; }
}
/* Finance and settlement layouts: module-specific structure, token-backed only. */
.module-body .finance-filter-bar { align-items: center; flex-wrap: nowrap; grid-template-columns: max-content 10rem auto; }
.module-body .finance-filter-bar > .select { flex: 0 0 10rem; }
.module-body .finance-filter-bar > .segmented { flex: 0 0 auto; width: max-content; min-width: 0; }
.module-body .finance-filter-bar > .segmented > .segmented-item { flex: 0 0 auto; }
.module-body .finance-filter-bar .finance-export { margin-inline-start: auto; white-space: nowrap; }
.module-body .finance-currency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-4); }
.module-body .finance-currency-tile { display: grid; align-content: start; gap: var(--space-3); min-width: 0; }
.module-body .finance-currency-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); border: 0; }
.module-body .finance-currency-kpis .kpi { min-width: 0; }
.module-body .finance-currency-kpis .kpi-value { overflow-wrap: anywhere; }
.module-body .finance-table-scroll { margin-top: var(--space-5); }
.module-body .finance-table-scroll > .finance-table { min-width: 0; width: 100%; table-layout: fixed; }
.module-body .finance-table th, .module-body .finance-table td { overflow-wrap: anywhere; }
.module-body .finance-table .num { text-align: end; white-space: normal; font-variant-numeric: tabular-nums; }
.module-body .finance-table tbody th[scope="row"] { font-family: var(--font-sans); font-weight: var(--weight-semibold); text-transform: none; }
.module-body .finance-table tbody th[scope="row"] a { display: block; }
.module-body .finance-table tbody tr > * { vertical-align: middle; }
.module-body .finance-table .progress.finance-row-progress { display: flex; flex-direction: row; align-items: center; gap: var(--space-2); min-width: 0; }
.module-body .finance-row-progress .progress-track { flex: 1 1 auto; min-width: 3rem; width: auto; }
.module-body .finance-row-progress .progress-meta { flex: 0 0 auto; margin: 0; }
.module-body .finance-row-progress .progress-detail { white-space: nowrap; font-variant-numeric: tabular-nums; }
.module-body .finance-mobile-label { display: none; }
.module-body .finance-mobile-value { min-width: 0; }
@media (max-width: 768px) {
  .module-body .finance-table-scroll > .finance-table { display: block; }
  .module-body .finance-table-head { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .module-body .finance-table tbody { display: block; }
  .module-body .finance-table tbody tr { display: block; margin: var(--space-3); border: var(--border-frame) solid var(--color-frame); }
  .module-body .finance-table tbody th[scope="row"] { display: block; padding: var(--space-3); text-align: start; border-bottom: var(--border-hair) solid var(--color-border); }
  .module-body .finance-table tbody td { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: var(--space-2); align-items: start; padding: var(--space-2) var(--space-3); text-align: start; white-space: normal; }
  .module-body .finance-mobile-label { display: block; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-align: start; }
  .module-body .finance-mobile-value { display: block; text-align: end; overflow-wrap: anywhere; }
  .module-body .finance-row-progress { width: 100%; }
}
.module-body .finance-table .badge { white-space: nowrap; overflow-wrap: normal; padding-inline: var(--space-1); font-size: var(--text-xs); }
@media (max-width: 768px) {
  .module-body .finance-filter-bar { flex-wrap: wrap; }
  .module-body .finance-filter-bar > .select { flex: 1 1 8rem; }
  .module-body .finance-filter-bar > .segmented { flex: 1 1 100%; width: auto; overflow: visible; flex-wrap: wrap; }
  .module-body .finance-filter-bar > .segmented > .segmented-item { flex: 1 1 auto; white-space: normal; }
  .module-body .finance-band-payouts .table-scroll { max-width: 100%; min-width: 0; overflow: visible; }
  .module-body .finance-band-payouts .finance-stacked-table { display: block; width: 100%; min-width: 0; }
  .module-body .finance-band-payouts .finance-stacked-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .module-body .finance-band-payouts .finance-stacked-table tbody,
  .module-body .finance-band-payouts .finance-stacked-table tfoot { display: block; }
  .module-body .finance-band-payouts .finance-stacked-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; margin-block: var(--space-3); padding: var(--space-2) var(--space-3); border: var(--border-frame) solid var(--color-frame); }
  .module-body .finance-band-payouts .finance-stacked-table th[scope="row"] { min-width: 0; padding: var(--space-2) 0; text-align: start; overflow-wrap: anywhere; }
  .module-body .finance-band-payouts .finance-stacked-table td { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: baseline; min-width: 0; padding: var(--space-2) 0; text-align: end; white-space: normal; font-variant-numeric: tabular-nums; }
  .module-body .finance-band-payouts .finance-stacked-table td::before { content: attr(data-label); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-align: start; }
  .module-body .finance-band-payouts .finance-stacked-gigs tbody th[scope="row"] { grid-column: 1; }
  .module-body .finance-band-payouts .finance-stacked-gigs tbody td.finance-stacked-status { grid-column: 2; grid-row: 1; display: block; padding-inline-start: var(--space-2); white-space: nowrap; }
  .module-body .finance-band-payouts .finance-stacked-gigs tbody td.finance-stacked-status::before { content: none; }
  .module-body .finance-band-payouts .finance-stacked-gigs .badge { display: inline-flex; max-width: none; white-space: nowrap; }
  .module-body .finance-band-payouts .finance-stacked-table tfoot tr { font-weight: var(--weight-bold); }
  .module-body .finance-filter-bar .finance-export { margin-inline-start: 0; }
  .module-body .finance-currency-grid { grid-template-columns: minmax(0, 1fr); }
}
.module-body .settlement-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); max-width: none; margin: 0; }
.module-body .settlement-layout > * { min-width: 0; }
.module-body .settlement-layout .table-scroll > .table--wrap { width: 100%; min-width: 0; table-layout: auto; }
.module-body .settlement-layout .table--wrap th { white-space: normal; overflow-wrap: anywhere; text-transform: none; letter-spacing: normal; }
.module-body .settlement-layout .table--wrap td.num { white-space: nowrap; }
.module-body .settlement-detail-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(16rem, 1fr); gap: var(--space-5); align-items: start; }
.module-body .settlement-detail-grid > * { min-width: 0; }
.module-body .settlement-ledger-card { min-width: 0; }
.module-body .settlement-ledger-card .table-scroll { max-width: 100%; min-width: 0; overflow-x: auto; margin-bottom: 0; }
.module-body .settlement-ledger-card .table-scroll > .settlement-ledger-table { width: 100%; min-width: 30rem; table-layout: auto; }
.module-body .settlement-ledger-table th:nth-child(1), .module-body .settlement-ledger-table td:nth-child(1) { min-width: 5rem; white-space: nowrap; }
.module-body .settlement-ledger-table th:nth-child(2), .module-body .settlement-ledger-table td:nth-child(2) { min-width: 5rem; }
.module-body .settlement-ledger-table th:nth-child(3), .module-body .settlement-ledger-table td:nth-child(3) { min-width: 6rem; }
.module-body .settlement-ledger-table th:nth-child(4), .module-body .settlement-ledger-table td:nth-child(4) { min-width: 8rem; }
.module-body .settlement-ledger-table th:nth-child(5), .module-body .settlement-ledger-table td:nth-child(5) { min-width: 6rem; white-space: nowrap; overflow-wrap: normal; }
.module-body .settlement-ledger-table th, .module-body .settlement-ledger-table td { padding-inline: var(--space-1); }
.module-body .settlement-ledger-note { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.module-body .settlement-ledger-note > span { min-width: 0; overflow-wrap: anywhere; }
.module-body .settlement-ledger-note .row-actions { flex: 0 0 auto; }
.module-body .settlement-payouts-table { width: 100%; min-width: 0; table-layout: fixed; }
.module-body .settlement-payouts-table th:nth-child(-n+4), .module-body .settlement-payouts-table td:nth-child(-n+4) { white-space: nowrap; }
.module-body .settlement-ledger-table .row-actions { min-width: 4rem; white-space: nowrap; }
.module-body .waterfall-result-label { font-size: var(--text-lg); }
.module-body .settlement-ledger-table .num { text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; }
.module-body .settlement-ledger-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.module-body .settlement-ledger-form > .form-actions { grid-column: 1 / -1; }
.module-body .settlement-edit-actions { justify-content: flex-end; }
.module-body .finance-fee-progress .finance-progress-svg { display: block; width: 100%; height: 100%; }
.module-body .finance-fee-progress .finance-progress-fill { fill: var(--color-info); }
.module-body .settlement-ledger-form .segmented,
.module-body .settlement-payout-form .segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; max-width: 100%; }
.module-body .settlement-ledger-form .segmented-item,
.module-body .settlement-payout-form .segmented-item { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.module-body .settlement-edit-actions .btn { white-space: nowrap; }
.module-body .settlement-edit-actions { justify-content: flex-end; flex-wrap: nowrap; }
.module-body .finance-band-payouts .is-positive-emphasis { font-weight: var(--weight-bold); }
.module-body .finance-band-payouts .table tfoot .is-negative { color: var(--color-danger); }
.module-body .booking-form-grid > .booking-quote-wide { grid-column: 1 / -1; }
.module-body .booking-quote-ticket-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 480px) { .module-body .booking-quote-ticket-split { grid-template-columns: minmax(0, 1fr); } }
.module-body .settlement-summary-strip { margin-top: var(--space-4); }
.module-body .settlement-payout-form .segmented-item { padding-inline: var(--space-1); font-size: var(--text-xs); white-space: nowrap; overflow-wrap: normal; }
.module-body .settlement-before-file { border: var(--border-frame) solid var(--color-accent-fill); }
@media (max-width: 768px) { .module-body .settlement-detail-grid { grid-template-columns: minmax(0, 1fr); } .module-body .settlement-ledger-form { grid-template-columns: minmax(0, 1fr); } }

.module-body .gig-feeds-card .list-row { grid-template-columns: minmax(0, 1fr) auto; }
.module-body .gig-contacts-card .list-row { grid-template-columns: minmax(0, 1fr) auto; }
.gig-feeds-card .list-row-meta { overflow-wrap: anywhere; }

/* PR #253 evidence fixes (measured in a browser) */
/* A visually-hidden absolutely-positioned header label escaped the scrolling table and widened the whole phone page (603px at 390px). */
.table-scroll { position: relative; }
/* Row actions: icon link and menu share one centre line; the gap between them is exactly one space-2. */
.module-body .table .row-actions > * { vertical-align: middle; }
.module-body .table .row-actions .menu-wrap { vertical-align: middle; }
/* Promoters filter bar stays on ONE line on desktop; the narrow Country field keeps its width, the rest shrink. */
@media (min-width: 1024px) {
  .module-body > .filter-bar:has(> .checkbox-row) { flex-wrap: nowrap; }
  .module-body > .filter-bar:has(> .checkbox-row) > .field { flex: 1 1 8rem; min-width: 0; }
  .module-body > .filter-bar:has(> .checkbox-row) > .field:nth-child(3) { flex: 0 0 5rem; }
  .module-body > .filter-bar:has(> .checkbox-row) > .checkbox-row, .module-body > .filter-bar:has(> .checkbox-row) > .btn { flex: 0 0 auto; white-space: nowrap; }
}
/* Rider templates: two equal tiles; the Create button sits on the bottom edge so both line up. */
.module-body .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-body .tile-grid > .tile > .btn { margin-top: auto; align-self: flex-start; }
.module-body .tile-grid + *, .module-body p + .tile-grid { margin-top: var(--space-3); }
@media (max-width: 640px) { .module-body .tile-grid { grid-template-columns: minmax(0, 1fr); } }
/* Rider template table: turn rows into labeled cards on narrow screens; no horizontal scrolling. */
.module-body .rider-templates-table-wrap { overflow: visible; }
.module-body .rider-templates-table { width: 100%; table-layout: fixed; }
.module-body .rider-templates-table th, .module-body .rider-templates-table td { text-align: left; overflow-wrap: anywhere; }
.module-body .rider-templates-table td.numeric { text-align: right; }
@media (max-width: 640px) {
  .module-body .rider-templates-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .module-body .rider-templates-table, .module-body .rider-templates-table tbody { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  .module-body .rider-templates-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); width: 100%; min-width: 0; box-sizing: border-box; padding: var(--space-3); border-bottom: var(--border-thin) solid var(--color-border); }
  .module-body .rider-templates-table tbody th, .module-body .rider-templates-table td { display: grid; grid-template-columns: minmax(5.5rem, 38%) minmax(0, 1fr); gap: var(--space-2); width: 100%; min-width: 0; box-sizing: border-box; padding: 0; border: 0; overflow-wrap: anywhere; }
  .module-body .rider-templates-table tbody th { color: var(--color-text); background: transparent; font-family: var(--font-sans); font-size: var(--text-sm); letter-spacing: normal; text-transform: none; }
  .module-body .rider-templates-table tbody th::before, .module-body .rider-templates-table td::before { content: attr(data-label); font-weight: var(--weight-bold); text-transform: uppercase; }
  .module-body .rider-templates-table td.numeric { text-align: left; }
  .module-body .rider-templates-table td.numeric span { text-align: right; }
  .module-body .rider-templates-table td.row-actions { grid-column: 1 / -1; font-size: var(--text-sm); }
}
/* Keep a wrapped public/private badge on its own metadata row, without a leading separator. */
.gig-list-copy .meta-line > .gig-public-badge { flex-basis: 100%; }
.gig-list-copy .meta-line > .gig-public-badge::before { content: none; }
/* The whitespace between inline row-action buttons added ~3px to the 8px gap (measured 11px); drop it so the gap is exactly space-2. */
.module-body .table td.row-actions { font-size: 0; }
.module-body .table td.row-actions > * { font-size: 1rem; }
/* Venues search: the input fills the row beside the 44px search button instead of pushing it onto its own line. */
.module-body .venue-search-row { flex-wrap: nowrap; }
.module-body .venue-search-row > .input { flex: 1 1 auto; width: auto; min-width: 0; }
/* Second-pass evidence fixes (PR #253) */
/* Two-column pages: left stack and right aside share one gap; cards in a column never touch. */
.module-body .layout-split > .stack { gap: var(--space-4); }
.module-body .layout-split > aside.stack { gap: var(--space-4); }
/* Merge confirm: warning, record counts and actions are separate blocks. */
.module-body .card > h3 { margin-top: var(--space-4); margin-bottom: var(--space-2); }
.module-body .card > .kv-grid { margin-bottom: var(--space-4); }
/* Inline "Add venue" under a select keeps a gap from the next field. */
.module-body .field > .field-action { align-self: flex-start; margin-top: var(--space-2); }
/* Third-pass evidence fixes (PR #253): measured 0px / 3px gaps */
.module-body .card > p + .stack { margin-top: var(--space-3); }
.module-body .card dd > span:has(+ a) { margin-inline-end: var(--space-2); }
.module-body .field:has(> .field-action) { margin-bottom: var(--space-3); }
.module-body .card > .kv-grid + form { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
/* Fourth-pass evidence fixes (PR #253): row-header cells were top-aligned (names 8px above the other cells); expired date sat 3px from its badge */
.module-body .table tbody th[scope="row"] { vertical-align: middle; }
.module-body .table .badge + .text-sm.text-muted { margin-inline-start: var(--space-2); }
/* PR #254 evidence-pass fixes: KPI amounts stay whole (label left, amount right); ledger form separated from totals. */
.module-body .finance-currency-kpis { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.module-body .finance-currency-kpis .kpi { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.module-body .finance-currency-kpis .kpi-value { overflow-wrap: normal; white-space: nowrap; font-size: var(--text-xl); }
.module-body .settlement-ledger-card .settlement-ledger-form { margin-top: var(--space-5); }
.module-body .settlement-ledger-card .table-scroll > .settlement-ledger-table { min-width: 30rem; table-layout: auto; }
.module-body .settlement-ledger-table td, .module-body .settlement-ledger-table th { overflow-wrap: anywhere; }
.module-body .settlement-ledger-table td:nth-child(2) .badge { white-space: nowrap; overflow-wrap: normal; }
.module-body .settlement-ledger-table .num { overflow-wrap: normal; }
.module-body .settlement-ledger-card form.settlement-ledger-form.stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: end; justify-items: stretch; }
.module-body .settlement-ledger-card form.settlement-ledger-form.stack > .field:nth-of-type(2), .module-body .settlement-ledger-card form.settlement-ledger-form.stack > .field:nth-last-child(2), .module-body .settlement-ledger-card form.settlement-ledger-form.stack > .form-actions { grid-column: 1 / -1; }
@media (max-width: 768px) { .module-body .settlement-ledger-card form.settlement-ledger-form.stack { grid-template-columns: minmax(0, 1fr); } }
.module-body .finance-currency-kpis .kpi { border: 0; }
@media (max-width: 768px) {
  .module-body .settlement-ledger-card .table-scroll,
  .module-body .settlement-payouts-table { overflow: visible; }
  .module-body .settlement-ledger-card .table-scroll > .settlement-ledger-table,
  .module-body .settlement-detail-grid .settlement-payouts-table { display: block; width: 100%; min-width: 0; table-layout: fixed; }
  .module-body .settlement-ledger-table thead,
  .module-body .settlement-payouts-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .module-body .settlement-ledger-table tbody,
  .module-body .settlement-ledger-table tfoot,
  .module-body .settlement-payouts-table tbody { display: block; }
  .module-body .settlement-ledger-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-1) var(--space-2); margin: 0; padding: var(--space-2) 0; border-bottom: var(--border-hair) solid var(--color-border); }
  .module-body .settlement-ledger-table tbody td { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .module-body .settlement-ledger-table tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .module-body .settlement-ledger-table tbody td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .module-body .settlement-ledger-table tbody td:nth-child(3) { grid-column: 1; grid-row: 3; }
  .module-body .settlement-ledger-table tbody td:nth-child(4) { grid-column: 1; grid-row: 4; }
  .module-body .settlement-ledger-table tbody td:nth-child(5) { grid-column: 2; grid-row: 1 / span 4; align-self: center; text-align: end; white-space: nowrap; }
  .module-body .settlement-ledger-table .settlement-ledger-note { display: grid; justify-items: start; }
  .module-body .settlement-ledger-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); padding: var(--space-2) 0; border-top: var(--border-hair) solid var(--color-border); }
  .module-body .settlement-ledger-table tfoot th { grid-column: 1; padding: 0; text-align: start; white-space: normal; }
  .module-body .settlement-ledger-table tfoot td { grid-column: 2; padding: 0; text-align: end; white-space: nowrap; }
  .module-body .settlement-payouts-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--space-1) var(--space-2); margin: 0; padding: var(--space-2) 0; border-bottom: var(--border-hair) solid var(--color-border); }
  .module-body .settlement-payouts-table tbody td { display: flex; min-width: 0; justify-content: space-between; gap: var(--space-2); padding: 0; border: 0; text-align: start; white-space: normal; }
  .module-body .settlement-payouts-table tbody td::before { content: attr(data-label); color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
  .module-body .settlement-payouts-table tbody td:nth-child(-n+4) { grid-column: 1; }
  .module-body .settlement-payouts-table tbody td:nth-child(5) { grid-column: 1 / -1; grid-row: 5; align-self: start; flex-direction: row; align-items: baseline; text-align: start; white-space: normal; }
  .module-body .settlement-payouts-table tbody td:nth-child(6) { grid-column: 1 / -1; grid-row: 6; justify-content: flex-end; }
  .module-body .settlement-payouts-table tbody td:nth-child(6)::before { content: none; }
  .module-body .settlement-payouts-table tbody td[colspan] { grid-column: 1 / -1; }
}

/* Website redesign page layouts, using the shared Tour Poster tokens. */
.module-body.website-stack { display: grid; gap: var(--space-4); }
.module-body .website-generated-pages-note { margin-top: var(--space-3); }
.module-body .website-editor-layout { align-items: start; }
.module-body .website-editor-layout > * { min-width: 0; }
.module-body .website-editor-layout .form-grid { grid-template-columns: minmax(0, 1fr); }
.module-body .website-editor-preview { position: static; }
.module-body .website-seo-disclosure summary { cursor: pointer; }
.module-body .website-seo-disclosure .website-stack { margin-top: var(--space-3); }
.module-body .website-template-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.module-body .website-template-option { display: grid; gap: var(--space-2); padding: var(--space-3); border: var(--border-frame) solid var(--color-frame); background: var(--color-surface); cursor: pointer; }
.module-body .website-template-option:has(input:checked) { outline: var(--border-frame) solid var(--color-accent-fill); }
.module-body .website-template-option > input { accent-color: var(--color-accent-fill); }
.module-body .website-template-sample { display: grid; min-height: 8rem; place-items: center; border: var(--border-frame) solid var(--color-frame); }
.module-body .website-template-classic { background: var(--color-bg); font-family: Georgia, "Times New Roman", serif; }
.module-body .website-template-bill { background: var(--color-inverse); color: var(--color-on-inverse); font-family: var(--font-display); font-weight: var(--weight-black); text-transform: uppercase; }
.module-body .website-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.module-body .website-color-control { display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: center; gap: 8px; }
.module-body .website-color-input { min-width: 0; min-height: var(--size-touch); padding: var(--space-1); }
.module-body .website-hex-value { min-width: 0; font-family: var(--font-mono); }
.module-body .website-contrast-callout { margin-top: var(--space-4); }
.module-body .website-logo-dropzone { min-height: 6rem; }
.module-body .website-logo-dropzone + .field { margin-top: var(--space-4); }
.module-body .website-preview-mode { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.module-body .website-preview-toggle { display: flex; gap: var(--space-1); }
.module-body .block-editor-grip { width: var(--space-3); height: var(--space-4); flex: 0 0 auto; opacity: 0.65; background-image: radial-gradient(circle, currentColor 15%, transparent 16%); background-size: var(--space-2) var(--space-2); }
.module-body .block-editor-controls { display: flex; align-items: center; gap: var(--space-1); }
.module-body .block-editor-controls .btn { margin-inline-start: var(--space-1); }
.module-body .website-theme-preview .site-header { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.module-body .website-theme-preview-phone { width: min(100%, 390px); justify-self: center; }
.module-body .website-preview-heading { flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.module-body .website-preview-heading .segmented { margin-left: auto; }
.module-body .website-theme-preview { display: grid; align-content: start; gap: var(--space-3); min-width: 0; padding: var(--space-4); border: var(--border-frame) solid var(--color-frame); background: var(--site-paper, var(--color-surface)); color: var(--site-ink, var(--color-text)); }
.module-body .website-theme-preview .website-preview-brand { color: var(--site-primary, var(--color-text)); font-weight: var(--weight-bold); }
.module-body .website-theme-preview .website-preview-nav { display: flex; flex-wrap: wrap; gap: var(--space-3); border-bottom: var(--border-frame) solid var(--color-frame); padding-bottom: var(--space-2); color: var(--site-accent, var(--color-accent-fill)); }
.module-body .website-theme-preview.site-template-bill { border: 3px solid var(--color-frame); border-radius: 0; }
.module-body .website-theme-preview.site-template-bill .website-preview-brand,
.module-body .website-theme-preview.site-template-bill .website-preview-nav { font-family: var(--font-display); font-weight: var(--weight-black); text-transform: uppercase; }
.module-body .website-theme-preview.site-template-bill .website-preview-action { border-radius: 0; box-shadow: 4px 4px 0 var(--color-frame); }
.module-body .website-theme-preview.site-template-classic .website-preview-brand,
.module-body .website-theme-preview.site-template-classic .website-preview-nav { font-family: Georgia, "Times New Roman", serif; text-transform: none; }
.module-body .website-theme-preview .website-preview-copy { margin: 0; }
.module-body .website-theme-preview .website-preview-action { justify-self: start; padding: var(--space-2) var(--space-3); background: var(--site-accent, var(--color-accent-fill)); color: var(--site-on-accent, var(--color-text-on-accent)); text-decoration: none; }
@media (max-width: 768px) {
  .module-body .website-editor-preview { position: static; }
  .module-body .website-template-picker, .module-body .website-color-grid { grid-template-columns: minmax(0, 1fr); }
}
.module-body .website-date-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); gap: var(--space-5); align-items: start; }
.module-body .website-date-section + .website-date-section { margin-top: var(--space-5); }
.module-body .website-date-row { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.module-body .website-date-copy { min-width: 0; }
.module-body .website-date-status { display: flex; gap: 8px; margin-top: var(--space-2); }
.module-body .website-date-form { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: var(--space-2); min-width: 0; }
.module-body .website-date-form .field { min-width: 0; }
.module-body .website-date-form input[type="url"] { width: 100%; min-width: 0; }
.module-body .website-date-feeds .field { margin-top: var(--space-3); }
.module-body .website-media-upload { display: block; }
.module-body .website-media-upload .dropzone { min-height: 12rem; }
.module-body .website-media-upload .website-media-upload-box { position: relative; }
.module-body .website-media-upload .dropzone:focus-visible { outline: var(--border-frame) solid var(--color-focus-ring); outline-offset: 2px; }
.module-body .website-media-upload .dropzone[aria-disabled="true"] { cursor: progress; }
.module-body .website-media-upload .dropzone.is-uploading { background: var(--color-bg-muted); }
.module-body .website-media-library-head { margin-top: var(--space-5); }
.module-body .website-media-grid { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.module-body .website-media-tile { min-width: 0; overflow-wrap: anywhere; }
.module-body .website-media-thumb, .module-body .website-media-tile video { display: block; width: 100%; max-height: 14rem; object-fit: cover; }
.module-body .website-media-tile audio { width: 100%; }
.module-body .website-media-placeholder { display: grid; min-height: 8rem; place-items: center; background: var(--color-bg-muted); }
.module-body .website-epk-layout > .stack, .module-body .website-epk-layout > aside.stack { gap: var(--space-4); min-width: 0; }
.module-body .website-epk-link { display: grid; min-width: 0; overflow-wrap: anywhere; }
.module-body .website-epk-photos { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.module-body .website-domain-layout { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); align-items: start; }
.module-body .website-domain-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.module-body .website-domain-steps > li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) 0; border-bottom: var(--border-frame) solid var(--color-border); min-width: 0; }
.module-body .website-step-number { display: grid; width: var(--size-touch); height: var(--size-touch); place-items: center; border: var(--border-frame) solid var(--color-frame); background: var(--color-surface); font-family: var(--font-display); font-weight: var(--weight-black); }
.module-body .website-domain-steps > li.is-done .website-step-number { background: var(--color-accent-fill); color: var(--color-text-on-accent); }
.module-body .website-domain-steps > li.is-current .website-step-number { background: var(--color-highlight); color: var(--color-on-highlight); }
.module-body .website-step-content { display: grid; gap: var(--space-2); min-width: 0; }
.module-body .website-step-content .copy-field { min-width: 0; }
.module-body .website-domain-form { display: grid; gap: var(--space-3); }
@media (max-width: 768px) {
  .module-body .website-date-layout, .module-body .website-domain-layout { grid-template-columns: minmax(0, 1fr); }
  .module-body .website-date-form { grid-template-columns: minmax(0, 1fr); }
  .module-body .website-date-form > .field, .module-body .website-date-form > .switch, .module-body .website-date-form > .btn { grid-column: 1 / -1; width: 100%; min-width: 0; }
  .module-body .website-date-form input[type="url"] { display: block; width: 100%; min-width: 0; }
  .module-body .website-date-feeds { margin-top: var(--space-4); }
  .module-body .website-date-feeds .copy-field { flex-direction: column; }
  .module-body .website-date-feeds .copy-field code { overflow-wrap: anywhere; }
  .module-body .website-date-feeds .copy-field .btn { border-width: var(--border-frame) 0 0; }
  .module-body .website-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .module-body .website-media-grid { grid-template-columns: minmax(0, 1fr); } }

/* Website theme page: preview and hex fixes (Rio review) */
.module-body .website-theme-preview { --site-on-accent: #ffffff; }
.module-body .website-theme-preview[data-theme="dark"] { --site-on-accent: #14110d; }
.module-body .website-color-input { box-sizing: border-box; width: 100%; }

/* Page creation/editor refinements (page-specific, shared tokens only). */
.module-body .website-page-new-layout { align-items: start; }
.module-body .website-page-new-layout .form-stack { display: grid; gap: var(--space-4); min-width: 0; }
.module-body .website-page-new-layout .form-actions { margin-top: 0; }
.module-body .website-page-new-layout .input-group { min-width: 0; }
.module-body .website-page-new-layout .input-addon { white-space: nowrap; }
.module-body .website-page-new-layout .field-meta { display: flex; justify-content: space-between; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--text-sm); }
.module-body .website-page-new-layout .field-meta > :last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.module-body .website-page-new-layout .is-over-limit { color: var(--color-danger); }
.module-body .block-editor-row[draggable="true"] { cursor: grab; }
.module-body .block-editor-row.is-dragging { opacity: 0.55; }
.module-body .block-editor-grip { cursor: grab; }
.module-body .website-block-editor-heading { margin-bottom: var(--space-2); }
.module-body .website-block-editor-heading .field-label { margin: 0; }
.module-body .website-block-count { color: var(--color-text-muted); font-size: var(--text-sm); }
.module-body .block-editor .block-editor-list { display: grid; gap: 0; margin: 0; padding: 0; border: var(--border-frame) solid var(--color-frame); list-style: none; }
.module-body .block-editor .block-editor-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) minmax(0, 1fr) repeat(3, auto); gap: var(--space-2); align-items: center; min-width: 0; padding: var(--space-2); border-bottom: var(--border-hair) solid var(--color-border); }
.module-body .block-editor .block-editor-row:last-child { border-bottom: 0; }
.module-body .block-editor .block-editor-row > .field { min-width: 0; grid-column: 3; }
.module-body .block-editor .block-editor-row > [data-list-editor-field="url"] { grid-column: 4; }
.module-body .block-editor .block-editor-row .field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.module-body .block-editor .block-editor-controls { display: contents; }
.module-body .block-editor .block-editor-controls > :nth-child(1) { grid-column: 1; }
.module-body .block-editor .block-editor-controls > :nth-child(2) { grid-column: 2; }
.module-body .block-editor .block-editor-controls > button:nth-of-type(1) { grid-column: 5; }
.module-body .block-editor .block-editor-controls > button:nth-of-type(2) { grid-column: 6; }
.module-body .block-editor .block-editor-controls > button:nth-of-type(3) { grid-column: 7; }
@media (min-width: 1025px) {
  /* One predictable desktop toolbar for every block kind; fields start below it. */
  .module-body .block-editor .block-editor-row {
    grid-template-columns: var(--size-touch) 12rem repeat(3, var(--size-touch)) minmax(0, 1fr);
  }
  .module-body .block-editor .block-editor-controls { display: contents; }
  .module-body .block-editor .block-editor-controls > .block-editor-grip { display: block; grid-column: 1; }
  .module-body .block-editor .block-editor-controls > .block-editor-type-select {
    grid-column: 2;
    width: 12rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .module-body .block-editor .block-editor-controls > button:nth-of-type(1) { grid-column: 3; }
  .module-body .block-editor .block-editor-controls > button:nth-of-type(2) { grid-column: 4; }
  .module-body .block-editor .block-editor-controls > button:nth-of-type(3) { grid-column: 5; }
  .module-body .block-editor .block-editor-row > .field {
    grid-column: 2 / -1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .module-body .block-editor .block-editor-row > .field .input,
  .module-body .block-editor .block-editor-row > .field .textarea {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}
.module-body .block-editor-type-select, .module-body .block-editor-type { width: auto; min-width: 6rem; min-height: var(--size-touch); padding: var(--space-1) var(--space-2); border: var(--border-frame) solid var(--color-frame); background: var(--color-surface); color: var(--color-text); font-family: var(--font-display); font-weight: var(--weight-bold); text-transform: uppercase; }
.module-body .block-editor-icon { display: inline-grid; width: var(--size-touch); height: var(--size-touch); box-sizing: border-box; flex: 0 0 var(--size-touch); place-items: center; border: var(--border-frame) solid var(--color-frame); background: var(--color-surface); color: var(--color-text); }
.module-body .block-editor-icon:disabled { cursor: not-allowed; opacity: 0.45; }
.module-body .website-block-add-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.module-body .website-block-add-actions .btn { white-space: nowrap; }
@media (min-width: 769px) and (max-width: 1024px) {
  .module-body .block-editor .block-editor-row:has([data-list-editor-field="url"]:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .module-body .block-editor .block-editor-row:has([data-list-editor-field="url"]:not([hidden])) > .block-editor-controls {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    gap: var(--space-2);
  }
  .module-body .block-editor .block-editor-row:has([data-list-editor-field="url"]:not([hidden])) > .field {
    grid-row: auto;
    grid-column: auto;
    width: 100%;
  }
  .module-body .block-editor .block-editor-row:has([data-list-editor-field="url"]:not([hidden])) > [data-list-editor-field="url"] {
    grid-column: auto;
  }
}
@media (max-width: 1024px) and (min-width: 769px) {
  .module-body .block-editor .block-editor-row { grid-template-columns: auto minmax(0, 1fr); }
  .module-body .block-editor .block-editor-row > .field { grid-column: 1 / -1; }
  .module-body .block-editor .block-editor-row .field-label { position: static; width: auto; height: auto; padding: 0; margin: 0 0 var(--space-1); overflow: visible; clip: auto; white-space: normal; border: 0; }
}
@media (max-width: 768px) {
  .module-body .website-page-new-layout { grid-template-columns: minmax(0, 1fr); }
  .module-body .block-editor .block-editor-row { grid-template-columns: auto auto repeat(3, var(--size-touch)); }
  .module-body .block-editor .block-editor-row > .field { grid-column: 1 / -1; width: 100%; }
  .module-body .block-editor .block-editor-controls > button:nth-of-type(1) { grid-column: 3; grid-row: 1; }
  .module-body .block-editor .block-editor-controls > button:nth-of-type(2) { grid-column: 4; grid-row: 1; }
  .module-body .block-editor .block-editor-controls > button:nth-of-type(3) { grid-column: 5; grid-row: 1; }
  .module-body .block-editor .block-editor-row .field-label { position: static; width: auto; height: auto; padding: 0; margin: 0 0 var(--space-1); overflow: visible; clip: auto; white-space: normal; border: 0; }
  .module-body .block-editor .block-editor-row .field input,
  .module-body .block-editor .block-editor-row .field textarea { display: block; box-sizing: border-box; width: 100%; min-width: 0; }
  .module-body .block-editor .block-editor-row > [data-list-editor-field="url"] { grid-column: 1 / -1; }
}

.availability-poll-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.availability-poll-details { min-width: 0; }
.availability-past-warning { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); }
.availability-inline-answer { display: grid; justify-items: end; gap: var(--space-2); }
.availability-inline-answer .answer-set button { min-width: 3.5rem; }
.availability-detail-layout { grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 1fr); align-items: start; }
.availability-detail-side { gap: var(--space-4); min-width: 0; }
.availability-member-list { border: 0; margin: 0 calc(-1 * var(--space-4)) calc(-1 * var(--space-4)); }
.availability-member-copy { min-width: 0; }
.availability-member-list .list-row-end { display: flex; align-items: center; gap: var(--space-2); }
.availability-answer-form { display: grid; gap: var(--space-3); }
.availability-answer-form .answer-set { display: flex; width: 100%; }
.availability-answer-form .answer-set button { flex: 1; }
.availability-answer-form > .btn { justify-self: start; }
@media (max-width: 768px) {
  .availability-detail-layout { grid-template-columns: minmax(0, 1fr); }
  .availability-member-list .list-row { grid-template-columns: auto minmax(0, 1fr); }
  .availability-member-list .list-row-end { grid-column: 2; justify-self: start; flex-wrap: wrap; }
}
.change-inbox-gig-filter { display: flex; align-items: end; gap: var(--space-3); min-width: 0; }
.change-inbox-gig-filter > .field { flex: 1 1 16rem; min-width: 12rem; max-width: 24rem; }
.change-inbox-gig-filter > .btn { align-self: end; }
.change-inbox-list .change-inbox-entry { grid-template-columns: auto minmax(0, 1fr) auto; }
.change-inbox-filter .segmented-item[aria-current="page"] { background: var(--color-inverse); color: var(--color-on-inverse); }
.change-inbox-entry-copy { min-width: 0; }
.reminder-times { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: 0; }
.reminder-times > div { display: inline-flex; gap: var(--space-1); }
.reminder-times dt { font-weight: var(--weight-semibold); }
.reminder-times dd { margin: 0; font-variant-numeric: tabular-nums; }
.change-inbox-entry .meta-line { flex-wrap: wrap; font-size: var(--text-xs); }
.change-inbox-entry .meta-line > * { white-space: nowrap; }
.reminder-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.reminder-copy { min-width: 0; }
@media (max-width: 768px) {
  .change-inbox-filter { align-items: stretch; flex-direction: column; }
  .change-inbox-gig-filter { width: 100%; flex-wrap: nowrap; }
  .change-inbox-gig-filter > .field { flex: 1 1 0; min-width: 0; max-width: none; }
  .change-inbox-gig-filter > .btn { flex: 0 0 auto; white-space: nowrap; }
  .change-inbox-list .change-inbox-entry, .reminder-row { grid-template-columns: auto minmax(0, 1fr); }
  .change-inbox-entry > .btn, .reminder-row > .btn { grid-column: 2; justify-self: start; }
}
@media (max-width: 768px) {
  .availability-poll-row { grid-template-columns: auto minmax(0, 1fr); }
  .availability-inline-answer { grid-column: 1 / -1; justify-items: start; width: 100%; }
  .availability-inline-answer .answer-set { width: 100%; }
  .availability-inline-answer .answer-set button { flex: 1; }
}
/* Band coordination availability section rhythm and full-page evidence sidebar stretch. */
.availability-poll-section + .availability-poll-section { margin-top: var(--space-6); }
.availability-conflict-warning { margin-bottom: var(--space-3); }
@media (min-width: 769px) {
  .filter-bar:has(> .segmented[role="group"]).change-inbox-filter { display: flex; align-items: center; justify-content: flex-start; gap: var(--space-3); }
  .filter-bar.change-inbox-filter > .segmented { flex: 0 0 auto; }
}
.change-inbox-filter .segmented-item { min-height: 40px; }
.change-inbox-comparison { display: inline-flex; gap: var(--space-2); margin-inline-start: var(--space-2); align-items: baseline; }
.change-inbox-values { display: inline-flex; gap: var(--space-2); white-space: nowrap; }
.change-inbox-comparison[data-field="venue"] .change-inbox-values { white-space: normal; overflow-wrap: break-word; }
.change-inbox-before { color: var(--color-text-secondary); font-weight: var(--weight-regular); }
@media (max-width: 768px) {
  .change-inbox-comparison { display: flex; width: 100%; min-width: 0; margin: var(--space-2) 0 0; flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .change-inbox-values { max-width: 100%; white-space: nowrap; }
  .change-inbox-values strong { white-space: inherit; overflow-wrap: inherit; }
}
.reminder-row .list-row-end { display: flex; align-items: center; gap: var(--space-2); }
@media (max-width: 768px) {
  .reminder-row .list-row-end { grid-column: 2; justify-self: start; flex-wrap: wrap; }
  .reminder-times > div { white-space: nowrap; }
  .reminder-times > * + *::before { display: none !important; }
}

.list-row.availability-poll-row { align-items: start; }

.epk-form-layout { grid-template-columns: minmax(0, 2.4fr) minmax(16rem, 1fr); }
.epk-form-layout > .form-stack { display: grid; gap: var(--space-5); min-width: 0; }
.epk-form-card { min-width: 0; }
.epk-form-card .form-grid { min-width: 0; }
.module-body .block-editor .epk-link-row { grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; }
.module-body .block-editor .epk-link-row .field-label { position: static; width: auto; height: auto; padding: 0; margin: 0 0 var(--space-1); overflow: visible; clip: auto; white-space: normal; border: 0; }
.module-body .block-editor .epk-link-row > .epk-link-fields { grid-column: 2; min-width: 0; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: end; }
.module-body .block-editor .epk-link-row > .menu-wrap { grid-column: 3; }
/* Keep an opened row menu from covering the following URL and add control. */
.module-body .block-editor .epk-link-row > .menu-wrap > .menu { top: auto; bottom: calc(100% + var(--space-2)); }
.module-body .block-editor .epk-link-row .block-handle { cursor: grab; }
@media (max-width: 768px) {
  .module-body .block-editor .epk-link-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .module-body .block-editor .epk-link-row > .epk-link-fields { grid-column: 1 / -1; grid-row: 2; width: 100%; grid-template-columns: minmax(0, 1fr); }
  .module-body .block-editor .epk-link-row > .epk-link-fields > .field { grid-column: 1 / -1; min-width: 0; }
  .module-body .block-editor .epk-link-row > .menu-wrap { grid-column: 3; grid-row: 1; }
}
.epk-counter { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.epk-readiness { display: grid; gap: var(--space-5); min-width: 0; }
.website-epk-photo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: var(--space-3); margin-bottom: var(--space-3); }
.website-epk-photo-tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); min-width: 0; padding: var(--space-2); border: var(--border-frame) solid var(--color-frame); }
.website-epk-photo-tile input { grid-column: 1; grid-row: 2; width: var(--size-touch); height: var(--size-touch); }
.website-epk-photo-tile .website-asset-thumbnail { grid-column: 1 / -1; grid-row: 1; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.epk-photo-name { grid-column: 2; grid-row: 2; display: grid; min-width: 0; overflow-wrap: anywhere; }
.website-epk-photo-tile > .btn { grid-column: 3; grid-row: 2; }
.epk-form-layout .epk-readiness-steps > li { display: grid; grid-template-columns: var(--size-touch) minmax(0, 1fr); align-items: center; gap: var(--space-2); }
.epk-form-layout .epk-readiness-steps > li::before, .epk-form-layout .epk-readiness-steps > li.is-done::before, .epk-form-layout .epk-readiness-steps > li.is-next::before, .epk-form-layout .epk-readiness-steps > li.is-upcoming::before { content: none; display: none; }
.epk-readiness-marker { display: grid; width: var(--size-touch); height: var(--size-touch); place-items: center; border: var(--border-frame) solid var(--color-frame); background: var(--color-surface); }
.epk-readiness-steps li.is-done .epk-readiness-marker { color: var(--color-text-on-accent); background: var(--color-accent-fill); border-color: var(--color-accent-fill); }
.epk-readiness-steps li.is-next .epk-readiness-marker { color: var(--color-on-highlight); background: var(--color-warning-subtle); }
.epk-dropzone { position: relative; }
.epk-dropzone input[type="file"] { inset: 0; width: 100%; height: 100%; cursor: pointer; }
.epk-form-layout .steps li { min-width: 0; overflow-wrap: normal; }
@media (max-width: 1024px) { .epk-form-layout { grid-template-columns: minmax(0, 1fr); } .epk-readiness { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .epk-form-card .form-grid { grid-template-columns: minmax(0, 1fr); } .epk-form-card .span-2 { grid-column: auto; } }

/* Designer review: Settings team and Website theme page geometry. */
.module-body .team-permissions-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--space-5); align-items: start; }
.module-body .team-people { min-width: 0; }
.module-body .team-member-row { grid-template-columns: var(--size-touch) minmax(0, 1fr) auto; gap: var(--space-3); min-height: 7.125rem; align-items: center; }
.module-body .team-member-row.team-owner-row { min-height: 4.375rem; }
.module-body .team-member-copy { min-width: 0; }
.module-body .team-member-copy .list-row-title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.module-body .team-member-controls { display: grid; justify-items: end; align-content: center; gap: var(--space-2); min-width: 0; }
.module-body .team-member-controls form { width: 12.75rem; margin: 0; }
.module-body .team-member-controls .select { width: 100%; min-width: 0; }
.module-body .team-member-row.team-owner-row .team-member-controls { display: flex; }
.module-body .team-member-row.team-owner-row .team-owner-locked { display: inline-flex; align-items: center; width: 10rem; min-width: 10rem; flex: 0 0 10rem; color: var(--color-text-muted); }
.module-body .team-pending-heading { margin-top: calc(var(--space-5) + var(--space-3)); }
.module-body .team-invite-column { gap: var(--space-5); }
.module-body .team-invite-column > .team-invite-card,
.module-body .team-invite-column > .card { width: 100%; min-width: 0; box-sizing: border-box; }
.module-body form.team-invite-form { display: grid; width: 100%; min-width: 0; box-sizing: border-box; gap: var(--space-4); }
.module-body form.team-invite-form > .form-grid { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.module-body form.team-invite-form .field { width: 100%; min-width: 0; }
.module-body form.team-invite-form .input,
.module-body form.team-invite-form .select { width: 100%; min-width: 0; box-sizing: border-box; }
.module-body .team-invite-card .form-actions { justify-content: flex-end; }
.module-body .team-roles-list { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.module-body .team-roles-list > div { border: 0; }
.module-body .team-roles-list dd { font-weight: var(--weight-regular); }
.module-body.website-theme-layout { display: block; }
.module-body.website-theme-layout > .layout-split-wide { width: 100%; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-5); }
.module-body.website-theme-layout > .layout-split-wide > * { min-width: 0; }
.module-body [data-testid="team-invitations"] > .list-row { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.module-body.website-theme-layout .website-stack { gap: var(--space-5); }
.module-body.website-theme-layout .website-stack > .card + .card { margin-top: 0; }
.module-body.website-theme-layout .website-stack > .card,
.module-body.website-theme-layout .website-editor-preview > * { width: 100%; min-width: 0; box-sizing: border-box; }
.module-body.website-theme-layout .website-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.module-body.website-theme-layout .website-template-option { min-width: 0; }
.module-body.website-theme-layout .website-template-option > strong,
.module-body.website-theme-layout .website-template-option > span:last-child { overflow-wrap: anywhere; }
.module-body .settlement-detail-grid .segmented.is-block { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.module-body .settlement-detail-grid .segmented.is-block > .segmented-item { min-width: 0; white-space: normal; }
.module-body .settlement-payout-form .form-actions { grid-column: 1 / -1; justify-content: flex-end; }
.module-body .settlement-ledger-card > .table-scroll { margin: 0; }
@media (max-width: 900px) {
  .module-body .team-permissions-layout,
  .module-body.website-theme-layout > .layout-split-wide { grid-template-columns: minmax(0, 1fr); }
  .module-body .team-permissions-layout > aside { order: -1; }
  .module-body.website-theme-layout .website-editor-preview { position: static; }
}
@media (max-width: 768px) {
  .module-body.website-theme-layout .website-color-grid,
  .module-body.website-theme-layout .website-template-picker { grid-template-columns: minmax(0, 1fr); }
}
