@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
/* Shared navigation, typography and layout. Modules own their block surfaces. */
:root {
    --workspace-bg: #f4f7fb;
    --workspace-panel: #fff;
    --workspace-ink: #21334d;
    --workspace-muted: #65758b;
    --workspace-line: #dfe7f1;
    --workspace-primary: #187f75;
    --workspace-primary-dark: #12695f;
    --workspace-soft: #e9f5f3;
    --workspace-danger: #b23b46;
    --workspace-radius: 8px;
    --workspace-shadow: 0 6px 24px rgb(34 57 100 / 5%);
    --workspace-body-font: 'DM Sans', Arial, sans-serif;
    --workspace-heading-font: Manrope, Arial, sans-serif;
    --bg: var(--workspace-bg);
    --page: var(--workspace-bg);
    --canvas: var(--workspace-bg);
    --paper: var(--workspace-panel);
    --paper-strong: var(--workspace-panel);
    --panel: var(--workspace-panel);
    --ink: var(--workspace-ink);
    --muted: var(--workspace-muted);
    --green: var(--workspace-primary);
    --forest: var(--workspace-primary);
    --accent: var(--workspace-primary);
    --green-dark: var(--workspace-primary-dark);
    --forest-deep: var(--workspace-primary-dark);
    --forest-soft: var(--workspace-soft);
    --mint: var(--workspace-soft);
    --danger: var(--workspace-danger);
    --red: var(--workspace-danger);
}
@layer workspace-surface-defaults {
    :root {
        --line: var(--workspace-line);
        --shadow: var(--workspace-shadow);
        --shadow-soft: var(--workspace-shadow);
        --radius: var(--workspace-radius);
    }
}
* {
    box-sizing: border-box;
}
[hidden] {
    display: none !important;
}
html {
    min-width: 0;
    font-size: 14px;
    background: var(--workspace-bg);
}
body.workspace-page,
body.workspace-auth {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 0 !important;
    color: var(--workspace-ink);
    background: var(--workspace-bg) !important;
    font: 14px/1.6 var(--workspace-body-font);
}
.workspace-page h1,
.workspace-page h2,
.workspace-page h3,
.workspace-page h4,
.workspace-page h5,
.workspace-auth h1,
.workspace-auth h2,
.workspace-auth h3 {
    font-family: var(--workspace-heading-font) !important;
    color: var(--workspace-ink);
    line-height: 1.35;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-align: left;
}
.workspace-page h1 {
    font-size: clamp(22px, 2vw, 30px);
    letter-spacing: -0.6px;
}
.workspace-page h2 {
    font-size: 20px;
}
.workspace-page h3,
.workspace-page h4,
.workspace-page h5 {
    font-size: 16px;
}
.workspace-page p,
.workspace-page label,
.workspace-page small {
    overflow-wrap: anywhere;
}
.workspace-page a {
    color: var(--workspace-primary);
}
.workspace-page :is(button, input, select, textarea),
.workspace-auth :is(button, input, select, textarea) {
    font-family: var(--workspace-body-font) !important;
}
.workspace-page :is(img, video, iframe),
.workspace-auth img {
    max-width: 100%;
}
.workspace-page pre {
    max-width: 100%;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.workspace-shell,
.shell.workspace-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    width: 100%;
    min-height: 100dvh;
}
.workspace-main {
    grid-column: 2;
    min-width: 0;
    width: 100%;
}
.workspace-content,
.shell .content {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 24px;
}
.workspace-content {
    container: workspace / inline-size;
}
.workspace-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 22px 14px 14px;
    border-right: 1px solid var(--workspace-line);
    background: linear-gradient(180deg, #fff 65%, #f7f9ff);
    color: var(--workspace-ink);
}
.workspace-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 22px;
    flex: 0 0 auto;
    text-decoration: none !important;
    color: var(--workspace-ink) !important;
}
.workspace-brand img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex: 0 0 auto;
}
.workspace-brand strong {
    display: block;
    font: 800 20px var(--workspace-heading-font);
}
.workspace-brand small {
    display: block;
    color: var(--workspace-muted);
    font-size: 9px;
    letter-spacing: 1.3px;
}
.workspace-nav {
    overflow: auto;
    min-height: 0;
    flex: 1;
    overscroll-behavior: contain;
}
.workspace-nav-label {
    color: var(--workspace-muted);
    padding: 20px 12px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.workspace-nav-item,
.workspace-nav-group > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-height: 40px;
    margin: 3px 0;
    color: #53637a !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 9px;
    text-decoration: none !important;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.workspace-nav-item svg,
.workspace-nav-group svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}
.workspace-nav-item:hover,
.workspace-nav-group > summary:hover {
    background: #f1f5fb;
}
.workspace-nav-item.active {
    color: var(--workspace-primary-dark) !important;
    background: var(--workspace-soft);
    box-shadow: inset 3px 0 var(--workspace-primary);
}
.workspace-nav-group > summary {
    list-style: none;
}
.workspace-nav-group > summary::-webkit-details-marker {
    display: none;
}
.workspace-nav-group > summary::after {
    content: '›';
    margin-left: auto;
}
.workspace-nav-group[open] > summary::after {
    transform: rotate(90deg);
}
.workspace-nav-group .workspace-nav-item {
    padding-left: 20px;
    font-size: 11px;
}
.workspace-sidebar-bottom {
    flex: 0 0 auto;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid var(--workspace-line);
}
.workspace-sidebar-user {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    color: var(--workspace-ink) !important;
    text-decoration: none !important;
}
.workspace-sidebar-user > span:last-child {
    min-width: 0;
}
.workspace-sidebar-user strong {
    display: block;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.workspace-sidebar-user small {
    display: block;
    color: var(--workspace-muted);
    font-size: 10px;
}
button.workspace-signout {
    width: 100%;
    margin: 6px 0 0;
    padding: 8px;
    min-height: 34px;
    border: 1px solid var(--workspace-line);
    border-radius: 8px;
    color: var(--workspace-muted);
    background: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.workspace-sidebar .avatar,
.workspace-topbar .avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--workspace-soft);
    color: var(--workspace-primary);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #cee8e1;
    border-radius: 50%;
    flex: 0 0 auto;
    overflow: hidden;
}
.workspace-sidebar .avatar img,
.workspace-topbar .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.workspace-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 72px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--workspace-line);
    background: #fff;
}
.workspace-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--workspace-muted);
    font-size: 12px;
}
.workspace-breadcrumb a {
    text-decoration: none;
}
.workspace-breadcrumb strong {
    color: var(--workspace-ink);
    overflow-wrap: anywhere;
    min-width: 0;
}
.workspace-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}
.workspace-topbar-right time {
    color: var(--workspace-muted);
    font-size: 11px;
}
button.workspace-menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 7px;
    background: #f6f8fc;
    border: 1px solid var(--workspace-line);
    border-radius: 8px;
    color: var(--workspace-ink);
    margin: 0;
    cursor: pointer;
}
.workspace-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgb(23 40 65 / 35%);
    backdrop-filter: blur(2px);
}
.workspace-content :is(.container, .container-fluid, .page-shell, .app-shell),
.workspace-content > main,
.workspace-content > .controls,
.workspace-content > h1 {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
}
.workspace-content :is(.page-shell, .app-shell) {
    padding: 0;
    min-height: 0;
    height: auto;
}
.workspace-content :is(.container, .container-fluid) {
    padding-left: 0;
    padding-right: 0;
}
.workspace-content > main {
    padding: 0;
}
.workspace-content
    :is(
        .module-header,
        .page-heading,
        .table-toolbar,
        .panel-head,
        .topbar-actions,
        .top-actions,
        .toolbar,
        .actions,
        .controls-main,
        .controls-actions,
        .filter-row,
        .form-footer
    ) {
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}
.workspace-content :is(.module-header, .page-heading) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 20px;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}
.module-header > .brand {
    display: none;
}
.workspace-content .module-header .home-button[href='/'],
.workspace-content .module-header .back-link[href='/'],
.workspace-content .module-header a[href='/'].btn {
    display: none;
}
.workspace-page
    :is(
        .panel,
        .card,
        .table-panel,
        .role-card,
        .chart-container,
        .metric,
        .metrics > article,
        .summary-grid > div,
        .settings-card,
        .section-card,
        .filter-panel,
        .detail-panel,
        .settings-nav,
        .box
    ) {
    background: #fff;
    color: var(--workspace-ink);
    min-width: 0;
}
.workspace-page :is(.overview, .hero, .settings-hero) {
    color: var(--workspace-ink);
    background: linear-gradient(115deg, #eaf6f1, #edf2ff 75%, #f5f0fd);
    padding: clamp(18px, 2.5vw, 30px);
    gap: 20px;
    min-width: 0;
}
.workspace-page :is(.hero, .settings-hero)::after {
    display: none;
}
.workspace-page :is(.hero, .settings-hero) p,
.workspace-page :is(.hero-kicker, .kicker, .eyebrow) {
    color: var(--workspace-muted);
}
.workspace-page :is(.hero, .settings-hero) h1 {
    margin-top: 8px;
    font-size: clamp(24px, 2.2vw, 32px);
}
.workspace-page .hero-mode {
    color: var(--workspace-ink);
    background: rgb(255 255 255 / 70%);
}
.workspace-page .hero-mode :is(span, small) {
    color: var(--workspace-muted);
}
.workspace-page .hero-mode[data-mode='OFF'] strong {
    color: var(--workspace-danger);
}
.workspace-page .hero-mode[data-mode='ON'] strong {
    color: var(--workspace-primary);
}
.workspace-page :is(.card-header, .panel-head, .table-toolbar) {
    color: var(--workspace-ink);
    background: #f8faff;
}
.workspace-page .card-header.bg-primary {
    background: #edf3fd !important;
    color: var(--workspace-ink) !important;
}
.workspace-page
    :is(
        .workspace-control,
        .btn,
        .button-link,
        .secondary-link,
        .home-button,
        .secondary-button,
        .primary-button
    ) {
    min-height: 38px;
    max-width: 100%;
    height: auto;
    padding: 8px 12px;
    margin-top: 0;
    border: 1px solid var(--workspace-line);
    border-radius: 9px;
    color: var(--workspace-ink);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    cursor: pointer;
    box-shadow: none;
}
.workspace-page
    :is(
        .btn-primary,
        .primary-button,
        .btn.primary,
        button.primary,
        .create-button,
        .sync-button,
        .pink-primary-action,
        .primary-action
    ) {
    color: #fff;
    border-color: var(--workspace-primary);
    background: linear-gradient(120deg, #187f75, #216b88);
    box-shadow: 0 3px 10px rgb(24 127 117 / 12%);
}
.workspace-page :is(.workspace-control, .btn):hover {
    border-color: #9cbcaf;
    background: #f1f8f6;
}
.workspace-page
    :is(.btn-primary, .primary-button, .btn.primary, button.primary, .create-button, .sync-button):hover {
    color: #fff;
    background: var(--workspace-primary-dark);
}
.workspace-page :is(.btn-danger, .danger, [data-remove]) {
    color: var(--workspace-danger);
    border-color: #efd2d6;
    background: #fff7f8;
}
.workspace-page .danger.solid {
    color: #fff;
    background: var(--workspace-danger);
    border-color: var(--workspace-danger);
}
.workspace-page :is(.workspace-control, .btn):disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.workspace-page .workspace-control.active,
.workspace-page .workspace-control[aria-selected='true'] {
    border-color: #b6dacf;
    color: var(--workspace-primary-dark);
    background: var(--workspace-soft);
}
.workspace-page :is(.tabs, .tabs-container, .date-filter, .pagination) {
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}
.workspace-page :is(.tabs, .tabs-container, .date-filter, .pagination) button {
    width: auto;
    min-width: 0;
    flex-shrink: 1;
}
.workspace-page
    :is(
        input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not(
                [type='color']
            ),
        select,
        textarea
    ),
.workspace-auth :is(input:not([type='checkbox']):not([type='radio']):not([type='hidden']), select, textarea) {
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--workspace-line);
    border-radius: 9px;
    background: #fff;
    color: var(--workspace-ink);
    font-size: 13px;
    line-height: 1.5;
}
.workspace-page
    :is(
        input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='range']):not(
                [type='color']
            ),
        select
    ) {
    min-height: 40px;
}
.workspace-page :is(input, select, textarea):focus,
.workspace-auth :is(input, select, textarea):focus {
    border-color: var(--workspace-primary);
    outline: 3px solid rgb(24 127 117 / 12%);
    outline-offset: 1px;
}
.workspace-page :is(input, textarea)[readonly] {
    background: #f7f9fc;
    color: var(--workspace-muted);
}
.workspace-page input[type='file'],
.workspace-auth input[type='file'] {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workspace-page select {
    text-overflow: ellipsis;
    padding-right: 26px;
}
/* Keep native select behavior with one consistent, unclipped chevron. */
:is(.workspace-page, .workspace-auth) select:not([multiple]):not([size]),
:is(.workspace-page, .workspace-auth) select[size='1']:not([multiple]) {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url('/workspace/select-chevron.svg') !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 16px !important;
    padding: 9px 38px 9px 12px !important;
    min-height: 42px;
    line-height: 1.5;
}
:is(.workspace-page, .workspace-auth) input:is([type='text'], [type='email'], [type='password'], [type='number'], [type='search'], [type='tel'], [type='url']),
.workspace-page input:not([type]) {
    padding: 9px 12px;
}
:is(.workspace-page, .workspace-auth) :is(input, select, textarea):disabled {
    background-color: #f3f6fa;
    color: var(--workspace-muted);
    cursor: not-allowed;
}
.workspace-page label {
    font-weight: 600;
    font-size: 12px;
}
.workspace-page .workspace-table-scroll {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
}
.workspace-page table {
    margin-bottom: 0;
    color: var(--workspace-ink);
}
.workspace-page :is(th, td) {
    font-family: var(--workspace-body-font);
    overflow-wrap: anywhere;
    vertical-align: middle;
}
.workspace-page th {
    color: var(--workspace-muted);
    background: #f8faff;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.workspace-page td {
    font-size: 12px;
}
.workspace-page :is(.table-scroll, .table-responsive, .table-wrap, .list-panel, .grid-container) {
    min-width: 0;
    max-width: 100%;
}
.workspace-page
    :is(.field-grid, .check-grid, .stats-row, .summary-grid, .metrics, .profile-layout, .module-grid)
    > * {
    min-width: 0;
}
.workspace-page :is(.person-cell, .member-confirm-person) > span:last-child {
    min-width: 0;
}
.workspace-page .person-cell strong,
.workspace-page .person-cell small {
    white-space: normal;
    overflow-wrap: anywhere;
}
.workspace-page .person-cell {
    min-width: 180px;
    max-width: 280px;
}
.workspace-page :is(.badge, .status-tag, .permission-chips span, .store-pill) {
    max-width: 100%;
    white-space: normal;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.workspace-page .footer {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--workspace-muted);
}
.workspace-page :is(.modal-card, .modal-content, dialog, .dialog-card) {
    max-width: calc(100vw - 24px);
    background: #fff;
    color: var(--workspace-ink);
}
.workspace-page :is(.modal-card, .dialog-card) {
    overflow-y: auto;
    max-height: calc(100dvh - 32px);
}
.workspace-page :is(.modal-title, .modal-header, .dialog-heading) {
    gap: 12px;
    min-width: 0;
}
.member-confirm-person {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    min-width: 0;
}
.member-confirm-person > div {
    min-width: 0;
    overflow-wrap: anywhere;
}
.member-confirm-person small {
    display: block;
    color: var(--workspace-muted);
    font-size: 12px;
}
.remove-warning {
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #efd2d6;
    border-radius: 10px;
    background: #fff7f8;
    color: #8b2d37;
    line-height: 1.6;
}
.workspace-page #memberRows .actions {
    min-width: 160px;
}
.workspace-auth .auth-layout {
    width: 100%;
    min-width: 0;
}
.workspace-auth .auth-main {
    width: 100%;
    min-width: 0;
    padding: clamp(20px, 4vw, 60px);
    min-height: 100vh;
    min-height: 100dvh;
}
.workspace-auth .auth-card {
    width: 100%;
    max-width: 440px;
    min-width: 0;
    padding: 28px;
    background: #fff;
}
.workspace-auth.setup-page .auth-card {
    max-width: 640px;
    margin-inline: auto;
}
.workspace-auth .auth-card :is(input:not([type='checkbox']):not([type='radio']),select) {
    height: 44px;
    min-height: 44px;
    font-size: 14px;
    line-height: 1.5;
}
.workspace-auth .auth-card input:not([type='checkbox']):not([type='radio']) {
    padding: 10px 12px;
}
.workspace-auth .auth-card .password-field > input {
    padding-right: 49px;
}
.workspace-auth .auth-small {
    margin-top: 24px;
}
.workspace-auth.setup-page .auth-main {
    display: block;
}
.workspace-auth.setup-page .setup-photo {
    border-color: var(--workspace-line);
}
.workspace-page .password-field > .password-toggle,
.workspace-auth .password-field > .password-toggle {
    min-height: 34px;
    height: 34px;
    width: 34px;
    min-width: 34px;
    padding: 7px;
    margin: 0;
    flex: 0 0 auto;
}
.workspace-page .password-field > input,
.workspace-auth .password-field > input {
    padding-right: 49px;
}
.workspace-page .workspace-content .password-field > input {
    min-height: 42px;
}
/* Container queries also account for the width occupied by the sidebar. */
@container workspace (max-width: 1100px) {
    .controls-top {
        grid-template-columns: minmax(0, 1fr);
    }
}
@container workspace (max-width: 1350px) {
    .inbox-shell {
        grid-template-columns: minmax(230px, 30%) minmax(0, 1fr);
    }
    .filter-rail {
        display: block;
        position: fixed;
        z-index: 120;
        top: 80px;
        left: 12px;
        bottom: 12px;
        width: min(280px, calc(100vw - 24px));
        transform: translateX(calc(-100% - 24px));
        background: #fff;
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    .filter-rail.open {
        transform: translateX(0);
    }
    .context-panel {
        position: fixed;
        z-index: 120;
        top: 80px;
        right: 12px;
        bottom: 12px;
        width: min(420px, calc(100vw - 24px));
        transform: translateX(calc(100% + 24px));
        background: #fff;
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    .context-panel.open {
        transform: translateX(0);
    }
    #filter-toggle,
    #context-toggle {
        display: inline-flex;
    }
}
@container workspace (max-width: 850px) {
    .layout,
    .settings-layout,
    .definition-layout,
    .detail-layout,
    .profile-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .summary-grid,
    .metrics,
    .stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hero-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero,
    .overview {
        flex-wrap: wrap;
    }
    .controls-top {
        grid-template-columns: minmax(0, 1fr);
    }
    .editor-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .settings-nav {
        position: static;
    }
}
@container workspace (max-width: 600px) {
    .inbox-shell {
        display: block;
        position: relative;
        height: 650px;
        min-height: 650px;
        overflow: hidden;
    }
    .conversation-panel,
    .chat-panel {
        position: absolute;
        inset: 0;
    }
    .chat-panel {
        z-index: 1;
        transform: translateX(105%);
    }
    body.chat-open .chat-panel {
        transform: translateX(0);
    }
    .mobile-back {
        display: inline-flex;
    }
    .chat-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px;
    }
    .chat-actions {
        grid-column: 1 / -1;
        width: 100%;
        flex-wrap: wrap;
    }
    .assistant-conversation-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .assistant-conversation-actions {
        flex-wrap: wrap;
    }
    .field-grid,
    .check-grid,
    .filter-row,
    .detail-grid,
    .definition-grid,
    .catalog-summary-body,
    .comment-form-row {
        grid-template-columns: minmax(0, 1fr);
    }
    .summary-grid,
    .stats-row,
    .metrics {
        grid-template-columns: minmax(0, 1fr);
    }
    .module-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .context-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .setup-banner {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .setup-banner a {
        grid-column: 1 / -1;
    }
    .catalog-summary-heading {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .catalog-summary-heading button {
        grid-column: 1 / -1;
    }
    .controls-main,
    .controls-actions {
        align-items: stretch;
    }
    .controls-main > input,
    .controls-main > select,
    .controls-actions > select {
        flex-basis: 100%;
        width: 100%;
    }
    .hero-art {
        display: none;
    }
}
@media (max-width: 900px) {
    .workspace-shell,
    .shell.workspace-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .workspace-main,
    .shell .main-area {
        grid-column: 1;
    }
    .workspace-sidebar {
        width: min(280px, 85vw);
        transform: translateX(-100%);
        transition: transform 0.18s ease;
    }
    .workspace-sidebar.open {
        transform: translateX(0);
    }
    button.workspace-menu {
        display: inline-flex;
    }
    .workspace-topbar {
        min-height: 64px;
        padding: 12px 16px;
    }
    .workspace-content,
    .shell .content {
        padding: 18px 16px;
    }
}
@media (max-width: 600px) {
    .workspace-topbar-right time {
        display: none;
    }
    .workspace-breadcrumb > a,
    .workspace-breadcrumb > span {
        display: none;
    }
    .workspace-topbar {
        gap: 8px;
    }
    .workspace-content,
    .shell .content {
        padding: 16px 12px;
    }
    .workspace-content .container .row {
        --bs-gutter-x: 16px;
    }
    .workspace-page .modal-card {
        padding: 18px;
    }
    .workspace-content .page-heading {
        align-items: flex-start;
    }
    .workspace-content .table-toolbar input {
        width: 100%;
        max-width: none;
    }
    .workspace-content .hero-mode {
        min-width: 0;
        text-align: left;
    }
    .workspace-page .person-cell {
        min-width: 160px;
    }
    .workspace-auth .auth-main {
        padding: 24px 16px;
    }
    .workspace-auth .setup-photo {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (prefers-reduced-motion: reduce) {
    .workspace-sidebar {
        transition: none;
    }
}
.workspace-content :where(section, article, aside, div) {
    min-width: 0;
}
.workspace-content
    :is(.filter-rail, .context-panel, .rail-metrics, .ai-summary-card, .conversation-panel, .chat-panel) {
    background: #fff;
}
.workspace-content .message-timeline {
    background: #f8faff;
}
.workspace-content .assistant-conversation-bar {
    background: #f0f6fb;
}
.workspace-content
    :is(
        .ai-summary-title-copy strong,
        .timeline-empty strong,
        .empty-state strong,
        .conversation-empty strong
    ) {
    font-family: var(--workspace-heading-font);
    color: var(--workspace-ink);
}
.workspace-content :is(.stats-grid, .stats) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
    gap: 12px;
    overflow: visible;
}
.workspace-content :is(.stat-card, .stats > article, .stats > div) {
    background: #fff;
    color: var(--workspace-ink);
}
.workspace-content :is(.title-wrap, .heading) > div {
    min-width: 0;
}
.workspace-content .stat-card span {
    color: var(--workspace-muted);
}
.workspace-content #deleteSelectedButton {
    color: var(--workspace-danger);
}
@container workspace (max-width: 1350px) {
    .inbox-shell {
        grid-template-columns: minmax(230px, 30%) minmax(0, 1fr);
    }
    .inbox-shell .filter-rail {
        position: fixed;
        z-index: 120;
        top: 80px;
        left: 12px;
        bottom: 12px;
        width: min(280px, calc(100vw - 24px));
        transform: translateX(calc(-100% - 24px));
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    .inbox-shell .filter-rail.open {
        transform: translateX(0);
    }
    .inbox-shell .context-panel {
        position: fixed;
        z-index: 120;
        top: 80px;
        right: 12px;
        bottom: 12px;
        width: min(420px, calc(100vw - 24px));
        transform: translateX(calc(100% + 24px));
        overflow-y: auto;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
    .inbox-shell .context-panel.open {
        transform: translateX(0);
    }
    #filter-toggle,
    #context-toggle {
        display: inline-flex;
    }
}
@container workspace (max-width: 600px) {
    .inbox-shell {
        display: block;
        min-height: 650px;
    }
    .stats-grid,
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .workspace {
        grid-template-columns: minmax(0, 1fr);
    }
    .chat-header,
    .assistant-conversation-actions {
        flex-wrap: wrap;
    }
    .conversation-name-line {
        min-width: 0;
    }
}
.workspace-content
    :is(.range-tabs, .range-buttons, .period-tabs, .period-buttons, .date-tabs, .date-range-buttons) {
    flex-wrap: wrap;
    max-width: 100%;
}
.workspace-page .workspace-control[class*='danger']:disabled,
.workspace-page .workspace-control[id*='delete']:disabled {
    color: var(--workspace-danger);
}
.workspace-content .range-toggle,
.workspace-content .trend-controls,
.workspace-content .trend-topline,
.workspace-content .custom-range-fields {
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}
.workspace-content .range-toggle button {
    flex: 0 1 auto;
    min-width: 0;
}
/* Consistent control sizes. Row cards keep their own grid and alignment. */
.workspace-page .workspace-control,
.workspace-page .btn {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 9px;
    min-height: 38px;
    padding: 9px 14px;
    overflow-wrap: normal;
}
.workspace-page
    :is(
        .primary-action,
        .primary-button,
        .sync-button,
        .create-button,
        .btn.primary,
        .btn-primary,
        .update-btn,
        .draft-action.approve,
        .ai-generate-button,
        button[type='submit']
    ) {
    color: #fff;
    background: linear-gradient(120deg, #187f75, #216b88);
    border: 1px solid #187f75;
    box-shadow: 0 3px 10px rgb(24 127 117 / 12%);
}
.workspace-page
    :is(
        .primary-action,
        .primary-button,
        .sync-button,
        .create-button,
        .btn.primary,
        .btn-primary,
        .update-btn,
        .draft-action.approve,
        .ai-generate-button,
        button[type='submit']
    ):hover {
    background: #12695f;
    color: #fff;
}
.workspace-page button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.workspace-page #ai-provider-redeem-panel {
    margin: 20px 24px 24px;
    padding: 20px;
    background: #f8faff;
}
.workspace-page #ai-provider-redeem-panel .field-grid {
    margin: 18px 0 16px;
    grid-template-columns: minmax(0, 1fr);
}
.workspace-page #ai-provider-redeem {
    display: inline-flex;
    width: auto;
    min-height: 40px;
    margin: 0 0 8px;
    padding: 10px 18px;
    color: #fff;
    background: linear-gradient(120deg, #187f75, #216b88);
    border-color: var(--workspace-primary);
}
.workspace-page #ai-provider-redeem:hover {
    color: #fff;
    background: var(--workspace-primary-dark);
}
.workspace-page .ai-provider-controls {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    align-items: center;
}
.workspace-page .ai-provider-controls button {
    margin: 0;
}
.workspace-page #grid-container {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: repeat(auto-fill, minmax(min(235px, 100%), 1fr));
    gap: 16px;
}
.workspace-page #grid-container .grid-item {
    min-width: 0;
    overflow: hidden;
}
.workspace-page #grid-container .card-body {
    padding: 14px;
}
.workspace-page #grid-container h5 {
    font-size: 14px;
    line-height: 1.5;
}
.workspace-page #grid-container :is(.card-meta, .update-section, .update-actions) {
    min-width: 0;
}
.workspace-page #grid-container .update-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}
.workspace-page #grid-container .update-section :is(select, input) {
    width: 100%;
}
.workspace-page #grid-container .update-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.workspace-page #grid-container .update-actions button {
    flex: 1;
    min-width: 0;
}
/* Customer inbox is a viewport workspace. Each feed scrolls independently. */
body.customer-inbox-page {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}
.customer-inbox-page .workspace-shell {
    height: 100%;
    min-height: 0;
}
.customer-inbox-page .workspace-main {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}
.customer-inbox-page .workspace-topbar {
    flex: 0 0 64px;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.customer-inbox-page .workspace-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 12px 16px 16px;
}
.customer-inbox-page .page-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
}
.customer-inbox-page .module-header {
    flex: 0 0 auto;
    margin: 0 0 12px;
    gap: 10px;
}
.customer-inbox-page .inbox-title {
    margin: 0;
    font-size: 20px;
}
.customer-inbox-page .topbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.customer-inbox-page .store-pill {
    border: 0;
    background: none;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 500;
}
.customer-inbox-page .assistant-global-tag {
    min-height: 32px;
    padding: 5px 8px;
    border: 0;
    background: #eef5f3;
    color: #476d66;
}
.customer-inbox-page .inbox-shell {
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    grid-template-columns: 260px minmax(0, 1fr) 330px;
}
.customer-inbox-page :is(.conversation-panel, .chat-panel, .context-panel, .filter-rail) {
    min-height: 0;
    height: 100%;
}
.customer-inbox-page .conversation-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.customer-inbox-page .conversation-tools {
    flex: 0 0 auto;
    padding: 12px;
}
.customer-inbox-page .conversation-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
    overscroll-behavior: contain;
}
.customer-inbox-page .conversation-list .conversation-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    align-items: start;
    gap: 9px;
    padding: 12px;
    margin: 0;
    width: 100%;
    min-height: 90px;
    height: auto;
    text-align: left;
    background: #fff;
    font-size: 12px;
    font-weight: 400;
}
.customer-inbox-page .conversation-list .conversation-row:hover {
    background: #f8faff;
}
.customer-inbox-page .conversation-list .conversation-row.active {
    background: #edf7f5;
}
.customer-inbox-page .conversation-row .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eaf0f7;
    color: #61758e;
    font-size: 12px;
    font-weight: 600;
}
.customer-inbox-page .conversation-copy > .conversation-name-line {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0 0 4px;
    gap: 5px;
}
.customer-inbox-page .conversation-name-line strong {
    min-width: 0;
    max-width: 100%;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--workspace-ink);
}
.customer-inbox-page .conversation-copy > span {
    color: var(--workspace-muted);
    font-size: 11px;
    line-height: 1.5;
    margin-top: 4px;
}
.customer-inbox-page .conversation-copy > .conversation-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    white-space: normal;
}
.customer-inbox-page .conversation-meta .tag {
    padding: 0;
    border: 0;
    background: none;
    border-radius: 0;
    color: #71829a;
    font-size: 10px;
    font-weight: 500;
    text-transform: none;
    line-height: 1.4;
}
.customer-inbox-page .conversation-meta .tag.overdue {
    color: #a93e49;
}
.customer-inbox-page .conversation-meta .tag.due-soon {
    color: #947024;
}
.customer-inbox-page .conversation-side {
    min-width: 0;
    gap: 6px;
}
.customer-inbox-page .conversation-time {
    font-size: 9px;
    font-weight: 400;
}
.customer-inbox-page :is(.blocked-mark, .send-state) {
    padding: 0;
    border: 0;
    background: none;
    font-size: 9px;
    white-space: normal;
}
.customer-inbox-page .unread-badge {
    min-width: 18px;
    padding: 2px 5px;
    font-size: 9px;
    font-weight: 600;
    background: #187f75;
}
.customer-inbox-page .chat-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    overflow: hidden;
}
.customer-inbox-page .chat-header {
    grid-row: 1;
    min-width: 0;
}
.customer-inbox-page .assistant-conversation-bar {
    grid-row: 2;
}
.customer-inbox-page .message-timeline {
    grid-row: 3;
}
.customer-inbox-page .timeline-status {
    grid-row: 4;
}
.customer-inbox-page .composer-shell {
    grid-row: 5;
}
.customer-inbox-page .active-buyer {
    flex: 1 1 0;
}
.customer-inbox-page .active-buyer > .avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    font-size: 11px;
}
.customer-inbox-page .active-buyer strong {
    font-size: 12px;
}
.customer-inbox-page .chat-header {
    min-height: 56px;
    padding: 10px 12px;
}
.customer-inbox-page .assistant-conversation-bar {
    padding: 8px 12px;
    gap: 8px;
    min-height: 0;
}
.customer-inbox-page .assistant-conversation-copy small,
.customer-inbox-page .assistant-kicker {
    display: none;
}
.customer-inbox-page .assistant-mode-tag {
    min-width: 36px;
    min-height: 28px;
    padding: 6px;
    font-size: 10px;
    background: #edf0f5;
    color: #586b82;
    border-radius: 7px;
}
.customer-inbox-page .assistant-conversation-copy strong {
    font-size: 11px;
    font-weight: 600;
}
.customer-inbox-page .assistant-conversation-copy {
    min-width: 0;
    flex: 1 1 90px;
}
.customer-inbox-page .assistant-conversation-actions {
    gap: 6px;
    flex-wrap: wrap;
}
.customer-inbox-page .assistant-conversation-actions button,
.customer-inbox-page .assistant-settings-link {
    min-height: 30px;
    padding: 6px 8px;
    font-size: 10px;
}
.customer-inbox-page .message-timeline {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px;
}
.customer-inbox-page .composer-shell {
    min-width: 0;
    padding: 10px 12px;
    margin: 0;
    background: #fff;
}
.customer-inbox-page .composer-toolbar {
    gap: 5px;
    margin-bottom: 7px;
}
.customer-inbox-page .composer-toolbar button {
    min-height: 30px;
    padding: 5px 8px;
}
.customer-inbox-page .conversation-time {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.customer-inbox-page .chat-actions button {
    white-space: nowrap;
    overflow-wrap: normal;
    flex: 0 0 auto;
}
.customer-inbox-page #context-toggle {
    min-width: 58px;
}
.customer-inbox-page .filter-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}
.customer-inbox-page .filter-button > span:last-child {
    flex: 0 0 auto;
    margin-left: 8px;
}
.customer-inbox-page .context-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.customer-inbox-page .composer-shell textarea {
    display: block;
    min-height: 64px;
    height: 72px;
    max-height: 180px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}
.customer-inbox-page .composer-footer {
    margin-top: 6px;
    gap: 6px;
}
.customer-inbox-page .composer-footer > span:first-child {
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.customer-inbox-page .composer-footer button {
    min-height: 32px;
    padding: 7px 12px;
}
.customer-inbox-page .context-panel {
    overflow-y: auto;
    padding: 14px;
}
.customer-inbox-page :is(.context-heading, .block-heading) {
    font-size: 11px;
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0;
}
.customer-inbox-page .ai-summary-title-copy strong {
    font-size: 16px;
}
.customer-inbox-page .ai-summary-card {
    padding: 14px;
}
.customer-inbox-page .ai-usage-panel {
    border-top: 1px solid var(--workspace-line);
    margin: 18px 0 0;
    padding: 16px 0 0;
}
.customer-inbox-page #ai-usage-title {
    font-size: 13px;
    font-weight: 600;
}
.customer-inbox-page #ai-usage-content :is(h4, p) {
    font-size: 11px;
    line-height: 1.65;
}
.customer-inbox-page #ai-usage-content h4 {
    font-weight: 600;
}
.customer-inbox-page .ai-usage-panel .block-heading {
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.customer-inbox-page .drawer-close {
    display: none;
}
@container workspace (max-width: 1180px) {
    .customer-inbox-page .inbox-shell {
        grid-template-columns: 250px minmax(0, 1fr);
    }
    .customer-inbox-page .inbox-shell :is(.filter-rail, .context-panel) {
        height: auto;
        top: 80px;
        bottom: 12px;
    }
    .customer-inbox-page .drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 0;
        width: 28px;
        height: 28px;
        min-height: 28px;
        border: 0;
        border-radius: 7px;
        background: #f1f5fa;
        color: var(--workspace-muted);
        font-size: 20px;
        font-weight: 400;
        cursor: pointer;
    }
}
@container workspace (max-width: 700px) {
    .customer-inbox-page .inbox-shell {
        display: block;
        position: relative;
        height: 100%;
        min-height: 0;
    }
    .customer-inbox-page .conversation-panel,
    .customer-inbox-page .chat-panel {
        position: absolute;
        inset: 0;
        height: 100%;
    }
    .customer-inbox-page .chat-panel {
        display: grid;
        transform: translateX(105%);
    }
    body.chat-open .chat-panel {
        transform: translateX(0);
    }
    .customer-inbox-page .assistant-conversation-bar {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
    .customer-inbox-page .assistant-conversation-actions {
        width: auto;
    }
    .customer-inbox-page .assistant-conversation-actions :is(a, button) {
        flex: 0 1 auto;
    }
    .customer-inbox-page .chat-header {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 6px;
        padding: 8px;
        min-height: 50px;
    }
    .customer-inbox-page .active-buyer {
        min-width: 0;
    }
    .customer-inbox-page .active-buyer small {
        display: none;
    }
    .customer-inbox-page .chat-actions {
        grid-column: auto;
        width: auto;
        flex: 0 1 auto;
    }
    .customer-inbox-page .chat-actions #mark-read-button {
        min-width: 32px;
        width: 32px;
        height: 32px;
        padding: 6px;
        font-size: 0;
    }
    .customer-inbox-page #mark-read-button::before {
        content: '✓';
        font-size: 15px;
        line-height: 1;
    }
    .customer-inbox-page .mobile-back {
        padding: 6px;
        font-weight: 600;
        font-size: 11px;
    }
    .customer-inbox-page .chat-actions button {
        min-height: 30px;
        padding: 6px 8px;
        font-size: 10px;
    }
    .customer-inbox-page .composer-footer > span:first-child {
        display: none;
    }
    .customer-inbox-page .enter-send-preference {
        font-size: 10px;
    }
}
@media (max-width: 600px) {
    .customer-inbox-page .workspace-content {
        padding: 10px 8px 8px;
    }
    .customer-inbox-page .inbox-title {
        display: none;
    }
    .customer-inbox-page .topbar-actions {
        gap: 6px;
    }
    .customer-inbox-page .assistant-global-tag {
        order: initial;
        width: auto;
        min-height: 32px;
    }
    .customer-inbox-page .topbar-actions :is(button, a) {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 10px;
    }
    .customer-inbox-page #assistant-global-tag {
        max-width: 90px;
    }
    .workspace-page #ai-provider-redeem-panel {
        margin: 16px;
        padding: 16px;
    }
}
.workspace-page .upload-center {
    width: 100%;
    min-width: 0;
}
.workspace-page .upload-columns {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 20px;
}
.workspace-page .upload-panel {
    min-width: 0;
    padding: 22px;
    margin: 0;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: #fff;
}
.workspace-page .upload-panel:has(#uploadForm) {
    border-radius: 8px;
}
.workspace-page .upload-panel .panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 20px;
}
.workspace-page .upload-panel .panel-title h2 {
    font-size: 17px;
    margin: 0;
}
.workspace-page .upload-panel .field {
    margin-bottom: 18px;
}
.workspace-page .upload-panel .field input {
    width: 100%;
    padding: 10px 12px;
    margin: 0 0 7px;
}
.workspace-page .upload-panel .form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}
.workspace-page .upload-panel .form-footer span {
    font-size: 11px;
}
.workspace-page .upload-panel .muted {
    font-size: 11px;
}
.workspace-page #allImageLinks {
    width: 100%;
    min-width: 0;
    height: 170px;
    min-height: 120px;
    resize: vertical;
    padding: 12px;
    font-size: 12px;
    margin-bottom: 14px;
}
.workspace-page .upload-preview-panel {
    margin-top: 20px;
}
.workspace-page .upload-empty {
    padding: 36px 16px;
    text-align: center;
    color: var(--workspace-muted);
    border-radius: 12px;
    background: #f8faff;
}
.workspace-page #imageGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
    gap: 16px;
    min-width: 0;
}
.workspace-page .upload-image-card {
    min-width: 0;
    border: 0;
    border-radius: 5px;
    overflow: hidden;
    background: #fff;
}
.workspace-page .upload-image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #f8faff;
    cursor: grab;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.workspace-page .upload-image-card small {
    display: block;
    padding: 10px;
    font-size: 11px;
    overflow-wrap: anywhere;
}
@container workspace (max-width: 800px) {
    .workspace-page .upload-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}
.customer-inbox-page .assistant-conversation-bar[data-mode='OFF'] .assistant-conversation-actions button:disabled {
    display: none;
}
@media (max-height: 650px) {
    .customer-inbox-page .inbox-title {
        display: none;
    }
}
@media (max-height: 500px) {
    .customer-inbox-page .topbar-actions > [data-owner-only],
    .customer-inbox-page .assistant-conversation-bar[data-mode='OFF'] {
        display: none;
    }
}
@media (max-height: 500px) {
    .customer-inbox-page .chat-header {
        padding: 8px 10px;
        min-height: 48px;
    }
    .customer-inbox-page .active-buyer small {
        display: none;
    }
    .customer-inbox-page .composer-shell {
        padding: 8px 10px;
    }
    .customer-inbox-page .composer-shell textarea {
        min-height: 40px;
        height: 40px;
        padding: 8px 10px;
    }
    .customer-inbox-page .composer-toolbar {
        margin-bottom: 4px;
    }
    .customer-inbox-page .composer-toolbar button {
        min-height: 28px;
        height: 28px;
        padding: 4px 6px;
    }
    .customer-inbox-page .composer-footer {
        margin-top: 4px;
    }
}
/* Loading states share one indicator in every module. */
:is(.workspace-page, .workspace-auth) .workspace-loading,
.workspace-page .loading:not(button) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    min-height: 56px;
    width: 100%;
    max-width: 100%;
    grid-column: 1 / -1;
    margin: 10px 0;
    padding: 14px 16px;
    border: 1px solid var(--workspace-line);
    border-radius: 12px;
    background: #f8faff;
    color: var(--workspace-muted);
    font: 500 12px/1.5 var(--workspace-body-font);
    text-align: center;
    animation: none;
    overflow-wrap: anywhere;
}
:is(.workspace-page, .workspace-auth) :is(.workspace-loading, .workspace-busy)::before,
.workspace-page .loading:not(button)::before {
    content: '';
    display: inline-block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 2px solid #cbdedb;
    border-top-color: var(--workspace-primary);
    border-radius: 50%;
    animation: workspace-spin 0.8s linear infinite;
}
.workspace-page .workspace-loading-inline {
    display: inline-flex;
    justify-content: flex-start;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}
.workspace-page .workspace-loading-inline::before {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
}
:is(.workspace-page, .workspace-auth) .workspace-busy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
:is(.workspace-page, .workspace-auth) .workspace-busy::before {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
    border-color: currentColor;
    border-right-color: transparent;
}
:is(.workspace-page, .workspace-auth) .workspace-busy > .fa-spinner {
    display: none;
}
.workspace-page .fa-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #cbdedb;
    border-top-color: var(--workspace-primary);
    border-radius: 50%;
    animation: workspace-spin 0.8s linear infinite;
}
.workspace-page .fa-spinner::before {
    content: none;
}
.workspace-page :is(.status-message, .ai-summary-loading).workspace-loading::before {
    width: 18px;
    height: 18px;
    border-width: 2px;
    animation: workspace-spin 0.8s linear infinite;
}
.workspace-page #loading.workspace-loading {
    margin: 16px 0;
}
@keyframes workspace-spin {
    to {
        transform: rotate(360deg);
    }
}
@media (prefers-reduced-motion: reduce) {
    :is(.workspace-page, .workspace-auth) :is(.workspace-loading, .workspace-busy)::before,
    .workspace-page .loading:not(button)::before,
    .workspace-page .fa-spinner {
        animation: none;
    }
}
/* One wide Inbox column keeps every view visible on laptop screens. */
.customer-inbox-page .inbox-shell {
    grid-template-columns: minmax(310px, 360px) minmax(0, 1fr) minmax(310px, 360px);
}
.customer-inbox-page .conversation-tools {
    padding: 16px;
}
.customer-inbox-page .inbox-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.customer-inbox-page .inbox-heading h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.customer-inbox-page .inbox-count {
    padding: 3px 10px;
    background: var(--workspace-soft);
    color: var(--workspace-primary-dark);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}
.customer-inbox-page .inbox-view {
    width: 100%;
    height: 38px;
    margin-bottom: 10px;
    padding: 7px 10px;
}
.customer-inbox-page .inbox-status-row {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
}
.customer-inbox-page #sync-status {
    min-width: 0;
    font-size: 10px;
    margin: 10px 0 0;
}
.customer-inbox-page #sync-status.workspace-loading {
    justify-content: flex-start;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
}
.customer-inbox-page #sync-status.workspace-loading::before {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
}
.customer-inbox-page .inbox-insights {
    position: relative;
    flex: 0 0 auto;
    font-size: 10px;
    color: var(--workspace-muted);
    margin-top: 10px;
}
.customer-inbox-page .inbox-insights > summary {
    cursor: pointer;
}
.customer-inbox-page .inbox-insights .performance-card {
    position: absolute;
    z-index: 5;
    right: 0;
    top: 20px;
    width: 240px;
    padding: 14px;
    margin: 0;
    background: #fff;

}
.customer-inbox-page #inbox-toggle {
    display: none;
}
@container workspace (max-width: 1350px) {
    .customer-inbox-page .inbox-shell {
        grid-template-columns: minmax(310px, 36%) minmax(0, 1fr);
    }
}
@container workspace (max-width: 700px) {
    .customer-inbox-page .inbox-shell {
        display: block;
    }
    .customer-inbox-page #inbox-toggle {
        display: inline-flex;
    }
}
.workspace-page #grid-container {
    grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
}
.workspace-page #grid-container .card-body {
    padding: 16px;
}
.workspace-page #grid-container h5 {
    font-size: 15px;
}
.product-customization-page .catalog-panel .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}
.product-customization-page .catalog-panel #sync-button {
    width: auto;
    min-width: 96px;
    height: 40px;
    padding: 10px 16px;
    align-self: end;
    white-space: nowrap;
}
@container workspace (max-width: 400px) {
    .product-customization-page .catalog-panel .toolbar {
        grid-template-columns: minmax(0, 1fr);
    }
    .product-customization-page .catalog-panel #sync-button {
        justify-self: start;
    }
}
/* A single brand mark across the workspace. */
.workspace-page .workspace-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 0 5px;
}
.workspace-page .workspace-brand .workspace-brand-logo {
    display: block;
    width: 190px;
    max-width: 100%;
    height: auto;
    border-radius: 0;
}
.workspace-page .workspace-brand-caption {
    padding-left: 64px;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: var(--workspace-muted);
}
/* Compact review controls and a separate administration card. */
.customer-inbox-page .ai-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.customer-inbox-page .ai-summary-actions button {
    width: auto;
    flex: 0 1 auto;
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}
.customer-inbox-page .ai-usage-panel {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #d1e3e9;
    border-radius: 14px;
    background: #f1f8fa;
    box-shadow: none;
}
.customer-inbox-page .ai-usage-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.customer-inbox-page .ai-usage-heading > span {
    min-width: 0;
}
.customer-inbox-page .ai-usage-heading .eyebrow {
    display: block;
    color: #64858f;
    font-size: 9px;
    margin-bottom: 4px;
}
.customer-inbox-page .ai-usage-heading strong {
    display: block;
    font-size: 14px;
    line-height: 1.5;
}
.customer-inbox-page .ai-usage-refresh {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 7px;
    border: 1px solid #c7dde4;
    border-radius: 9px;
    color: #327989;
    background: #fff;
}
.customer-inbox-page .ai-usage-refresh svg {
    width: 18px;
    height: 18px;
}
.customer-inbox-page .ai-usage-panel .ai-summary-section {
    background: #fff;
    padding: 12px;
}
.customer-inbox-page .ai-usage-panel .ai-summary-section h4 {
    color: #366573;
    font-size: 12px;
    line-height: 1.6;
}
.customer-inbox-page .ai-usage-panel .ai-summary-section p {
    font-size: 11px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.customer-inbox-page .ai-usage-panel .ai-empty-copy {
    margin-top: 12px;
    font-size: 10px;
    line-height: 1.7;
    color: #6b828b;
}
.customer-inbox-page .message-image-preview {
    display: block;
    max-width: 100%;
    width: fit-content;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    cursor: zoom-in;
    overflow: hidden;
}
.customer-inbox-page .message-image-preview:focus-visible {
    outline: 3px solid var(--workspace-primary);
    outline-offset: 3px;
}
.customer-inbox-page .message-image-preview .message-image {
    display: block;
    margin: 0;
    max-width: 100%;
}
.customer-inbox-page .pink-editor-field {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    font-size: 11px;
    font-weight: 600;
}
.customer-inbox-page .pink-editor-field .pink-description-editor {
    width: 100%;
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    font-weight: 400;
}
.customer-inbox-page .pink-asset-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 12px;
}
.customer-inbox-page .pink-asset-editor {
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--workspace-line);
    background: #fff;
    border-radius: 12px;
}
.customer-inbox-page .pink-asset-editor .pink-asset-chip {
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    min-width: 0;
}
.customer-inbox-page .pink-asset-editor .pink-asset-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4/3;
    height: auto;
    min-height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f8fb;
}
.customer-inbox-page .pink-asset-editor .pink-asset-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.customer-inbox-page .pink-filename-label {
    display: grid;
    gap: 6px;
    font-size: 10px;
    color: var(--workspace-muted);
    margin-top: 10px;
}
.customer-inbox-page .pink-filename-field {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.customer-inbox-page .pink-filename-input {
    width: 100%;
    min-width: 0;
    font-size: 11px;
    height: 36px;
    padding: 7px 8px;
}
.customer-inbox-page .pink-filename-extension {
    flex: 0 0 auto;
    color: #7b8b9d;
    font-size: 10px;
}
.customer-inbox-page .pink-asset-editor .pink-asset-name {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    overflow-wrap: anywhere;
}
.customer-inbox-page .pink-handoff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.customer-inbox-page .pink-handoff-actions button {
    min-width: 0;
    width: auto;
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 11px;
}

.customer-inbox-page .ai-usage-refresh.workspace-busy::before {
    content: none;
}
.customer-inbox-page .ai-usage-refresh[aria-busy='true'] svg {
    animation: workspace-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .customer-inbox-page .ai-usage-refresh[aria-busy='true'] svg {
        animation: none;
    }
}

.workspace-page #summary-lightbox-status {
    padding: 24px;
    color: #cbd9e8;
    text-align: center;
    font-size: 13px;
}

/* Upload Center replaced its old container/form: retain those native surfaces. */
.workspace-page .upload-center :is(input, textarea) {
    border: 1px solid #ccc;
    border-radius: 5px;
}
.workspace-page .upload-center button {
    border: none;
    border-radius: 5px;
    box-shadow: none;
}

/* Bootstrap cards used 0.375rem at the old 16px root size. Keep that shape
   while retaining the current 14px workspace typography. */
.workspace-page .card {
    --bs-card-border-radius: 6px;
}

/* Compact block corners across modules; image/avatar and tag shapes remain local. */
.workspace-page :is(.panel, .card, .grid-item, .table-panel, .role-card, .chart-container,
    .metric, .metrics > article, .summary-grid > div, .settings-card, .section-card,
    .filter-panel, .detail-panel, .settings-nav, .box, .overview, .hero, .settings-hero,
    .module-card, .profile-card, .stat-card, .stats > article, .stats > div,
    .catalog-panel, .editor-panel, .catalog-summary, .definition-card, .detail-card,
    .order-card, .product-card, .session-card, .ai-summary-card, .ai-summary-section,
    .ai-item-card, .ai-usage-panel, .performance-card, .upload-panel, .order-kpi,
    .order-block, .order-table-wrap, .order-issue-card, .modal-card, .modal-content,
    .dialog-card, dialog, .summary-lightbox-dialog, .inbox-shell, .message-bubble,
    .workspace-loading, .loading, .notice, .status-message),
.workspace-auth .auth-card {
    border-radius: 8px;
}
:is(.workspace-page, .workspace-auth) .workspace-status-empty {
    display: none !important;
}
