/* Salon audit 2026-09-14. Loaded only inside the workspace theme;
   studio routes and the public salon brand palette are excluded in PHP. */
html[data-ui-theme="workspace"] .frexima-client-page .client-workspace-grid {
    grid-template-columns: minmax(280px, 300px) minmax(0, 1fr) !important;
    gap: 20px;
    align-items: start;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-profile-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    container-type: inline-size;
    container-name: client-profile;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-profile-area > * {
    width: 100%;
    min-width: 0;
    grid-column: auto;
    grid-row: auto;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-profile-hero {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) 44px;
    align-items: start;
    gap: 16px;
    padding: 20px;
    min-height: 0;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-hero-avatar {
    grid-area: 1 / 1;
    width: 80px;
    height: 80px;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-hero-copy { grid-area: 1 / 2; min-width: 0; }
html[data-ui-theme="workspace"] .frexima-client-page .client-edit-link { grid-area: 1 / 3; width: 44px; height: 44px; margin: 0; }
html[data-ui-theme="workspace"] .frexima-client-page :is(.client-hero-name, .client-hero-meta) { flex-wrap: wrap; }
html[data-ui-theme="workspace"] .frexima-client-page :is(.client-hero-name h3, .client-contact-list li, .client-contact-list span) {
    min-width: 0; white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-hero-name h3 {
    display: block; -webkit-line-clamp: unset; max-height: none; height: auto; line-height: 1.35;
    color: var(--workspace-text);
}
html[data-ui-theme="workspace"] .frexima-client-page .client-heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-heading-actions > :is(a, .dropdown) { flex: 1 1 180px; min-width: 0; }
html[data-ui-theme="workspace"] .frexima-client-page .client-heading-actions .btn { white-space: normal; height: auto; padding: 12px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-action-grid {
    display: flex; flex-wrap: wrap; gap: 10px;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-action-grid > * { flex: 1 1 160px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-action-grid :is(a, button) { min-height: 48px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-action-grid span {
    white-space: normal; overflow: visible; text-overflow: clip; word-break: normal;
}
html[data-ui-theme="workspace"] .frexima-client-page :is(.client-profile-summary-rail, .client-overview-grid, .client-detail-grid, .client-crm-grid) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    align-items: start;
    gap: 16px;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
html[data-ui-theme="workspace"] .frexima-client-page .client-overview-grid .client-stat-tile { display: grid; gap: 8px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-stat-tile :is(strong, small, span) {
    position: static; min-width: 0; white-space: normal; overflow-wrap: anywhere;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-detail-grid > article { height: auto; min-height: 0; align-self: start; }
html[data-ui-theme="workspace"] .frexima-client-page .client-photo-card { order: 0; }
html[data-ui-theme="workspace"] .frexima-client-page .client-card-heading { flex-wrap: wrap; gap: 8px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-media-upload { display: grid; grid-template-columns: minmax(0, 1fr); }
html[data-ui-theme="workspace"] .frexima-client-page .client-media-upload :is(input, button) { width: 100%; min-width: 0; }
html[data-ui-theme="workspace"] .frexima-client-page .client-profile-tabs {
    flex-wrap: wrap; gap: 8px 16px; overflow: visible; border: 0; padding: 8px 0;
}
html[data-ui-theme="workspace"] .frexima-client-page .client-profile-tabs a {
    min-height: 44px; white-space: normal; border: 0; border-radius: 8px; padding: 10px;
    text-decoration: underline; text-underline-offset: 4px;
}
html[data-ui-theme="workspace"] .frexima-client-page [id^="client-"] { scroll-margin-top: 110px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-filter-toolbar { display: flex; flex-wrap: wrap; }
html[data-ui-theme="workspace"] .frexima-client-page .client-sort-control { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; flex: 1 0 100%; min-width: 0; }
html[data-ui-theme="workspace"] .frexima-client-page .client-sort-control select { width: 100%; min-width: 0; }
html[data-ui-theme="workspace"] .frexima-client-page .client-filter-drawer { display: none; }
html[data-ui-theme="workspace"] .frexima-client-page .client-filter-drawer.is-open { display: block; }
html[data-ui-theme="workspace"] .frexima-client-page .client-filter-row { grid-template-columns: minmax(0, 1fr); }
html[data-ui-theme="workspace"] .frexima-client-page .client-filter-open { display: inline-flex; min-height: 44px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-search-box > i { display: none; }
html[data-ui-theme="workspace"] .frexima-client-page .client-search-box { grid-template-columns: minmax(0, 1fr) 44px; }
html[data-ui-theme="workspace"] .frexima-client-page .client-list-card { grid-template-columns: 44px minmax(0, 1fr); }
html[data-ui-theme="workspace"] .frexima-client-page .client-list-card > i { display: none; }
html[data-ui-theme="workspace"] .frexima-client-page .client-list-badges { grid-column: 2; justify-items: start; }
html[data-ui-theme="workspace"] .frexima-client-page .client-list-badges .status-badge { font-size: .75rem; }
html[data-ui-theme="workspace"] .frexima-client-page .client-switch-panel { display: block !important; }

@container client-profile (max-width: 440px) {
    html[data-ui-theme="workspace"] .frexima-client-page .client-profile-hero { grid-template-columns: minmax(0, 1fr) 44px; padding: 16px; }
    html[data-ui-theme="workspace"] .frexima-client-page .client-hero-copy { grid-area: 2 / 1 / auto / -1; }
    html[data-ui-theme="workspace"] .frexima-client-page .client-edit-link { grid-area: 1 / 2; }
}
@media (max-width: 991.98px) {
    html[data-ui-theme="workspace"] .frexima-client-page .client-workspace-grid { grid-template-columns: minmax(0, 1fr) !important; }
    html[data-ui-theme="workspace"] .frexima-client-page:not(.client-has-selection) .client-profile-area,
    html[data-ui-theme="workspace"] .frexima-client-page.client-has-selection .client-list-panel { display: none; }
    html[data-ui-theme="workspace"] .frexima-client-page.client-has-selection .client-switch-panel { display: none !important; }
    html[data-ui-theme="workspace"] .frexima-client-page.client-has-selection .client-profile-area { display: flex; }
    html[data-ui-theme="workspace"] .frexima-client-page.client-has-selection .client-mobile-back { display: inline-flex; min-height: 44px; }
    html[data-ui-theme="workspace"] .frexima-client-page.client-has-selection > :is(.client-main-heading, .client-relationship-tabs, .client-desktop-topbar) { display: none !important; }
}

/* Full-width period presets prevent flex-end from clipping the first presets. */
html[data-ui-theme="workspace"] .salon-report-filter-panel { display: block; }
html[data-ui-theme="workspace"] .salon-report-period-rail {
    justify-content: flex-start; flex-wrap: wrap; margin-top: 16px; padding: 12px 0 4px;
    border-top: 1px solid var(--workspace-line); overflow: visible;
}
html[data-ui-theme="workspace"] .salon-reports-page {
    --reports-accent: var(--workspace-action); --reports-accent-dark: var(--workspace-action-strong);
    --reports-accent-soft: var(--workspace-selected); --reports-border: var(--workspace-line);
}
html[data-ui-theme="workspace"] .growth-page--salon .growth-hero { background: var(--workspace-surface); color: var(--workspace-text); min-height: 0; padding: 24px; }
html[data-ui-theme="workspace"] .growth-page--salon .growth-hero h1 { color: var(--workspace-text); font-size: clamp(1.65rem, 3vw, 2.5rem); }
html[data-ui-theme="workspace"] .growth-page--salon .growth-hero :is(p, .section-label) { color: var(--workspace-muted); }
html[data-ui-theme="workspace"] .brand-body :is(.page-heading, .app-page-heading, .salon-report-heading, .support-heading) {
    padding: 20px; gap: 16px; align-items: start; text-align: start;
}
html[data-ui-theme="workspace"] .brand-body .page-heading-subtitle { font-weight: 400; }
html[data-ui-theme="workspace"] .brand-body .btn-light { color: var(--workspace-action-strong); border-color: var(--workspace-line); background: var(--workspace-surface); }
html[data-ui-theme="workspace"] .brand-body :is(.table-card, .table-responsive) thead :is(th, td) { background: var(--workspace-subtle); color: var(--workspace-text); }
html[data-ui-theme="workspace"] .brand-body :is(.table-card, .table-responsive) tbody td { background-color: var(--workspace-surface); }
html[data-ui-theme="workspace"] .brand-body :is(.content-panel, .more-module-group) { border-color: var(--workspace-line); }
html[data-ui-theme="workspace"] .brand-body :is(.more-module-link:not([href*="-studio.php"]) .module-card-icon, .settings-overview-icon) { background: var(--workspace-selected); color: var(--workspace-action-strong); }
html[data-ui-theme="workspace"] .brand-body :is(.service-catalog-table, .team-members-panel) :is(th, td) { word-break: normal; overflow-wrap: normal; }
html[data-ui-theme="workspace"] .brand-body :is(.service-catalog-table, .team-members-panel) .status-badge { white-space: nowrap; }
html[data-ui-theme="workspace"] .brand-body .subscription-status-button-copy { display: grid !important; min-width: 0; }
html[data-ui-theme="workspace"] .brand-body .subscription-status-button-copy :is(strong, small) { display: block; max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
html[data-ui-theme="workspace"] .brand-body .subscription-status-button { height: auto; min-height: 44px; }
html[data-ui-theme="workspace"] .brand-body .support-heading { display: flex; flex-wrap: wrap; justify-content: space-between; }
html[data-ui-theme="workspace"] .brand-body .support-heading > div { flex: 1 1 300px; margin: 0; }
html[data-ui-theme="workspace"] .brand-body .support-topic-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
html[data-ui-theme="workspace"] .brand-body .support-topic-card { display: flex; flex-direction: row; gap: 12px; min-height: 68px; padding: 12px; align-items: center; text-align: start; }
html[data-ui-theme="workspace"] .brand-body .support-topic-card > span { flex: 0 0 36px; width: 36px; height: 36px; }
html[data-ui-theme="workspace"] .brand-body .brand-module-guide-floating { width: 48px; height: 48px; min-width: 48px; padding: 0; justify-content: center; }
html[data-ui-theme="workspace"] .brand-body .brand-module-guide-floating > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html[data-ui-theme="workspace"] .brand-body .brand-main-content { padding-bottom: 100px; }
html[data-ui-theme="workspace"] .brand-body:has(#brandMobileSidebar:is(.show, .showing)) .frexima-back-to-top {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
@media (max-width: 1199.98px) {
    html[data-ui-theme="workspace"] .frexima-calendar-page .calendar-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    html[data-ui-theme="workspace"] .frexima-calendar-page :is(.calendar-main-panel, .calendar-side-panel) {
        grid-column: auto;
        grid-row: auto;
    }
    html[data-ui-theme="workspace"] .frexima-calendar-page .calendar-side-panel {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    }
    html[data-ui-theme="workspace"] .brand-body .video-hub-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    html[data-ui-theme="workspace"] .brand-body .video-hub-detail {
        position: static;
        max-width: 100%;
    }
}
/* Legacy calendar/community pages hid the shared account and locale controls. */
html[data-ui-theme="workspace"] .brand-body:has(:is(.frexima-calendar-page, .frexima-community-wall-page, .frexima-forum-page)) .brand-topbar { display: flex !important; }
html[data-ui-theme="workspace"] .frexima-calendar-page .schedule-staff-chip.active { background: var(--workspace-selected); border-color: var(--workspace-action); box-shadow: inset 0 -3px 0 var(--workspace-action); }
html[data-ui-theme="workspace"] .frexima-calendar-page .schedule-staff-chip.active .avatar { background: var(--workspace-action); color: #fff; border-color: var(--workspace-action); }
html[data-ui-theme="workspace"] .frexima-calendar-page :is(.calendar-filter-chips span, .nav-pills .nav-link.active) { color: var(--workspace-action-strong); background: var(--workspace-selected) !important; border-color: var(--workspace-line) !important; }
html[data-ui-theme="workspace"] .frexima-calendar-page .calendar-title-block h2 { display: none; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .cw-story-rail.salon-community-stories-collapsible { display: block !important; min-height: 0; padding: 0 !important; margin-block: 12px; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .salon-community-stories-collapsible::before { display: none; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .salon-community-stories-collapsible > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; width: 100%; min-height: 52px; padding: 12px 16px; gap: 10px; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .salon-community-stories-collapsible > summary > span { display: flex; align-items: center; gap: 8px; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .salon-community-stories-collapsible > summary > small { white-space: nowrap; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .salon-community-search-heading { margin: 0; }
html[data-ui-theme="workspace"] .brand-body .salon-community-page .salon-community-search-heading :is(.cw-kicker, small) { display: none; }
html[data-ui-theme="workspace"] .brand-body .ai-mic-button-copy small { color: #fff !important; opacity: 1; font-size: .8125rem; }

/* Profile identity is independent of the cover and action widths. */
html[data-ui-theme="workspace"] .connection-social-profile .creator-profile-identity {
    display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: start;
    padding: 24px; gap: 20px; margin: 0;
}
html[data-ui-theme="workspace"] .connection-social-profile .creator-profile-avatar { position: static; width: 112px; height: 112px; margin: 0; }
html[data-ui-theme="workspace"] .connection-social-profile .creator-profile-title { display: flex; flex-direction: column; align-items: start; min-width: 0; padding: 0; gap: 16px; }
html[data-ui-theme="workspace"] .connection-social-profile .creator-profile-title > div { max-width: 100%; min-width: 0; }
html[data-ui-theme="workspace"] .connection-social-profile .connection-profile-cover { height: 150px; overflow: clip; }
html[data-ui-theme="workspace"] .connection-social-profile .creator-profile-primary-actions { flex-wrap: wrap; justify-content: flex-start; }
@media (max-width: 575.98px) {
    html[data-ui-theme="workspace"] .connection-social-profile .creator-profile-identity { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    html[data-ui-theme="workspace"] .brand-body .subscription-status-button { min-width: 44px !important; width: 44px !important; padding: 8px !important; }
    html[data-ui-theme="workspace"] .brand-body .subscription-status-button > i { display: block; }
    html[data-ui-theme="workspace"] .brand-body .subscription-status-button-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

html[data-ui-theme="workspace"] .brand-body .notification-preference-group { padding: 10px 0; border-bottom: 1px solid var(--workspace-line); }
html[data-ui-theme="workspace"] .brand-body .notification-preference-group > summary { min-height: 44px; padding: 10px 8px; cursor: pointer; font-weight: 650; }
html[data-ui-theme="workspace"] [data-settings-section][hidden] { display: none !important; }
/* The one-topic settings flow applies at every width, including its shell.
   Keep unrelated forms out of standalone topics while retaining their values. */
html[data-ui-theme="workspace"] .settings-page:not(.settings-mobile-detail) :is(form[data-settings-form], .settings-detail-section),
html[data-ui-theme="workspace"] .settings-page > .row > aside,
html[data-ui-theme="workspace"] .settings-page.settings-mobile-detail :is(.settings-hub, .brand-help-strip),
html[data-ui-theme="workspace"] .settings-page form[data-settings-form]:not(:has([data-settings-section]:not([hidden]))) { display: none; }
html[data-ui-theme="workspace"] .settings-page.settings-mobile-detail > .row { display: block; }
html[data-ui-theme="workspace"] .settings-page.settings-mobile-detail > .row > .col-xl-9 { width: 100%; }
html[data-ui-theme="workspace"] .settings-mobile-back { display: inline-flex; min-height: 44px; margin-bottom: 16px; }
@media (min-width: 992px) and (max-width: 1599.98px) {
    html[data-ui-theme="workspace"] .business-profile-shell { grid-template-columns: 180px minmax(0, 1fr); }
    html[data-ui-theme="workspace"] .business-profile-preview { grid-column: 2; }
    html[data-ui-theme="workspace"] .business-profile-preview > .content-panel { position: static; }
}

.salon-recipient-picker { min-width: 0; }
.salon-recipient-picker-list { display: grid; max-height: 260px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--workspace-line); border-radius: 12px; }
.salon-recipient-picker-list label { display: flex; align-items: start; gap: 10px; padding: 12px; min-height: 44px; cursor: pointer; }
.salon-recipient-picker-list label span { min-width: 0; overflow-wrap: anywhere; }
.salon-recipient-picker-list label:has(input:checked) { background: var(--workspace-selected); }
.salon-recipient-picker-list label:has(input:disabled) { color: var(--workspace-muted); cursor: default; }
.salon-recipient-picker-list label[hidden] { display: none; }
[data-qr-canvas] { max-width: 100%; height: auto; }
[data-qr-canvas][hidden] { display: none; }
.salon-link-panel .btn { word-break: normal; overflow-wrap: normal; }
html[data-ui-theme="workspace"] .payment-workspace-empty-detail { grid-template-columns: minmax(0, 1fr); }
html[data-ui-theme="workspace"] .payment-date-label { display: grid; gap: 6px; min-width: 0; }
html[data-ui-theme="workspace"] .brand-body .video-hub-card:has(.video-hub-watch-full) .video-hub-audience { top: 70px; }
html[data-ui-theme="workspace"] .brand-body .social-account-card .d-flex > div { min-width: 0; }
html[data-ui-theme="workspace"] .brand-body .social-account-card h2 { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
html[data-ui-theme="workspace"] .brand-body .social-account-icon { flex: 0 0 3rem; }
@media print {
    body:has([data-qr-state="ready"]) .brand-app-content { margin: 0; width: 100%; }
    body:has([data-qr-state="ready"]) [data-qr-url] { position: fixed; inset: 0; background: white; visibility: visible; }
    body:has([data-qr-state="ready"]) [data-qr-url] :is(button, [data-qr-status], noscript) { display: none; }
}
