/* Open workspaces for setup, billing, branding and secure member access.
   Document canvases, dialogs, form controls and payment confirmations retain
   their own boundaries. These rules change presentation only. */
body:is(.house-account-shell, .auth-shell, .settlement-shell) {
    --wa-text: var(--ha-light-text);
    --wa-muted: var(--ha-muted);
    --wa-border: var(--ha-light-border);
    --wa-surface: var(--ha-light-surface);
}
html[data-house-account-theme="dark"] body:is(.house-account-shell, .auth-shell, .settlement-shell) {
    --wa-text: var(--ha-dark-text);
    --wa-muted: var(--ha-dark-muted);
    --wa-border: var(--ha-dark-border);
    --wa-surface: var(--ha-dark-surface);
}

/* Club setup and the operator directory use the existing navigation scope. */
/* Club boundaries are stronger than the dividers within each club. Each
   summary is followed by its settings row, including when settings are hidden. */
@media (min-width: 1361px) {
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row > td {
        border-top: 2px solid var(--ha-border-strong);
        padding-block: 20px;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row:nth-child(4n + 3) > td,
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row.is-expanded > td,
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-settings-row > td {
        background: var(--ha-surface-muted);
    }
}
@media (max-width: 1360px) {
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row {
        background: var(--ha-surface);
        border-color: var(--ha-border-strong);
        border-top-width: 2px;
        margin-bottom: 16px;
        padding: 18px;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row.is-expanded {
        background: var(--ha-surface-muted);
        border-bottom-color: transparent;
        margin-bottom: 0;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row > td {
        background: transparent;
        border-top: 0;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-summary-row:is(:hover, :focus-within) {
        background: var(--ha-surface-muted);
    }
    html[data-house-account-theme] body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page.us-reseller-page .ls-table .ls-club-summary-row:is(:hover, :focus-within) > td {
        background: transparent;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-settings-row {
        border-color: var(--ha-border-strong);
        margin-bottom: 16px;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-table .ls-club-settings-row > td {
        background: var(--ha-surface-muted);
        padding: 0 18px 18px;
    }
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-grid {
    gap: 40px;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
}
/* A sidebar remains a vertical reading flow when the main grid has two
   columns; the old intermediate breakpoint made three tiny columns here. */
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-grid > aside {
    display: block;
    border-inline-start: 1px solid var(--ha-border-strong);
    padding-inline-start: 24px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-grid > aside .ls-card-header {
    min-height: 0;
}
/* Separate the major setup sections without enclosing them in panels. */
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-grid > div > .ls-card ~ .ls-card,
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-grid > aside > .ls-card {
    border-top: 1px solid var(--ha-border-strong);
    padding-top: 20px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-grid > div > .ls-card ~ .ls-card > .ls-card-header,
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-grid > aside > .ls-card > .ls-card-header {
    border-bottom: 0;
}
html body.house-account-shell :is([data-house-account-active-nav~="us-lightspeed-clubs"], .ha-theme-page) .ls-header > .row {
    margin-inline: 0;
    row-gap: 16px;
}
html body.house-account-shell :is([data-house-account-active-nav~="us-lightspeed-clubs"], .ha-theme-page) .ls-header > .row > [class*="col-"] {
    padding-inline: 0;
}
html body.house-account-shell :is([data-house-account-active-nav~="us-lightspeed-clubs"], .ha-theme-page) .ls-header > .row::before,
html body.house-account-shell :is([data-house-account-active-nav~="us-lightspeed-clubs"], .ha-theme-page) .ls-header > .row::after {
    display: none;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page :is(.ls-config-field, .ls-filter-field, .ls-form-grid) label:not(.ls-checkbox) {
    line-height: 1.5;
    margin-bottom: 8px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-location-config .ls-config-field label:not(.ls-checkbox) {
    min-height: 36px;
}
/* Individual location forms retain their outline and an inset for labels. */
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-location-config > .ls-config-form {
    padding: 20px 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] :is(
    .ls-metric, .ls-payment-type-panel, .ls-detail-item, .ls-setup-panel,
    .monthly-readiness, .monthly-readiness-stage, .ls-process-status,
    .ls-process-status-main, .ls-process-step, .ls-process-job-row,
    .ks-source-panel, .club-debug-panel
) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-metric-grid {
    border-block: 1px solid var(--wa-border);
    gap: 24px;
    margin-bottom: 24px;
    padding: 20px 0;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-metric {
    padding: 0;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-metric-value {
    color: var(--wa-text);
    font-size: 22px;
    font-weight: 600;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] :is(
    .ls-payment-type-panel, .monthly-readiness, .ls-collection-policy-form
) {
    padding: 16px 0;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] :is(
    .monthly-readiness-stage, .ls-process-job-row, .ks-source-panel
) + :is(.monthly-readiness-stage, .ls-process-job-row, .ks-source-panel) {
    border-top: 1px solid var(--ha-border-strong) !important;
    margin-top: 16px;
    padding-top: 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] :is(
    .ls-process-status-main, .monthly-readiness-overview, .ls-process-job-row,
    .ks-source-panel-head, .ks-source-tools > summary, .ks-source-detail > summary
) {
    padding-left: 0;
    padding-right: 0;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] :is(
    .ks-source-panel-head, .club-debug-panel-heading
) {
    background: transparent !important;
    border-bottom: 1px solid var(--ha-border-strong);
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-card-copy {
    max-width: 78ch;
}

/* Group related controls within the open setup sections. Only the payment
   mapping form and existing location forms need a complete outline. */
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] #admin-connection-actions {
    padding-top: 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ks-source-panel > .ls-payment-type-panel {
    border: 1px solid var(--ha-border-strong) !important;
    margin-block: 20px;
    padding: 0;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ks-source-panel > .ls-payment-type-panel > .ls-payment-type-head {
    background: transparent;
    border-bottom-color: var(--ha-border-strong);
    padding: 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ks-source-panel > .ls-payment-type-panel > .ls-config-form {
    padding: 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page :is(.ls-location-config, .ls-location-config-head, .ks-source-tools, .ks-source-detail, .ks-source-detail-body) {
    border-color: var(--ha-border-strong);
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-location-config .ls-config-grid > .ls-checkbox-field:first-child {
    border-bottom: 1px solid var(--ha-border-strong);
    margin-bottom: 4px;
    padding-bottom: 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-collection-policy-form fieldset + fieldset {
    border-top: 1px solid var(--ha-border-strong);
    margin-top: 20px;
    padding-top: 20px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page :is(.ls-config-form > .ls-form-actions, .ls-collection-policy-footer) {
    border-top: 1px solid var(--ha-border-strong);
    margin-top: 20px;
    padding-top: 16px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .monthly-readiness-item {
    padding-block: 14px;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .monthly-readiness-item + .monthly-readiness-item {
    border-top: 1px solid var(--ha-border-strong);
    box-shadow: none;
}
html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .monthly-readiness-item p {
    margin-top: 6px;
}

/* Billing terms and consent stay together; their surrounding card disappears. */
html body.house-account-shell .billing-page :is(.billing-card, .billing-plan) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}
html body.house-account-shell .billing-page .billing-card-header {
    gap: 40px;
    padding: 0 0 24px;
}
html body.house-account-shell .billing-page .billing-plan {
    border-left: 1px solid var(--wa-border) !important;
    padding: 0 0 0 24px;
}
html body.house-account-shell .billing-page .billing-intro h2 {
    color: var(--wa-text);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: normal;
}
html body.house-account-shell .billing-page .billing-details {
    border-color: var(--wa-border);
    gap: 24px;
    padding: 20px 0;
}
html body.house-account-shell .billing-page .billing-details > div {
    border: 0;
    padding: 0;
}
html body.house-account-shell .billing-page .billing-actions {
    padding: 24px 0;
}
html body.house-account-shell .billing-page .billing-document-review {
    background: transparent;
    border-inline: 0;
    box-shadow: none;
    padding-inline: 0;
}
html body.house-account-shell .billing-page .billing-document-reviews {
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
}
html body.house-account-shell .billing-page .billing-document-reviews-heading {
    gap: 8px;
    margin-bottom: 0;
}
html body.house-account-shell .billing-page .billing-document-review-copy > span:last-child {
    gap: 6px;
}

/* Flatten the editor workspace, while keeping the actual statement sheet and
   its modal editing controls visually distinct. */
html body.house-account-shell .ls-page.ha-theme-page :is(
    .ls-house-theme-stage, .ls-house-theme-subcard, .ls-theme-asset-card,
    .ls-house-theme-action-shell
) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-stage {
    border-top: 1px solid var(--wa-border) !important;
    padding: 64px 0 32px;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-workspace {
    gap: 24px;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-stage-head {
    padding-top: 8px;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-stage-label {
    margin-bottom: 8px;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-stage-badge {
    background: transparent !important;
    border: 0;
    left: 0;
    padding-left: 0;
    color: var(--wa-muted);
    line-height: 1.5;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-theme-floating-trigger {
    right: 0;
    box-shadow: none;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-stage-title {
    color: var(--wa-text);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-subcard {
    border-top: 1px solid var(--ha-border-strong) !important;
    padding: 24px 0;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-theme-asset-card {
    padding: 0;
}
html body.house-account-shell .ls-page.ha-theme-page .ls-theme-editor-modal-section + .ls-theme-editor-modal-section {
    border-top-color: var(--ha-border-strong);
    margin-top: 24px;
    padding-top: 24px;
}

/* Restaurant setup, receipts and integration diagnostics. */
html body.house-account-shell .ks-page :is(.ks-card, .ks-summary-grid article, .ks-receipt-summary article) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
html body.house-account-shell .ks-page :is(.ks-summary-grid, .ks-receipt-summary) {
    border-block: 1px solid var(--wa-border);
    gap: 24px;
    padding: 20px 0;
}
html body.house-account-shell .ks-page :is(.ks-summary-grid article, .ks-receipt-summary article) {
    padding: 0;
}
html body.house-account-shell .ks-page .ks-card-header {
    background: transparent;
    border-color: var(--wa-border);
    padding: 16px 0;
}
html body.house-account-shell .ks-page .ks-card-header h2 {
    margin-bottom: 8px;
}
html body.house-account-shell .ks-page .ks-field label {
    line-height: 1.5;
    margin-bottom: 8px;
}
html body.house-account-shell .ks-page :is(.ks-checklist, .ks-card-copy, .ks-card-note, .ks-button-row) {
    padding-inline: 0;
    margin-inline: 0;
}
html body.house-account-shell .ks-page .ks-definition-grid > div {
    border-right: 0;
    padding-inline: 0;
}
html body.house-account-shell .ks-page .ks-definition-grid {
    column-gap: 24px;
}
html body.house-account-shell .ks-page h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: normal;
}

/* Sign-in and access recovery are open layouts, not cards inside cards. */
html body.auth-shell :is(main, .login-shell, .login-form-panel, .login-brand-panel, .login-form-card, .login-brand-mark) {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
html body.auth-shell .login-split-shell {
    column-gap: 64px;
    min-height: 420px;
}
html body.auth-shell .login-form-panel .login-body {
    padding: 24px 0;
}
html body.auth-shell .login-split-shell .login-form-card {
    gap: 24px;
}
html body.auth-shell .login-split-shell .login-form-header {
    gap: 8px;
    margin-bottom: 0;
}
html body.auth-shell .login-split-shell .login-form {
    gap: 18px;
}
html body.auth-shell .login-split-shell .login-field {
    gap: 8px;
}
html body.auth-shell .login-split-shell .login-field label {
    line-height: 1.5;
}
html body.auth-shell .login-split-shell .login-brand-panel {
    border-left: 1px solid var(--wa-border) !important;
    padding: 24px 32px;
}
html body.auth-shell .login-split-shell .login-brand-mark {
    height: 80px;
    width: 80px;
}
html body.auth-shell .login-split-shell .login-brand-logo {
    height: 60px;
    width: 42px;
}
html body.auth-shell .login-split-shell :is(.login-form-header h1, .login-brand-title),
html body.auth-shell main > header h1 {
    font-size: 22px;
    font-weight: 600;
}
html body.auth-shell .access-account {
    background: transparent !important;
    border: 0;
    border-block: 1px solid var(--wa-border);
    padding-inline: 0;
}

/* The public member page keeps payment forms and confirmations bounded. */
html body.settlement-shell .settlement-panel {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    margin-bottom: 32px;
    overflow: visible;
}
html body.settlement-shell :is(.settlement-panel-head, .settlement-card-header) {
    background: transparent;
    border-color: var(--wa-border);
    padding: 20px 0;
}
html body.settlement-shell .settlement-card-header p {
    margin-top: 8px;
}
html body.settlement-shell .settlement-panel-head .settlement-subtitle {
    margin: 8px 0 0;
}
html body.settlement-shell .settlement-form label {
    line-height: 1.5;
    margin-bottom: 8px;
}
html body.settlement-shell .settlement-panel h1 {
    color: var(--wa-text);
    font-size: 22px;
    font-weight: 600;
}
html body.settlement-shell .settlement-balance-hero {
    background: transparent !important;
    padding: 24px 0;
}
html body.settlement-shell .settlement-balance-main {
    padding: 0;
}
html body.settlement-shell .settlement-balance-copy > strong {
    font-size: 32px;
    font-weight: 600;
}
html body.settlement-shell :is(.settlement-breakdown-rows, .settlement-breakdown > summary, .settlement-activity-list, .settlement-support-panel) {
    padding-inline: 0;
}
html body.settlement-shell :is(.settlement-activity-row, .settlement-support-row) {
    padding: 20px 0;
}
html body.settlement-shell .settlement-grid {
    gap: 40px;
}
html body.settlement-shell .settlement-brand-mark {
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

@media (max-width: 1100px) {
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"] .ls-grid > aside {
        border-inline-start: 0;
        border-top: 1px solid var(--ha-border-strong);
        padding-inline-start: 0;
        padding-top: 24px;
    }
}
@media (max-width: 760px) {
    html body.house-account-shell [data-house-account-active-nav~="us-lightspeed-clubs"].ls-page .ls-location-config .ls-config-field label:not(.ls-checkbox) {
        min-height: 0;
    }
    html body.house-account-shell .ls-page.ha-theme-page .ls-house-theme-stage {
        padding-top: 20px;
    }
    html body.house-account-shell .billing-page .billing-card-header {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
    html body.house-account-shell .billing-page .billing-plan {
        border-left: 0 !important;
        border-top: 1px solid var(--wa-border) !important;
        padding: 20px 0 0;
    }
    html body.house-account-shell .billing-page .billing-details,
    html body.house-account-shell .ks-page :is(.ks-summary-grid, .ks-receipt-summary) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    html body.auth-shell .login-split-shell {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        min-height: 0;
    }
    html body.auth-shell .login-split-shell .login-brand-panel {
        border-left: 0 !important;
        border-top: 1px solid var(--wa-border) !important;
        padding: 24px 0;
    }
    html body.settlement-shell .settlement-grid {
        gap: 24px;
    }
    html body.settlement-shell .settlement-page {
        padding: 24px 20px;
    }
}
