/* PoliciesRules.css -- scoped layout for sub-tab content.
   Sub-tab nav uses SegmentedControl; page structure uses VerticalStackTemplate;
   sub-tab panels use Panel; cards use Card; banners use StatusBanner;
   access tags use Badge. Only bespoke layouts live here.
*/

/* The module is a fixed frame: it fills the .tab-content-container scroll region
   (flex:1 / min-height:0) so the pinned header stays put and only .policies-rules-body
   scrolls -- the sub-tab nav never scrolls away. */
.policies-rules-module {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    flex: 1;
    min-height: 0;
}

/* Pinned header row: sub-tab nav on the left, the active sub-tab's Save/Reset on
   the right. flex:0 0 auto keeps it fixed above the scrolling body. */
.policies-rules-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex: 0 0 auto;
    flex-wrap: wrap;
    row-gap: var(--space-2);
}

.policies-rules-sub-tabs {
    display: flex;
}

.policies-rules-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 0 0 auto;
}

/* The single scroll region for module content. Each sub-tab's panels scroll here;
   Rate Mapping's two panes fill it exactly and scroll independently within it. */
.policies-rules-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* House Rules form -- sections stacked inside Panel.content.
   VerticalStackTemplate owns the column layout; this class is a typography scope:
   the Panel title carries the weight, field labels read at regular weight so
   hierarchy comes from size + colour, not bold. */

.policies-rules-house .form-label,
.policies-rules-house .switch-label {
    font-weight: var(--font-weight-normal);
}

/* Entitlement Behaviour: two Switch settings + the min-nights field, evenly spaced. */
.policies-rules-house .policies-rules-fieldstack {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Beverage cell (Board Types): policy Badge + muted caption on one line. */
.policies-rules-bev {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

/*
 * Inline field layout for the non-numeric House Rules fields (the same-day time
 * input, the Group Exclusion scope SegmentedControl). Row shape: [label][control]
 * packed left with help wrapping onto its own line beneath -- matching the
 * NumberField molecule the numeric rows use, so the whole panel reads consistently.
 * Numeric fields do NOT use this; they use NumberField.
 */
.policies-rules-module .form-field-inline {
    align-items: center;
    flex-wrap: wrap;
    column-gap: var(--space-3);
    row-gap: var(--space-1_5);
}

/* Label sits left at natural width -- no fixed gutter; control packs next to it. */
.policies-rules-module .form-field-inline .form-label {
    flex: 0 1 auto;
}

.policies-rules-module .form-field-inline .input-wrapper {
    flex: 0 0 auto;
    width: auto;
}

.policies-rules-module .form-field-inline .input-wrapper .input {
    width: auto;
    min-width: var(--space-20);
}

.policies-rules-module .form-field-inline .segmented-control {
    flex: 0 0 auto;
}

/* Help sits inline on the same row, after the control (matches NumberField). */
.policies-rules-module .form-field-inline .form-message {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: var(--line-height-normal);
}

@media (max-width: 768px) {
    .policies-rules-module .form-field-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-1);
    }
    .policies-rules-module .form-field-inline .form-label,
    .policies-rules-module .form-field-inline .input-wrapper,
    .policies-rules-module .form-field-inline .segmented-control,
    .policies-rules-module .form-field-inline .form-message {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Stay Brackets: transposed 4-col editor. First column is the row label
   ("Min nights" / "Max nights"), remaining 3 columns hold the bracket values
   per SHORT / MEDIUM / LONG. */

.policies-rules-brackets {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.policies-rules-brackets__row {
    display: grid;
    grid-template-columns: 120px repeat(3, 100px); /* grid-column widths for tabular alignment, no token suite */
    gap: var(--space-3);
    align-items: center;
}

/* Bracket code cells centre a neutral Badge; the axis corner + Min/Max labels
   read as quiet captions (hierarchy via colour, not bold). */
.policies-rules-brackets__col-code {
    display: flex;
    justify-content: center;
}

.policies-rules-brackets__row-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--font-weight-normal);
}

/* Bound the input wrapper to the 100px cell so the box matches the short value. */
.policies-rules-brackets__col-num .input-wrapper {
    width: 100%;
}

/* Rates tab host (sub-tab nav + active sub-view), lifted from PoliciesRules. */
.rates-module {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.rates-sub-tabs {
    display: flex;
}

/* Modal body stack (Modal organism has no body gap) */

.policies-rules-modal-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.policies-rules-modal-sub {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.policies-rules-modal-danger {
    display: flex;
    justify-content: flex-start;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

/* Card list (Restaurant / Facility rules) */

.policies-rules-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.policies-rules-card__rules {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.policies-rules-card__empty {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-style: italic;
}

/* Single rule row inside a Card */

.policies-rules-rule-row {
    display: grid;
    grid-template-columns: 80px 100px 130px 1fr; /* grid-column widths for tabular alignment, no token suite */
    gap: var(--space-2);
    align-items: center;
    font-size: var(--text-xs);
    color: var(--text-body);
}

.policies-rules-rule__roomcat {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.policies-rules-rule__hint {
    color: var(--text-secondary);
}

/* Entitlement matrix (TLP-042 / TLP-555) -- a CSS grid + subgrid, not an HTML table:
   the outer __grid owns the column template (Restaurant | Mode | Short | Medium | Long)
   and every section / row / group-card / member spans it via `grid-template-columns:
   subgrid`, so columns stay aligned everywhere. Pools + dining groups render as nested
   bordered/tinted cards whose members sit inside, indented. Tokens only; the two column
   widths (name / mode) are intentional layout widths, matching the rate-table
   convention elsewhere in this file. */

.policies-rules-ent {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.policies-rules-ent__slider {
    display: flex;
}

.policies-rules-ent__wrap {
    overflow-x: auto;
}

/* The outer grid. Columns: Restaurant (flexible) | Mode | Short | Medium | Long | actions.
   Row actions (remove / delete) sit in the trailing column, per the DataTable convention
   (ControlsView's `_actions` is the last column) -- never beside the name.
   min-width keeps the tabular shape while __wrap scrolls it on narrow viewports. */
.policies-rules-ent__grid {
    display: grid;
    grid-template-columns: minmax(220px, 2.4fr) 158px 1fr 1fr 1fr 44px; /* name + mode + actions layout widths, no token suite */
    min-width: 684px; /* preserve the tabular shape; __wrap scrolls when narrower */
    font-size: var(--text-sm);
    align-items: center;
}
/* Facilities are simpler: name + one entitlement column, no brackets/containers. */
.policies-rules-ent__grid--facility {
    grid-template-columns: minmax(220px, 2.4fr) 1fr;
    min-width: 0;
}

/* Header row -- spans the grid, inherits its columns via subgrid. */
.policies-rules-ent__thead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}
.policies-rules-ent__thead > * {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
/* Bracket headers centre over their (centred) count cells. */
.policies-rules-ent__grid:not(.policies-rules-ent__grid--facility) .policies-rules-ent__thead > .policies-rules-ent__col {
    text-align: center;
}

.policies-rules-ent__collabel {
    display: block;
    color: var(--text-primary);
}
.policies-rules-ent__colrange {
    display: block;
    font-size: var(--text-2xs);
    color: var(--text-tertiary);
    text-transform: none;
    letter-spacing: 0;
}

/* Standalone data row -- spans the grid, columns via subgrid. */
.policies-rules-ent__row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}
.policies-rules-ent__row > * {
    padding: var(--space-2) var(--space-3);
    min-width: 0;
}

/* Section divider (Main dining / A la carte) -- eyebrow label + rule + create actions. */
.policies-rules-ent__section {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-3) var(--space-2);
    flex-wrap: wrap;
}
.policies-rules-ent__section-label {
    font-size: var(--text-2xs);
    font-weight: var(--font-weight-bold);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.policies-rules-ent__section-rule {
    flex: 1;
    height: var(--border-width-1);
    background: var(--border-subtle);
}
.policies-rules-ent__section-actions {
    display: inline-flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

/* Hint row (empty A la carte) -- spans the grid. */
.policies-rules-ent__hint-row {
    grid-column: 1 / -1;
    padding: var(--space-2) var(--space-3);
}
.policies-rules-ent__hintrow {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-style: italic;
}

/* Name cell: label + optional remove-x, side by side. */
.policies-rules-ent__name {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.policies-rules-ent__name-label {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

/* Mode cell = the row's primary control: a light PERMANENT border on the select. */
.policies-rules-ent__mode .input-wrapper {
    width: 100%;
}
.policies-rules-ent__gkind {
    color: var(--text-muted);
    white-space: nowrap;
    font-size: var(--text-xs);
}

/* Blocked / muted placeholder in a spanning cell. */
.policies-rules-ent__muted {
    color: var(--text-tertiary);
    font-style: italic;
}

/* ---- Nested container cards: a pool / dining group is a real bordered, subtly tinted
   CARD spanning the grid; its header + members sit inside via subgrid so columns stay
   aligned. Members are indented (a small connector ties them to the card). ---- */
.policies-rules-ent__group {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    border: var(--border-width-1) solid var(--border-default);
    border-radius: var(--border-radius-xl);
    background: var(--bg-muted);
    overflow: hidden;
}
/* A pool nested inside a dining group reads one layer deeper. */
.policies-rules-ent__group--nested {
    border-color: var(--border-strong);
}

/* Card header (shared total / choose) -- raised fill, prominent title. */
.policies-rules-ent__ghead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    background: var(--bg-surface-active);
    border-bottom: var(--border-width-1) solid var(--border-default);
}
.policies-rules-ent__ghead > * {
    padding: var(--space-2) var(--space-3);
    min-width: 0;
}
.policies-rules-ent__gname {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}
.policies-rules-ent__gname-label {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}
.policies-rules-ent__gactions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
}
/* Inline rename box is a direct .input-wrapper child of the header name cluster. */
.policies-rules-ent__gname > .input-wrapper {
    width: 160px; /* inline rename box, no token suite */
}
.policies-rules-ent__gname > .input-wrapper .input {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}
/* Add-restaurant dropdown is wrapped in .addsel. */
.policies-rules-ent__addsel .input-wrapper {
    width: 150px; /* add-restaurant dropdown, no token suite */
}

/* Member row inside a card -- spans the grid, columns via subgrid, indented name. */
.policies-rules-ent__member {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
}
.policies-rules-ent__member:not(:last-child) {
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}
.policies-rules-ent__member > * {
    padding: var(--space-2) var(--space-3);
    min-width: 0;
}
/* Member name reads subordinate + is indented, with a small connector to the card. */
.policies-rules-ent__name--member {
    padding-left: var(--space-6);
    position: relative;
}
.policies-rules-ent__name--member .policies-rules-ent__name-label,
.policies-rules-ent__memberrow .policies-rules-ent__name-label {
    font-weight: var(--font-weight-normal);
    color: var(--text-tertiary);
}
.policies-rules-ent__name--member::before {
    content: "";
    position: absolute;
    left: var(--space-3);
    top: 50%;
    width: var(--space-2);
    height: var(--border-width-1);
    background: var(--text-light);
}
/* A restaurant standalone-row that happens to be a group member (dining-group venue). */
.policies-rules-ent__memberrow .policies-rules-ent__name {
    padding-left: var(--space-6);
}

/* Cell = flex track. Its gap spaces the mode-extra spans (meals / pct / note) from
   any sibling; the spans no longer carry their own margins. Count / defer / choose
   selects stay QUIET (transparent frame) and gain a frame on hover/focus. */
.policies-rules-ent__cell {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.policies-rules-ent__cell .input-wrapper {
    width: auto;
    display: inline-flex;
}
/* Bracket count / sub-cap / choose cells sit centred under their header. */
.policies-rules-ent__grid:not(.policies-rules-ent__grid--facility) .policies-rules-ent__row > .policies-rules-ent__cell,
.policies-rules-ent__ghead > .policies-rules-ent__cell,
.policies-rules-ent__member > .policies-rules-ent__cell {
    justify-content: center;
}
/* A non-quota row (included / discount / paid / not-available) carries one cell
   across every bracket column instead of per-bracket counts. The table build did
   this with colspan; under grid it needs an explicit span, left-aligned like the
   colspan cell was -- it holds chips/prose, not a number to line up. Must beat the
   centring rule above, hence the matching specificity. */
.policies-rules-ent__grid:not(.policies-rules-ent__grid--facility) .policies-rules-ent__row > .policies-rules-ent__cell--span,
.policies-rules-ent__ghead > .policies-rules-ent__cell--span,
.policies-rules-ent__member > .policies-rules-ent__cell--span {
    grid-column: 3 / -2; /* bracket columns ONLY -- must not swallow the actions column */
    justify-content: flex-start;
}

/* Trailing actions column: icon buttons, right-aligned, one per row. */
.policies-rules-ent__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Quiet-but-discoverable count/defer/choose selects: transparent frame by default,
   a visible frame appears on hover / focus. The Mode select is excluded -- it keeps
   the atom's permanent border as the row's primary control. */
.policies-rules-ent__cell .input-wrapper .input {
    border-color: transparent;
    background: transparent;
}
.policies-rules-ent__cell .input-wrapper:hover .input {
    border-color: var(--border-default);
    background: var(--bg-surface);
}
/* Keyboard focus must stay unmistakable: keep the atom's focus colour (the rule above
   would otherwise flatten it to the neutral hover border, since the quiet-cell base
   rule outranks the atom's own .input:focus). The atom's focus ring shadow rides on
   top -- it is deliberately not overridden here. */
.policies-rules-ent__cell .input-wrapper .input:focus,
.policies-rules-ent__cell .input-wrapper .input:focus-visible {
    border-color: var(--border-focus);
    background: var(--bg-surface);
}

.policies-rules-ent__meals {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
}
.policies-rules-ent__pct {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
}
.policies-rules-ent__pct .input-wrapper {
    width: 72px; /* compact percent/number, no token suite */
}
.policies-rules-ent__note {
    display: inline-flex;
}
.policies-rules-ent__note .input-wrapper {
    width: 200px; /* note free-text, no token suite */
}

/* Setup empty state with a call-to-action button beneath the EmptyState. Centred
   column; gap-only spacing (the EmptyState already centres its own content). */
.policies-rules-ent__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

/* Inline-editable draft table (Rules modal) -- no atom covers per-row
   input rendering driven by row state */

.policies-rules-draft-table {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.policies-rules-draft-table__header,
.policies-rules-draft-row {
    display: grid;
    grid-template-columns: 140px 130px 1fr 80px; /* grid-column widths for tabular alignment, no token suite */
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-2);
    font-size: var(--text-xs);
}

.policies-rules-draft-table__header {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}

.policies-rules-draft-row {
    border-radius: var(--border-radius-sm);
}

.policies-rules-draft-table__add {
    display: flex;
    justify-content: flex-start;
    padding-top: var(--space-2);
}

.policies-rules-draft-row__details {
    min-width: 0;
}

.policies-rules-draft-row__muted {
    color: var(--text-muted);
    font-style: italic;
}

/* Quota triplet + pool picker (Restaurant rules draft) */

.policies-rules-quota-cell {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.policies-rules-quota-cell__triplet {
    display: grid;
    grid-template-columns: repeat(3, 56px); /* grid-column width: compact number inputs, no token suite */
    gap: var(--space-1);
}

.policies-rules-quota-cell__pool {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.policies-rules-quota-cell__label {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.policies-rules-meal-cell {
    display: flex;
    gap: var(--space-2);
}

/* Facility rules limit cell */

.policies-rules-limit-cell {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
}

.policies-rules-limit-cell__max {
    width: 72px; /* grid-column width: compact number input, no token suite */
}

/* Restaurant picker modal (Panel-level "+ Rule" flow) */

.policies-rules-picker {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.policies-rules-picker__item {
    display: grid;
    grid-template-columns: 1fr 120px auto; /* grid-column widths for name/type/badge layout, no token suite */
    gap: var(--space-2);
    align-items: center;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-surface);
    border: var(--border-width-1) solid var(--border-subtle);
    border-radius: var(--border-radius-sm);
    font-size: var(--text-sm);
    text-align: left;
    cursor: pointer;
}

.policies-rules-picker__item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-strong);
}

.policies-rules-picker__name {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.policies-rules-picker__type {
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

/* Edit-meta link inside the rules modal */

.policies-rules-modal__meta-link {
    display: inline-block;
    font-size: var(--text-xs);
    color: var(--color-accent, var(--color-primary, var(--text-primary)));
    text-decoration: underline;
}

.policies-rules-modal__meta-link:hover {
    text-decoration: none;
}

/* Loyalty Benefits (Tab 5) -- tier panels use ExpandablePanel;
   benefit rows use DataTable. Minimal additions needed. */

.policies-rules-loyalty-tier .expandable-panel-content {
    padding: var(--space-3);
}

.policies-rules-loyalty-tier .data-table-container {
    border: none;
}

.policies-rules-loyalty-tier .table-cell-actions {
    display: flex;
    gap: var(--space-1);
    justify-content: flex-end;
}

/* Late Checkout (Tab 6) -- Seasons editor + per-room price modal.
   The Rates matrix + Room Upgrades matrix + their tier/season sliders now render
   via the shared SlicedPlane organism (styles/organisms/SlicedPlane). Only the
   bespoke Seasons editor, the modal price tables, and consumer-specific cell
   classes live here. */

/* Seasons: inline-editable rows [label | from | to | remove] */

.policies-rules-lc-seasons {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.policies-rules-lc-seasons__header,
.policies-rules-lc-seasons__row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 150px 150px 80px; /* grid-column widths for tabular alignment, no token suite */
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-1) var(--space-2); /* tight vertical for a dense rows list */
    font-size: var(--text-xs);
}

.policies-rules-lc-seasons__header {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}

.policies-rules-lc-seasons__row .input-wrapper {
    width: 100%;
}

/* From/To DatePickers fill their grid column like the text Input above. */
.policies-rules-lc-seasons__row .date-picker {
    width: 100%;
}

.policies-rules-lc-seasons__remove {
    display: flex;
    justify-content: flex-end;
}

/* Checkout-time tiers: inline-editable rows [time | remove], mirrors seasons. */

.policies-rules-lc-tiers {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.policies-rules-lc-tiers__header,
.policies-rules-lc-tiers__row {
    display: grid;
    grid-template-columns: minmax(120px, 200px) 80px; /* grid-column widths for tabular alignment, no token suite */
    gap: var(--space-2);
    align-items: center;
    padding: var(--space-1) var(--space-2); /* tight vertical for a dense rows list */
    font-size: var(--text-xs);
}

.policies-rules-lc-tiers__header {
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: var(--border-width-1) solid var(--border-subtle);
}

.policies-rules-lc-tiers__row .input-wrapper {
    width: 100%;
}

.policies-rules-lc-tiers__remove {
    display: flex;
    justify-content: flex-end;
}

/* Per-room price table (modal body). The read-view matrix moved to SlicedPlane;
   these classes style the editor tables inside the per-room / per-from-room
   modals. The roomcell/room-label pair is reused by the upgrade modal's to-room
   label cell. */

.policies-rules-lc-pricetable-wrap {
    overflow-x: auto;
}

.policies-rules-lc-pricetable {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.policies-rules-lc-pricetable th,
.policies-rules-lc-pricetable td {
    padding: var(--space-2);
    border-bottom: var(--border-width-1) solid var(--border-subtle);
    text-align: left;
}

.policies-rules-lc-pricetable th {
    font-size: var(--text-xs);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.policies-rules-lc-table__roomcell {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.policies-rules-lc-table__room-label {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.policies-rules-lc-pricetable__season {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    white-space: nowrap;
}

.policies-rules-lc-pricetable .input-wrapper {
    width: 90px; /* grid-column width: compact price input, no token suite */
}

/* Upgrade matrix consumer-specific cell styling (passed to SlicedPlane as a cell
   className) + the upgrade modal's to-room code. */

.policies-rules-upg-na {
    color: var(--text-tertiary);
    text-align: center;
}

.policies-rules-upg-tocode {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Rate Mapping sub-tab: ONE panel (rate -> board grid) with a coverage-lens filter in
   its header (All | Unmapped | Broken | Unused boards). The fill wrapper makes the panel
   occupy the full module body so its header (title + filter) pins and the grid scrolls
   inside. Disabled placeholder covers the no-board-types state; the 'unused boards' lens
   lists board codes as badges. */

.rate-mapping-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rate-mapping-view > .dashboard-section {
    flex: 1;
    min-height: 0;
}

.rate-mapping-placeholder {
    display: flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    background: var(--bg-muted);
    border: var(--border-width-1) solid var(--border-subtle);
    border-radius: var(--border-radius-md);
}

/* Unused-boards lens: a guidance line + the board codes as badges. */
.rate-mapping-unused {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.rate-mapping-unused__hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin: 0;
}

.rate-mapping-unused__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}
