:root {
    --bc-content-max: 1560px;
    --bc-sidebar-width: 238px;
    --bc-page-gutter: 1.25rem;
    --bc-space-1: 0.25rem;
    --bc-space-2: 0.5rem;
    --bc-space-3: 0.75rem;
    --bc-space-4: 1rem;
    --bc-space-5: 1.25rem;
    --bc-space-6: 1.5rem;
    --bc-control-height: 2.5rem;
    --bc-canvas: #f4f6f8;
    --bc-surface: #ffffff;
    --bc-surface-strong: #ffffff;
    --bc-surface-subtle: #f8fafc;
    --bc-surface-muted: #eef2f6;
    --bc-text: #172334;
    --bc-text-strong: #0d1827;
    --bc-muted: #5f6d7c;
    --bc-muted-strong: #465568;
    --bc-border: #d8e0e8;
    --bc-border-strong: #c3ced9;
    --bc-radius-control: 0.55rem;
    --bc-radius-panel: 0.8rem;
    --bc-shadow-sm: 0 1px 2px rgba(15, 32, 48, 0.05);
    --bc-shadow-md: 0 8px 24px rgba(15, 32, 48, 0.08);
    --bc-focus: #c86808;
    --bc-primary: #155d91;
    --bc-primary-strong: #0e4772;
    --bc-primary-soft: #e8f1f8;
    --bc-accent: #d97706;
    --bc-positive: #18794e;
    --bc-warning: #a15c07;
    --bc-danger: #a02f43;
    --bc-sidebar: #102235;
    --bc-sidebar-strong: #0b1928;
    --bc-sidebar-text: #e8eef5;
    --bc-sidebar-muted: #9fb0c1;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family:
        Inter,
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: var(--bc-canvas);
    color: var(--bc-text);
}

body {
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select,
input,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid var(--bc-focus);
    outline-offset: 3px;
}

.sidebar :focus-visible,
.auth-hero :focus-visible {
    outline-color: #f4b23a;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1100;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    background: #0b1826;
    color: #ffffff;
    font-weight: 800;
    transform: translateY(calc(-100% - 1rem));
    transition: transform 120ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.route-focus-visible:focus {
    outline: 3px solid #c36a08;
    outline-offset: 0.35rem;
    border-radius: 0.2rem;
}

.app-shell {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    min-width: 0;
    max-width: 100%;
    min-height: 100vh;
}

.sidebar {
    padding: 1.5rem;
    border-right: 1px solid rgba(25, 40, 60, 0.08);
    background: rgba(11, 24, 38, 0.94);
    color: #eaf1fa;
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1.75rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #f4b23a, #ff7d34);
    color: #1c1c1c;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-kicker,
.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
}

.brand-kicker {
    color: rgba(234, 241, 250, 0.72);
}

.eyebrow {
    color: #526273;
    font-weight: 700;
}

.brand-title {
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.nav-stack {
    display: grid;
    gap: 0.45rem;
}

.nav-group-title {
    margin: 1rem 0 0.15rem;
    padding: 0 0.9rem;
    color: rgba(234, 241, 250, 0.5);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-stack a {
    display: flex;
    align-items: center;
    min-height: 2.8rem;
    padding: 0.65rem 0.9rem;
    border-radius: 0.85rem;
    color: rgba(234, 241, 250, 0.82);
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-stack a:hover,
.nav-stack a.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.session-card {
    margin-top: 1.8rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.session-card strong,
.session-card p {
    display: block;
    margin: 0.2rem 0 0;
}

.session-card p {
    color: rgba(234, 241, 250, 0.72);
}

.chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(25, 50, 73, 0.14);
    background: #e7edf3;
    color: #24384d;
    font-size: 0.84rem;
}

.ghost-button {
    margin-top: 0.85rem;
    width: 100%;
    border: 1px solid rgba(20, 48, 73, 0.24);
    background: #edf2f7;
    color: #173a5b;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    cursor: pointer;
}

.ghost-button:hover:not(:disabled) {
    background: #e2eaf1;
}

.ghost-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sidebar .eyebrow,
.auth-hero .eyebrow {
    color: rgba(234, 241, 250, 0.78);
}

.sidebar .chip {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    color: #f5f8fc;
}

.sidebar .ghost-button {
    border-color: rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #f5f8fc;
}

.sidebar .session-profile-link {
    width: 100%;
    margin-top: 0.55rem;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.06);
    color: #eaf1fa;
    font-weight: 650;
}

.sidebar .session-profile-link:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
}

.sidebar .ghost-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.workspace {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.25rem;
}

.topbar {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.2rem;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(26, 40, 58, 0.08);
    box-shadow: 0 18px 45px rgba(18, 30, 48, 0.08);
}

.workspace-title {
    margin: 0.25rem 0 0;
    font-size: clamp(1.3rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.topbar-title > div,
.workspace-title,
.page-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mobile-nav-toggle {
    display: none;
    min-width: 2.8rem;
    min-height: 2.8rem;
    border: 1px solid rgba(20, 36, 53, 0.14);
    border-radius: 0.8rem;
    background: white;
    color: #0e3c67;
    cursor: pointer;
}

.select-field {
    display: grid;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #4e5a6a;
}

.select-field input,
.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(20, 36, 53, 0.14);
    background: rgba(255, 255, 255, 0.96);
    color: #102131;
}

.organization-picker {
    min-width: min(30rem, 80vw);
}

.organization-switcher {
    position: relative;
}

.organization-switch-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.15rem 0.7rem;
    min-width: min(19rem, 70vw);
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(20, 36, 53, 0.14);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    color: #102131;
    cursor: pointer;
    text-align: left;
}

.organization-switch-button .eyebrow { grid-column: 1 / -1; color: #687788; }
.organization-switch-button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization-popover {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    z-index: 20;
    display: grid;
    gap: 0.7rem;
    width: min(28rem, 82vw);
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
    padding: 1rem;
    border: 1px solid rgba(20, 36, 53, 0.14);
    border-radius: 1rem;
    background: white;
    box-shadow: 0 18px 45px rgba(18, 30, 48, 0.18);
}

.organization-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    border: 0;
    background: rgba(8, 19, 30, 0.2);
    cursor: default;
}

.organization-popover {
    z-index: 101;
}

.organization-popover-heading { display: flex; justify-content: space-between; gap: 1rem; }
.organization-popover-heading > div { display: grid; gap: 0.15rem; }
.organization-popover-heading small { font-size: 0.8rem; }
.ghost-button.compact { width: auto; min-width: 2.3rem; margin-top: 0; padding: 0.3rem 0.6rem; }

.organization-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
}

.organization-search-row input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(20, 36, 53, 0.14);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.96);
    color: #102131;
}

.organization-results {
    display: grid;
    gap: 0.4rem;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid rgba(20, 36, 53, 0.1);
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.7);
}

.organization-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.6rem;
    background: rgba(245, 248, 250, 0.9);
}

.organization-result > div {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.organization-result strong,
.organization-result .muted {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.organization-empty {
    margin: 0;
}

.workspace-body {
    display: grid;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
}

.workspace-body > * {
    min-width: 0;
    max-width: 100%;
}

.loading-region {
    display: grid;
    justify-items: start;
    gap: 0.35rem;
    min-height: 10rem;
    padding: 2rem;
    border: 1px solid rgba(24, 38, 54, 0.08);
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.78);
}

.loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0.5rem;
    border: 3px solid rgba(25, 91, 146, 0.2);
    border-top-color: #195b92;
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}

.action-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin: 0 0.4rem 0 0;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 800ms linear infinite;
    vertical-align: -0.15rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.navigation-progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: 0.24rem;
    background: linear-gradient(90deg, #f4b23a, #195b92, #f4b23a);
    background-size: 200% 100%;
    animation: navigation-progress 900ms linear infinite;
}

.navigation-progress span {
    position: absolute;
    left: -10000px;
}

@keyframes navigation-progress {
    from { background-position: 0 0; }
    to { background-position: 200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner,
    .action-spinner,
    .navigation-progress {
        animation: none;
    }
}

.hero-grid,
.dashboard-grid,
.panel-grid,
.split-grid {
    display: grid;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.85fr);
    align-items: stretch;
}

.split-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
    align-items: start;
}

.split-grid.detail-focused > :first-child { grid-column: 2; }
.split-grid.detail-focused > :last-child { grid-column: 1; grid-row: 1; }

.product-detail-view,
.product-list-view {
    display: flex;
    flex-direction: column;
}

.product-browser { display: flex; flex-direction: column; }

.product-detail-view { order: 1; }
.product-list-view { order: 2; }

.product-workspace-section {
    overflow: hidden;
    border: 1px solid rgba(24, 38, 54, 0.08);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.62);
}

.product-workspace-section + .product-workspace-section { margin-top: 1rem; }

.product-workspace-section-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.1rem;
    color: #102131;
    cursor: pointer;
    list-style: none;
}

.product-workspace-section-summary::-webkit-details-marker { display: none; }
.product-workspace-section-summary::after { content: "⌄"; color: #195b92; font-size: 1.1rem; }
.product-workspace-section[open] > .product-workspace-section-summary { border-bottom: 1px solid rgba(24, 38, 54, 0.08); background: rgba(238, 243, 248, 0.52); }
.product-workspace-section[open] > .product-workspace-section-summary::after { transform: rotate(180deg); }
.product-workspace-section-summary > div { min-width: 0; }
.product-workspace-section-summary .eyebrow { margin-bottom: 0.2rem; }
.product-workspace-section-summary .page-title { margin: 0; font-size: clamp(1.15rem, 2vw, 1.5rem); }
.product-workspace-section > .split-grid { padding: 0 1rem 1rem; }

.hero-card,
.panel-card,
.metric-card,
.table-card,
.form-card,
.auth-card,
.callout-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 1.4rem;
    border: 1px solid rgba(24, 38, 54, 0.08);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 44px rgba(20, 34, 50, 0.08);
    backdrop-filter: blur(14px);
}

.hero-card {
    padding: 1.8rem;
}

.setup-hero-grid {
    gap: 0.85rem;
}

.setup-hero-grid .hero-card {
    padding: 1.25rem 1.35rem;
}

.setup-hero-grid .hero-card .page-title {
    margin-bottom: 0.55rem;
    font-size: clamp(1.8rem, 3.2vw, 3rem);
}

.setup-hero-grid .readiness-card {
    margin-top: 0.85rem;
}

.hero-copy h1,
.hero-card h1,
.page-title {
    margin: 0.3rem 0 0.8rem;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1;
}

.hero-copy p,
.hero-card p,
.muted {
    color: #516070;
}

.hero-actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.button-row.compact-actions {
    margin-top: 0;
}

.button,
.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.8rem;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    border: 0;
    cursor: pointer;
    font-weight: 700;
}

.primary-button,
.button.primary {
    background: linear-gradient(135deg, #0e3c67, #195b92);
    color: white;
}

.secondary-button,
.button.secondary {
    background: rgba(19, 35, 52, 0.06);
    color: #0e1b29;
}

.primary-button:disabled,
.secondary-button:disabled,
.organization-switch-button:disabled,
.period-button:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

/* UI-V1A shared merchant foundation. These primitives carry presentation only; pages own their data and workflow. */
.resource-page,
.resource-index-page,
.resource-detail-page {
    width: 100%;
    min-width: 0;
}

.resource-index-page,
.resource-detail-page {
    display: grid;
    gap: var(--bc-space-4);
}

.focused-workflow {
    width: min(100%, 52rem);
    justify-items: stretch;
}

.focused-form {
    width: min(100%, 48rem);
}

.focused-form-compact {
    width: min(100%, 42rem);
}

.profile-page {
    display: grid;
    gap: var(--bc-space-4);
    width: min(100%, 42rem);
}

.profile-page-header {
    margin-bottom: 0;
}

.profile-panel {
    min-width: 0;
    box-sizing: border-box;
    padding: 1.1rem;
    border: 1px solid rgba(24, 38, 54, 0.08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 32px rgba(20, 34, 50, 0.06);
}

.profile-panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-panel-heading h2 {
    margin: 0.25rem 0 0;
    color: var(--bc-text);
    font-size: 1.2rem;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.profile-password-grid .profile-field:last-child,
.profile-read-only-field {
    grid-column: 1 / -1;
}

.profile-field {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.profile-field label,
.profile-field-label {
    color: var(--bc-muted);
    font-size: 0.85rem;
    font-weight: 750;
}

.profile-field input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: var(--bc-control-height);
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
    background: var(--bc-surface-strong);
    color: var(--bc-text);
}

.profile-read-only-field {
    padding-top: 0.15rem;
}

.profile-read-only-field strong {
    color: var(--bc-text);
    overflow-wrap: anywhere;
}

.profile-read-only-field small,
.profile-field small {
    display: block;
}

.profile-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.profile-feedback {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    background: rgba(17, 90, 145, 0.08);
    color: #12456f;
}

.profile-feedback.success {
    background: rgba(27, 121, 63, 0.1);
    color: #1e6d39;
}

.profile-feedback.error {
    background: rgba(188, 44, 64, 0.08);
    color: #9e2034;
}

.profile-panel .validation-summary-errors,
.profile-panel .validation-message {
    color: #9e2034;
    font-size: 0.85rem;
}

.profile-panel .validation-summary-errors {
    margin: 0 0 0.8rem;
}

.resource-table-card,
.resource-detail-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.1rem;
    border-radius: 1.4rem;
    border: 1px solid rgba(24, 38, 54, 0.08);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 44px rgba(20, 34, 50, 0.08);
    backdrop-filter: blur(14px);
}

.resource-table-card .table-wrap,
.resource-detail-card .table-wrap {
    width: 100%;
}

.supplier-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.8fr);
    gap: var(--bc-space-4);
}

.resource-detail-card .page-title { margin-top: 0.2rem; }

.fulfilment-line-items-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
}

.fulfilment-line-items-table th,
.fulfilment-line-items-table td {
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid rgba(20, 36, 53, 0.08);
    text-align: left;
    vertical-align: top;
}

.fulfilment-line-items-table th {
    color: #5f6d7d;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(238, 243, 248, 0.72);
}

.fulfilment-line-items-table .line-item-availability-column {
    min-width: 18rem;
}

.fulfilment-line-items-table .numeric-cell {
    white-space: nowrap;
}

.merchant-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bc-space-5);
    min-width: 0;
    margin-bottom: var(--bc-space-5);
}

.merchant-page-header-copy {
    min-width: 0;
}

.merchant-page-header .page-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.merchant-page-header-description {
    max-width: 70ch;
    margin: 0.55rem 0 0;
}

.merchant-page-header-actions,
.merchant-page-header-primary,
.merchant-page-header-secondary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--bc-space-2);
    flex-wrap: wrap;
}

.workspace-tabs {
    display: flex;
    gap: 0.2rem;
    flex-wrap: wrap;
    margin-bottom: var(--bc-space-4);
    border-bottom: 1px solid var(--bc-border);
}

.workspace-tab {
    min-height: 2.8rem;
    padding: 0.65rem 0.9rem;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--bc-muted);
    cursor: pointer;
    font-weight: 750;
}

.workspace-tab:hover,
.workspace-tab.active {
    border-bottom-color: var(--bc-primary);
    color: var(--bc-primary);
}

.back-link {
    display: inline-flex;
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--bc-primary);
    cursor: pointer;
    font: inherit;
    font-weight: 750;
}

.back-link:hover {
    text-decoration: underline;
}

.detail-list {
    display: grid;
    grid-template-columns: minmax(9rem, 0.35fr) minmax(0, 1fr);
    gap: 0.65rem 1.25rem;
    margin: 1.25rem 0 0;
}

.detail-list dt {
    color: var(--bc-muted);
    font-weight: 700;
}

.detail-list dd {
    margin: 0;
}

.merchant-page-header-actions {
    flex-shrink: 0;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: var(--bc-space-3);
    min-width: 0;
    margin-bottom: var(--bc-space-4);
}

.filter-toolbar-fields {
    display: grid;
    grid-template-columns: minmax(14rem, 2fr) repeat(auto-fit, minmax(10rem, 1fr));
    align-items: end;
    gap: var(--bc-space-3);
    min-width: 0;
}

.filter-toolbar-search,
.filter-toolbar-fields > .filter-field,
.filter-toolbar-fields > .select-field {
    display: grid;
    gap: var(--bc-space-1);
    min-width: 0;
}

.filter-toolbar label,
.filter-toolbar-fields label {
    color: var(--bc-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: var(--bc-control-height);
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
    background: var(--bc-surface-strong);
    color: var(--bc-text);
}

.filter-toolbar-actions {
    display: flex;
    align-items: end;
    gap: var(--bc-space-2);
    flex-wrap: wrap;
}

.filter-toolbar-actions button {
    white-space: nowrap;
}

.resource-table-container {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    contain: paint;
}

.resource-table {
    width: 100%;
    min-width: max-content;
    border-collapse: collapse;
}

.resource-table th,
.resource-table td {
    padding: 0.8rem 0.7rem;
    border-bottom: 1px solid var(--bc-border);
    text-align: left;
    vertical-align: top;
}

.resource-table th {
    color: #5f6d7d;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(238, 243, 248, 0.72);
}

.resource-table tbody tr:hover {
    background: rgba(239, 245, 250, 0.56);
}

.resource-table tbody tr:focus-within {
    background: rgba(239, 245, 250, 0.78);
}

.resource-table .numeric-cell,
.resource-table th.numeric-cell {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.resource-table-container:focus-visible {
    outline-offset: 0.2rem;
}

.merchant-state {
    display: grid;
    justify-items: start;
    gap: var(--bc-space-2);
    min-width: 0;
    padding: var(--bc-space-5);
    border-radius: var(--bc-radius-panel);
}

.merchant-state h2,
.merchant-state p {
    margin: 0;
}

.merchant-empty-state {
    border: 1px dashed rgba(17, 32, 49, 0.18);
    background: rgba(255, 255, 255, 0.8);
}

.merchant-filtered-empty-state {
    border: 1px solid rgba(25, 91, 146, 0.16);
    background: rgba(238, 243, 248, 0.72);
}

.merchant-loading-state {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: var(--bc-space-4);
    border: 1px solid rgba(24, 38, 54, 0.08);
    background: rgba(255, 255, 255, 0.62);
}

.merchant-loading-state .loading-spinner {
    margin: 0;
}

.merchant-error-state {
    border: 1px solid rgba(177, 76, 94, 0.24);
    background: rgba(188, 44, 64, 0.08);
    color: #7f1d2d;
}

.merchant-error-state .button-row {
    margin-top: 0.25rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: 0.25rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.2;
}

.status-badge-neutral { border-color: rgba(25, 50, 73, 0.14); background: #e7edf3; color: #24384d; }
.status-badge-info { border-color: rgba(25, 91, 146, 0.2); background: rgba(25, 91, 146, 0.1); color: #114b7c; }
.status-badge-positive { border-color: rgba(46, 138, 85, 0.2); background: rgba(46, 138, 85, 0.1); color: #1c6a3b; }
.status-badge-warning { border-color: rgba(224, 138, 50, 0.25); background: rgba(224, 138, 50, 0.12); color: #8b4b08; }
.status-badge-danger { border-color: rgba(177, 76, 94, 0.25); background: rgba(188, 44, 64, 0.1); color: #98263a; }
.status-badge-draft { border-color: rgba(25, 50, 73, 0.14); background: #e7edf3; color: #24384d; }
.status-badge-open { border-color: rgba(25, 91, 146, 0.2); background: rgba(25, 91, 146, 0.1); color: #114b7c; }
.status-badge-completed { border-color: rgba(46, 138, 85, 0.2); background: rgba(46, 138, 85, 0.1); color: #1c6a3b; }
.status-badge-cancelled { border-color: rgba(177, 76, 94, 0.25); background: rgba(188, 44, 64, 0.1); color: #98263a; }

.primary-button,
.secondary-button,
.danger-button {
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.primary-button:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(14, 60, 103, 0.2);
}

.secondary-button {
    border: 1px solid transparent;
}

.secondary-button:hover:not(:disabled) {
    background: rgba(19, 35, 52, 0.11);
}

.danger-button,
.button.danger,
.secondary-button.danger-action {
    border: 1px solid rgba(177, 76, 94, 0.24);
    background: rgba(188, 44, 64, 0.1);
    color: var(--bc-danger);
}

.danger-button:hover:not(:disabled),
.button.danger:hover:not(:disabled),
.secondary-button.danger-action:hover:not(:disabled) {
    background: rgba(188, 44, 64, 0.16);
    color: #731a2a;
}

.button:disabled,
.danger-button:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.form-field {
    display: grid;
    gap: var(--bc-space-1);
    min-width: 0;
}

.form-field > label {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    color: #31465b;
    font-weight: 700;
}

.required-marker,
.form-validation {
    color: var(--bc-danger);
}

.form-helper,
.form-validation {
    font-size: 0.82rem;
}

.technical-details {
    margin-top: var(--bc-space-3);
    border-top: 1px solid var(--bc-border);
}

.technical-details summary {
    padding: 0.75rem 0;
    color: var(--bc-primary);
    cursor: pointer;
    font-weight: 700;
}

.technical-details-content {
    min-width: 0;
    padding: 0 0 0.75rem;
    color: var(--bc-muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bc-space-3);
    flex-wrap: wrap;
    margin-top: var(--bc-space-4);
}

.pagination-summary,
.pagination-page {
    margin: 0;
    color: var(--bc-muted);
    font-size: 0.9rem;
}

.pagination-summary-only {
    margin-top: var(--bc-space-3);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: var(--bc-space-2);
    flex-wrap: wrap;
}

.pagination-page-size {
    display: inline-flex;
    align-items: center;
    gap: var(--bc-space-1);
    color: var(--bc-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.pagination-page-size select {
    min-height: 2.2rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.65rem;
    background: var(--bc-surface-strong);
    color: var(--bc-text);
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.2rem;
}

.metric-card {
    padding: 1.05rem;
}

.metric-value {
    margin: 0.15rem 0 0.1rem;
    font-size: 2rem;
    font-weight: 800;
}

.metric-label {
    margin: 0;
    color: #516070;
}

.dashboard-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-grid > .metric-card {
    grid-column: span 3;
}

.dashboard-grid > .secondary-metric {
    background: rgba(255, 255, 255, 0.58);
}

.dashboard-heading .page-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.3rem;
    border-radius: 0.9rem;
    background: rgba(19, 35, 52, 0.06);
}

.period-button {
    border: 0;
    padding: 0.55rem 0.75rem;
    border-radius: 0.65rem;
    background: transparent;
    color: #516070;
    cursor: pointer;
    font-weight: 700;
}

.period-button.active,
.period-button:hover {
    background: white;
    color: #0e3c67;
    box-shadow: 0 4px 12px rgba(18, 30, 48, 0.1);
}

.report-header,
.profitability-header {
    display: grid;
    gap: 1rem;
}

.report-header .page-title,
.profitability-header .page-title,
.section-heading .page-title {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.report-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.3rem;
    border-radius: 0.9rem;
    background: rgba(19, 35, 52, 0.06);
}

.report-tab {
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: #516070;
    cursor: pointer;
    font-weight: 750;
}

.report-tab.active,
.report-tab:hover:not(:disabled) {
    background: #ffffff;
    color: #0e3c67;
    box-shadow: 0 4px 12px rgba(18, 30, 48, 0.1);
}

.report-filter-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.report-filter-bar label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    color: #516070;
    font-size: 0.85rem;
}

.report-filter-bar label > span { font-weight: 700; }
.report-filter-bar input,
.report-filter-bar select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(20, 36, 53, 0.14);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.96);
    color: #102131;
}

.report-filter-bar .report-search { grid-column: span 2; }
.report-date-note { margin: 0; }
.report-kpi-grid > .metric-card { grid-column: span 3; }
.primary-finance-kpis > .metric-card { border-top: 0.25rem solid #195b92; }
.secondary-finance-kpis > .metric-card { background: rgba(255, 255, 255, 0.58); }
.profitability-currency-section { display: grid; gap: 0.8rem; }
.profitability-currency-section + .profitability-currency-section { margin-top: 0.7rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-heading h2,
.section-heading h3 { margin: 0.2rem 0 0; }
.status-summary { margin: 0; }
.insight-grid { align-items: stretch; }
.insight-grid > .table-card { grid-column: span 6; }
.insight-chart { padding: 1.1rem; }
.insight-chart-series { display: grid; gap: 0.35rem; margin-top: 0.75rem; }
.compact-chart { min-height: 10rem; }
.ranked-insight ol { display: grid; gap: 0.55rem; margin: 0; padding-left: 1.35rem; }
.ranked-insight li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 0.8rem; padding: 0.65rem 0; border-bottom: 1px solid rgba(20, 36, 53, 0.08); }
.ranked-insight li .muted { grid-column: 1 / -1; font-size: 0.82rem; }
.numeric-cell { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.detailed-profitability-table { margin-top: 0.2rem; }
.currency-summary-card { display: grid; gap: 0.65rem; }

.chart-card {
    grid-column: span 8;
}

.finance-chart-card { overflow: hidden; }
.finance-chart-card .bar-chart { min-height: 13rem; }
.finance-chart-card .bar-group { min-width: 2.6rem; }
.finance-chart-card .bar-group span { transform: none; margin-bottom: -1.35rem; font-size: 0.72rem; }
.finance-chart-card .chart-legend { margin-top: 1rem; }

.chart-card:nth-child(2n) {
    grid-column: span 4;
}

.bar-chart,
.spark-bars {
    display: flex;
    align-items: end;
    gap: 0.35rem;
    min-height: 12rem;
    padding: 1rem 0.5rem 0;
    overflow-x: auto;
    border-bottom: 1px solid rgba(20, 36, 53, 0.12);
}

.bar-group,
.spark-column {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 0.12rem;
    min-width: 2.2rem;
    height: 9rem;
}

.bar-group span,
.spark-column span {
    align-self: end;
    margin-bottom: -1.5rem;
    color: #687788;
    font-size: 0.7rem;
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: top left;
}

.bar,
.spark-bar {
    display: block;
    width: 0.45rem;
    min-height: 0.25rem;
    border-radius: 0.35rem 0.35rem 0 0;
}

.bar.revenue,
.legend-swatch.revenue { background: #195b92; }
.bar.cogs,
.legend-swatch.cogs { background: #e08a32; }
.bar.profit,
.legend-swatch.profit { background: #2a8b5f; }
.spark-bar { width: 0.8rem; background: #195b92; }

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
    color: #516070;
    font-size: 0.82rem;
}

.legend-swatch {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    margin-right: 0.3rem;
    border-radius: 0.2rem;
}

.accessible-summary {
    width: 100%;
    margin-top: 1.8rem;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.chart-data-disclosure {
    margin-top: 1.25rem;
}

.chart-data-disclosure summary {
    color: #195b92;
    cursor: pointer;
    font-weight: 700;
}

.chart-data-disclosure .accessible-summary {
    margin-top: 0.75rem;
}

.accessible-summary caption {
    margin-bottom: 0.35rem;
    text-align: left;
    color: #516070;
    font-weight: 700;
}

.accessible-summary th,
.accessible-summary td {
    padding: 0.45rem;
    border-bottom: 1px solid rgba(20, 36, 53, 0.08);
    text-align: left;
}

.text-link {
    display: inline-block;
    margin-top: 0.9rem;
    color: #195b92;
    font-weight: 700;
}

.separator { margin: 0 0.35rem; color: #9ba6b2; }
.status-label { display: inline-block; width: 0.55rem; height: 0.55rem; margin-right: 0.45rem; border-radius: 50%; background: #9ba6b2; }
.status-label.status-open,
.status-label.status-completed { background: #2a8b5f; }
.status-label.status-cancelled { background: #b14c5e; }
.status-label.status-warning { background: #e08a32; }
.status-label.status-critical { background: #b14c5e; }
.health-list { display: grid; gap: 0.7rem; padding-left: 0; list-style: none; color: #516070; }
.health-list strong { color: #102131; }
.table-card small { display: block; color: #687788; }

.table-card details:not([open]) > :not(summary) {
    display: none;
}

.panel-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-lower-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.panel-grid.dashboard-lower-grid > .metric-card,
.panel-grid.dashboard-lower-grid > .table-card,
.panel-grid.dashboard-lower-grid > .panel-card,
.panel-grid.dashboard-lower-grid > .callout-card {
    grid-column: auto;
}

.panel-grid > .panel-card,
.panel-grid > .table-card,
.panel-grid > .form-card,
.panel-grid > .callout-card {
    grid-column: span 12;
}

.table-card,
.form-card,
.panel-card,
.callout-card {
    padding: 1.1rem;
}

.table-card table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.table-wrap table { min-width: max-content; }

.table-wrap:focus-visible {
    outline-offset: 0.2rem;
}

.table-card th,
.table-card td {
    padding: 0.8rem 0.7rem;
    text-align: left;
    border-bottom: 1px solid rgba(20, 36, 53, 0.08);
    vertical-align: top;
}

.table-card th {
    color: #5f6d7d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(238, 243, 248, 0.72);
}

.table-card tbody tr:hover {
    background: rgba(239, 245, 250, 0.56);
}

.table-primary-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #0e3c67;
    cursor: pointer;
    font-weight: 750;
    text-align: left;
}

.table-primary-link:hover {
    color: #195b92;
    text-decoration: underline;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.table-actions button,
.link-button {
    border: 0;
    background: transparent;
    color: #195b92;
    cursor: pointer;
    padding: 0;
}

.compact-action {
    min-height: 2.2rem;
    padding: 0.45rem 0.7rem;
}

.table-actions .compact-action {
    background: rgba(19, 35, 52, 0.06);
    color: #0e1b29;
    padding: 0.45rem 0.7rem;
}

.danger-action,
.table-actions .danger-action {
    color: #98263a;
    font-weight: 700;
}

.danger-action:hover:not(:disabled),
.table-actions .danger-action:hover:not(:disabled) {
    color: #731a2a;
    text-decoration: underline;
}

.table-actions.inventory-row-actions {
    align-items: center;
    gap: 0.5rem;
}

.table-actions.inventory-row-actions .inventory-row-action {
    display: inline-flex;
    align-items: center;
    min-height: 2.2rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.55rem;
    background: var(--bc-surface-strong);
    color: var(--bc-primary);
    font-weight: 700;
    white-space: nowrap;
}

.table-actions.inventory-row-actions .inventory-row-action:hover:not(:disabled) {
    border-color: var(--bc-primary);
    background: rgba(25, 91, 146, 0.08);
    text-decoration: none;
}

.table-actions.inventory-row-actions .inventory-row-action.danger-action {
    border-color: rgba(152, 38, 58, 0.32);
    background: rgba(152, 38, 58, 0.06);
    color: var(--bc-danger);
}

.table-actions.inventory-row-actions .inventory-row-action.danger-action:hover:not(:disabled) {
    border-color: var(--bc-danger);
    background: rgba(152, 38, 58, 0.12);
    color: #731a2a;
}

.inventory-aggregate-section {
    display: grid;
    gap: var(--bc-space-3);
    margin: var(--bc-space-5) 0;
    padding-top: var(--bc-space-4);
    border-top: 1px solid var(--bc-border);
}

.inventory-aggregate-section .section-heading {
    align-items: end;
}

.inventory-aggregate-section .section-heading > .muted {
    margin: 0;
    text-align: right;
}

.inventory-mutation-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.65rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--bc-primary);
    background: rgba(25, 91, 146, 0.06);
}

.inventory-mutation-context strong,
.inventory-mutation-context p {
    flex-basis: 100%;
}

.inventory-mutation-context p {
    margin: 0;
}

.mutation-preview {
    color: var(--bc-primary);
    font-weight: 700;
}

.compact-detail {
    align-self: start;
}

.permission-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.permission-row > div {
    min-width: 0;
}

.permission-row small {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.courier-readiness-note,
.courier-booking-warning {
    max-width: 78rem;
}

.courier-booking-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bc-space-3);
    margin: var(--bc-space-3) 0;
}

.courier-booking-facts p {
    margin: 0;
    padding: 0.8rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
}

.courier-booking-warning {
    margin: var(--bc-space-3) 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(195, 107, 20, 0.32);
    border-radius: var(--bc-radius-control);
    background: rgba(224, 138, 50, 0.12);
    color: #7b4209;
}

.human-form-grid label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.human-form-grid .field-wide {
    grid-column: 1 / -1;
}

.human-form-grid .field-short input,
.human-form-grid .field-short select {
    max-width: 14rem;
}

.human-form-grid .field-medium input,
.human-form-grid .field-medium select {
    max-width: 30rem;
}

.form-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.public-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 5%, rgba(244, 178, 58, 0.18), transparent 24%),
        radial-gradient(circle at 92% 12%, rgba(18, 83, 145, 0.16), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #edf1f6 100%);
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1180px, calc(100% - 3rem));
    margin: 0 auto;
    padding: 1.4rem 0;
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #102131;
}

.public-brand > span:last-child {
    display: grid;
    line-height: 1.1;
}

.public-brand-kicker {
    color: #536376;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.public-brand strong { font-size: 1.2rem; }
.public-header-note { color: #526273; font-size: 0.9rem; }
.public-main { width: min(1180px, calc(100% - 3rem)); margin: 0 auto; padding: 3rem 0 5rem; }
.public-auth-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr); overflow: hidden; border-radius: 1.5rem; border: 1px solid rgba(24, 38, 54, 0.09); background: rgba(255, 255, 255, 0.84); box-shadow: 0 22px 60px rgba(20, 34, 50, 0.12); }
.public-auth-copy { padding: clamp(2rem, 5vw, 4rem); color: #ffffff; background: radial-gradient(circle at 86% 8%, rgba(255, 173, 61, 0.32), transparent 28%), linear-gradient(135deg, #0b1725, #12385d 74%); }
.public-auth-copy .page-title { max-width: 12ch; }
.public-auth-copy .eyebrow { color: rgba(255, 255, 255, 0.76); }
.public-auth-copy p { color: rgba(255, 255, 255, 0.84); }
.public-help { margin-top: 2rem; max-width: 34rem; font-size: 0.92rem; }
.public-auth-form { padding: clamp(1.5rem, 4vw, 3rem); background: rgba(255, 255, 255, 0.94); }
.public-auth-form .form-grid { margin: 0; }
.public-auth-form label { display: grid; gap: 0.35rem; color: #31465b; font-weight: 700; }
.public-auth-form small { font-weight: 400; }
.onboarding-wizard { padding: 1.5rem; }
.wizard-progress { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0 1.25rem; }
.wizard-step { padding: 0.45rem 0.7rem; border: 1px solid rgba(20, 36, 53, 0.12); border-radius: 999px; color: #5b6a78; font-size: 0.82rem; }
.wizard-step.current { border-color: #195b92; background: rgba(25, 91, 146, 0.1); color: #114b7c; font-weight: 800; }
.wizard-step.complete { border-color: #2e8a55; background: rgba(46, 138, 85, 0.1); color: #1c6a3b; }
.onboarding-fields { margin-top: 1rem; }
.wizard-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1rem; margin-top: 1.2rem; color: #31465b; }
.wizard-checks label { display: flex; align-items: center; gap: 0.55rem; }
.profile-completion-status { flex: 0 0 auto; padding: 0.55rem 0.8rem; border: 1px solid rgba(25, 91, 146, 0.2); border-radius: 999px; color: #195b92; font-size: 0.84rem; font-weight: 800; }
.profile-completion-status.complete { border-color: rgba(46, 138, 85, 0.32); background: rgba(46, 138, 85, 0.1); color: #1c6a3b; }
.profile-section-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin: 1.25rem 0; }
.profile-section-tabs button { display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 2.7rem; padding: 0.55rem 0.65rem; border: 1px solid rgba(20, 36, 53, 0.13); border-radius: 0.8rem; background: rgba(255, 255, 255, 0.58); color: #4e5e6e; cursor: pointer; font: inherit; font-size: 0.86rem; font-weight: 750; }
.profile-section-tabs button span { display: inline-flex; align-items: center; justify-content: center; width: 1.35rem; height: 1.35rem; border-radius: 999px; background: rgba(20, 36, 53, 0.08); font-size: 0.75rem; }
.profile-section-tabs button.current { border-color: #195b92; background: rgba(25, 91, 146, 0.1); color: #114b7c; }
.profile-section-tabs button.current span { background: #195b92; color: #fff; }
.profile-section { min-height: 22rem; padding: 1.35rem; border: 1px solid rgba(20, 36, 53, 0.1); border-radius: 1rem; background: rgba(248, 250, 252, 0.58); }
.section-heading h3 { margin: 0.25rem 0 0.45rem; font-size: 1.45rem; }
.section-heading p { max-width: 54rem; }
.field-help { display: block; margin: 0.35rem 0 0; color: #526273; font-size: 0.82rem; }
.checkbox-field { display: flex !important; align-items: flex-start; gap: 0.55rem; padding: 0.55rem 0; color: #31465b; font-weight: 650 !important; }
.checkbox-field input[type="checkbox"] { flex: 0 0 auto; width: 1rem; min-width: 1rem; height: 1rem; margin: 0.2rem 0 0; }
.checkbox-field > span { min-width: 0; overflow-wrap: normal; word-break: normal; }
.merchant-identity-title { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.1; overflow-wrap: normal; word-break: normal; }
.profile-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.profile-review-grid > div { padding: 0.9rem; border: 1px solid rgba(20, 36, 53, 0.1); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.7); }
.profile-review-grid dt { color: #526273; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; }
.profile-review-grid dd { margin: 0.3rem 0 0; color: #102131; font-weight: 700; }
.profile-boundary-note { margin: 1rem 0; padding: 1rem; box-shadow: none; }
.profile-boundary-note p { margin-bottom: 0; }
.review-confirmation { margin: 1rem 0; }
.role-assignment-fieldset { margin: 1.25rem 0 0; padding: 1rem; border: 1px solid rgba(20, 36, 53, 0.12); border-radius: 1rem; }
.role-assignment-fieldset legend { padding: 0 0.35rem; color: #102131; font-weight: 800; }
.role-selection-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem 1rem; }
.role-selection-list .checkbox-field { min-width: 0; }
.role-selection-list .checkbox-field > span { display: grid; gap: 0.15rem; }
.role-selection-list .checkbox-field small { display: block; }
.role-badge { display: inline-block; margin-left: 0.45rem; padding: 0.18rem 0.45rem; border-radius: 999px; background: rgba(25, 91, 146, 0.1); color: #195b92; font-size: 0.7rem; font-weight: 800; }

.auth-card {
    width: min(1120px, 100%);
    overflow: hidden;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
}

.auth-hero {
    padding: 2.2rem;
    background:
        radial-gradient(circle at top right, rgba(255, 167, 66, 0.3), transparent 28%),
        linear-gradient(135deg, #0b1725, #12385d 70%);
    color: white;
}

.auth-hero p {
    color: rgba(255, 255, 255, 0.82);
}

.auth-form {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.92);
}

.alert {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    background: rgba(17, 90, 145, 0.08);
    color: #12456f;
}

.alert.success {
    background: rgba(27, 121, 63, 0.1);
    color: #1e6d39;
}

.alert.error {
    background: rgba(188, 44, 64, 0.08);
    color: #9e2034;
}

.viewport-toast {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 1100;
    display: flex;
    align-items: center;
    width: max-content;
    max-width: min(26rem, calc(100vw - 2rem));
    box-sizing: border-box;
    padding: 0.8rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    box-shadow: 0 10px 28px rgba(18, 30, 48, 0.18);
    font-weight: 700;
}

.viewport-toast.success {
    border-color: rgba(46, 138, 85, 0.24);
    background: #f0faf3;
    color: #1c6a3b;
}

.viewport-toast.error {
    border-color: rgba(177, 76, 94, 0.28);
    background: #fff3f4;
    color: #98263a;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.8rem;
}

.empty-state {
    padding: 1.4rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed rgba(17, 32, 49, 0.12);
}

.stack {
    display: grid;
    gap: 1rem;
}

pre {
    margin: 0.75rem 0 0;
    padding: 0.85rem;
    overflow: auto;
    border-radius: 0.9rem;
    background: rgba(14, 24, 37, 0.92);
    color: #dbe7f2;
    font-size: 0.84rem;
}

/* UI-V1C: focused public auth and executive dashboard treatments. */
.public-auth-card.auth-card {
    width: min(1120px, 100%);
    min-height: 0;
    grid-template-columns: minmax(0, 45fr) minmax(360px, 55fr);
    align-items: stretch;
}

.public-auth-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.public-auth-copy .page-title {
    max-width: 18ch;
    overflow-wrap: anywhere;
}

.public-auth-form {
    min-width: 0;
}

.public-auth-form h2 {
    margin: 0.25rem 0 0;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
}

.public-auth-form > .muted {
    margin: 0.4rem 0 1.5rem;
}

.field-helper {
    margin: 0.4rem 0 0;
    color: #526273;
    font-size: 0.86rem;
    font-weight: 400;
}

.auth-actions {
    align-items: center;
    margin-top: 1.5rem;
}

.auth-actions .primary-button {
    min-width: 8rem;
}

.dashboard-kpi-section,
.dashboard-chart-grid,
.dashboard-insight-grid,
.dashboard-operations-grid,
.dashboard-supporting-grid {
    display: grid;
    gap: 1rem;
}

.dashboard-kpi-section {
    gap: 0.75rem;
}

.dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-section-heading h2 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.1rem, 1.8vw, 1.45rem);
}

.dashboard-section-heading p {
    margin-bottom: 0;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-kpi-primary {
    min-width: 0;
    border-top: 0.25rem solid #195b92;
}

.dashboard-secondary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    padding: 0.2rem 0.2rem 0;
}

.dashboard-secondary-metrics > a {
    display: grid;
    gap: 0.1rem;
    min-width: min(15rem, 100%);
}

.dashboard-secondary-metrics strong {
    font-size: 1.05rem;
}

.dashboard-chart-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    align-items: stretch;
}

.dashboard-chart,
.dashboard-chart-empty {
    min-width: 0;
}

.dashboard-chart-empty-compact {
    align-self: start;
    padding: 0.9rem 1rem;
}

.finance-chart-card {
    grid-column: 1;
    overflow: hidden;
}

.orders-chart-card {
    grid-column: 2;
}

.dashboard-chart-empty {
    grid-column: 1;
    padding: 1.1rem;
    border: 1px solid rgba(24, 38, 54, 0.1);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.78);
}

.chart-frame {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 15rem;
    margin-top: 1rem;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: end;
    padding: 0 0 1.65rem;
    color: #687788;
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: right;
    white-space: nowrap;
}

.chart-plot {
    position: relative;
    height: 15rem;
    min-width: 0;
    min-height: 15rem;
    padding: 0.35rem 0.3rem 0;
    border-left: 1px solid rgba(20, 36, 53, 0.14);
    border-bottom: 1px solid rgba(20, 36, 53, 0.14);
}

.chart-gridline {
    position: absolute;
    right: 0;
    left: 0;
    border-top: 1px dashed rgba(20, 36, 53, 0.12);
}

.chart-gridline-top { top: 0.35rem; }
.chart-gridline-middle { top: 50%; }
.chart-gridline-bottom { bottom: 1.65rem; }

.chart-groups {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.chart-groups .bar-group {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    gap: 0.35rem;
    align-items: end;
}

.bar-stack {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 0.12rem;
    min-height: 0;
    height: 100%;
}

.chart-groups .bar,
.chart-groups .spark-bar {
    width: min(0.55rem, 28%);
    min-height: 0.3rem;
    border-radius: 0.25rem 0.25rem 0 0;
}

.chart-groups .financial-bar {
    width: 0.55rem;
    min-width: 0.55rem;
    position: relative;
    z-index: 2;
    opacity: 1;
    visibility: visible;
}

.financial-bar-positive {
    align-self: end;
}

.financial-bar-negative {
    align-self: start;
}

.bar-placeholder {
    width: min(0.55rem, 28%);
    min-width: 0;
}

.chart-label {
    display: block;
    min-width: 0;
    max-width: 100%;
    min-height: 1rem;
    color: #687788;
    font-size: 0.68rem;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    white-space: nowrap;
}

.chart-groups .chart-label {
    align-self: end;
    margin-bottom: 0;
    transform: none;
    transform-origin: center;
}

.chart-groups .order-chart-label {
    width: max-content;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    justify-self: center;
}

.chart-groups .order-chart-label-start {
    justify-self: start;
    text-align: left;
}

.chart-groups .order-chart-label-end {
    justify-self: end;
    text-align: right;
}

.chart-label-placeholder {
    visibility: hidden;
}

.dashboard-chart .chart-legend {
    margin-top: 0.85rem;
}

.finance-trend {
    display: grid;
    gap: 1.1rem;
    margin-top: 1rem;
}

.finance-trend-tier {
    min-width: 0;
}

.finance-tier-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.finance-tier-heading h3 {
    margin: 0;
    color: #24384b;
    font-size: 0.95rem;
}

.finance-tier-heading .muted {
    font-size: 0.72rem;
    text-align: right;
}

.finance-chart-frame {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 0;
}

.finance-comparison-tier .finance-chart-frame {
    min-height: 13.1rem;
}

.finance-profit-tier .finance-chart-frame {
    min-height: 10.3rem;
}

.finance-positive-axis,
.finance-signed-axis {
    padding-bottom: 1.65rem;
}

.finance-positive-plot {
    height: 11.5rem;
    min-height: 11.5rem;
}

.finance-profit-plot {
    height: 9rem;
    min-height: 9rem;
    padding-top: 0.25rem;
}

.finance-chart-groups .finance-bar-group {
    min-width: 0;
}

.finance-chart-groups .finance-bar-group > .chart-label {
    margin-bottom: 0;
    font-size: 0.68rem;
}

.finance-profit-stack {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 1px minmax(0, 1fr);
    align-items: stretch;
    min-height: 0;
    height: 100%;
}

.finance-profit-row {
    display: flex;
    align-items: end;
    justify-content: center;
    min-height: 0;
}

.finance-profit-negative {
    align-items: start;
}

.finance-profit-zero-line {
    border-top: 1px solid rgba(20, 36, 53, 0.48);
}

.finance-profit-placeholder {
    height: 0;
}

.finance-profit-gridline-top { top: 0.25rem; }
.finance-profit-gridline-upper { top: 25%; }
.finance-profit-gridline-zero { top: 50%; border-top-color: rgba(20, 36, 53, 0.28); }
.finance-profit-gridline-lower { top: 75%; }
.finance-profit-gridline-bottom { bottom: 1.65rem; }

.finance-chart-legend {
    margin-top: 0.75rem !important;
}

.dashboard-insight-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.75fr) minmax(18rem, 0.9fr);
    align-items: stretch;
}

.dashboard-insight-grid > *,
.dashboard-operations-grid > * {
    min-width: 0;
}

.dashboard-top-products table {
    table-layout: fixed;
}

.dashboard-top-products th:first-child,
.dashboard-top-products td:first-child {
    width: 52%;
}

.dashboard-top-products th:nth-child(2),
.dashboard-top-products td:nth-child(2) {
    width: 18%;
    white-space: nowrap;
}

.dashboard-top-products th:last-child,
.dashboard-top-products td:last-child {
    width: 30%;
    white-space: nowrap;
    text-align: right;
}

.dashboard-top-products td small {
    overflow-wrap: anywhere;
}

.dashboard-status-list {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.dashboard-status-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(20, 36, 53, 0.08);
}

.dashboard-status-list > a:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dashboard-operations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-operations-grid .metric-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dashboard-operations-grid .text-link {
    margin-top: auto;
    padding-top: 0.8rem;
}

.dashboard-supporting-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-details-card {
    min-width: 0;
    padding: 0.95rem 1.1rem;
    border: 1px solid rgba(24, 38, 54, 0.1);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.66);
}

.dashboard-details-card summary {
    color: #195b92;
    cursor: pointer;
    font-weight: 750;
}

.dashboard-details-card[open] summary {
    margin-bottom: 0.9rem;
}

@media (max-width: 1100px) {
    .public-auth-card.auth-card {
        grid-template-columns: minmax(0, 1fr) minmax(330px, 1.15fr);
    }

    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-grid,
    .dashboard-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-chart-card,
    .orders-chart-card,
    .dashboard-chart-empty {
        grid-column: auto;
    }

    .dashboard-insight-grid > :first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .public-auth-card.auth-card {
        grid-template-columns: 1fr;
    }

    .dashboard-chart-grid,
    .dashboard-insight-grid,
    .dashboard-operations-grid,
    .dashboard-supporting-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-insight-grid > :first-child {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .public-auth-copy,
    .public-auth-form {
        padding: 1.5rem;
    }

    .public-auth-copy .page-title {
        max-width: 14ch;
    }

    .profile-section-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-section-tabs button:last-child { grid-column: 1 / -1; }
    .profile-review-grid { grid-template-columns: 1fr; }
    .role-selection-list { grid-template-columns: 1fr; }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .chart-frame,
    .chart-plot {
        min-height: 13rem;
    }

    .chart-plot {
        height: 13rem;
    }

    .chart-groups .bar-group {
        min-width: 0;
    }

    .finance-tier-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.15rem;
    }

    .finance-tier-heading .muted {
        text-align: left;
    }

    .finance-chart-frame {
        gap: 0.45rem;
    }

    .finance-positive-plot {
        height: 10.5rem;
        min-height: 10.5rem;
    }

    .finance-profit-plot {
        height: 8.5rem;
        min-height: 8.5rem;
    }

    .order-chart-label-desktop-only {
        visibility: hidden;
    }

    .dashboard-top-products table {
        min-width: 0;
        table-layout: fixed;
    }

    .dashboard-top-products th,
    .dashboard-top-products td {
        padding-inline: 0.45rem;
    }

    .dashboard-top-products th:first-child,
    .dashboard-top-products td:first-child {
        width: 48%;
    }

    .dashboard-top-products th:nth-child(2),
    .dashboard-top-products td:nth-child(2) {
        width: 18%;
    }

    .dashboard-top-products th:last-child,
    .dashboard-top-products td:last-child {
        width: 34%;
    }
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(20rem, 86vw);
        max-width: 100vw;
        box-sizing: border-box;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateX(-105%);
        visibility: hidden;
        pointer-events: none;
        transition: transform 180ms ease;
    }

    .sidebar.mobile-nav-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        border: 0;
        background: rgba(8, 19, 30, 0.45);
    }

    .hero-grid,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-grid > .metric-card {
        grid-column: span 6;
    }

    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .chart-card,
    .chart-card:nth-child(2n) { grid-column: span 12; }
}

@media (max-width: 900px) {
    .dashboard-lower-grid {
        grid-template-columns: 1fr;
    }

    .table-card {
        overflow-x: clip;
    }

    .split-grid {
        grid-template-columns: 1fr;
    }

    .split-grid.detail-focused > :first-child,
    .split-grid.detail-focused > :last-child {
        grid-column: auto;
        grid-row: auto;
    }

    .supplier-detail-grid {
        grid-template-columns: 1fr;
    }

    .public-auth-card { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .workspace,
    .sidebar {
        padding: 1rem;
    }

    .topbar {
        padding: 1rem;
        flex-direction: column;
    }

    .topbar-title,
    .topbar-actions,
    .organization-switcher {
        width: 100%;
        min-width: 0;
    }

    .organization-popover { right: auto; left: 0; }
    .organization-switch-button { width: 100%; min-width: 0; }

    .public-header,
    .public-main { width: min(100% - 2rem, 1180px); }
    .public-header { align-items: flex-start; flex-direction: column; }
    .public-main { padding-top: 1.5rem; }

    .metric-strip,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid > .metric-card {
        grid-column: span 12;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .detail-pairs {
        grid-template-columns: 1fr;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .profile-password-grid .profile-field:last-child,
    .profile-read-only-field {
        grid-column: auto;
    }

    .human-form-grid .field-short input,
    .human-form-grid .field-short select,
    .human-form-grid .field-medium input,
    .human-form-grid .field-medium select {
        max-width: none;
    }

    .report-filter-bar {
        grid-template-columns: 1fr;
    }

    .report-filter-bar .report-search {
        grid-column: auto;
    }

    .report-kpi-grid > .metric-card,
    .insight-grid > .table-card {
        grid-column: span 12;
    }

    .report-tab {
        flex: 1 1 auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .permission-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff7db;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.panel-heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.setup-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.setup-row {
    align-items: center;
    border: 1px solid rgba(20, 36, 53, 0.14);
    border-radius: 0.75rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: 8.5rem minmax(0, 1fr) auto;
    padding: 1rem;
}

.setup-completed {
    margin-top: 1rem;
    border-top: 1px solid rgba(20, 36, 53, 0.1);
    padding-top: 0.9rem;
}

.setup-completed summary {
    color: var(--bc-muted);
    cursor: pointer;
    font-weight: 750;
}

.setup-row-complete {
    background: rgba(248, 250, 252, 0.62);
}

.channel-confirmation-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.25rem;
}

.setup-copy p {
    color: #516070;
    margin: 0.25rem 0 0;
}

.setup-status {
    align-items: center;
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    gap: 0.45rem;
    text-transform: uppercase;
}

.setup-status span:first-child {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 1.5rem;
    justify-content: center;
    width: 1.5rem;
}

.setup-status.complete { color: #166534; }
.setup-status.complete span:first-child { background: #dcfce7; }
.setup-status.needsattention { color: #92400e; }
.setup-status.needsattention span:first-child { background: #fef3c7; }
.setup-status.blocked { color: #991b1b; }
.setup-status.blocked span:first-child { background: #fee2e2; }
.setup-status.notstarted { color: #516070; }
.setup-status.notstarted span:first-child { background: #f1f5f9; }

.readiness-card { border-left: 0.35rem solid #64748b; }
.readiness-ready { border-left-color: #16a34a; }
.readiness-readywithwarnings { border-left-color: #d97706; }
.readiness-setupinprogress { border-left-color: #2563eb; }
.readiness-notready { border-left-color: #dc2626; }

@media (max-width: 800px) {
    .setup-row { align-items: start; grid-template-columns: 1fr; }
    .panel-heading { align-items: start; flex-direction: column; }
}

/* UI-V1D operational attention workspaces. */
.operational-workspace {
    display: grid;
    gap: var(--bc-space-5);
    width: 100%;
    min-width: 0;
}

.operational-workspace .merchant-page-header {
    margin-bottom: 0;
}

/* UI-V1E1 channel connections and authority. Keep the Resource Detail hierarchy open and decision-led. */
.channel-detail-page {
    gap: var(--bc-space-5);
}

.channel-detail-page > .alert {
    margin-top: calc(var(--bc-space-5) * -0.45);
}

.channel-working-context {
    display: grid;
    grid-template-columns: max-content minmax(12rem, max-content) minmax(0, 1fr);
    align-items: baseline;
    gap: 0.35rem var(--bc-space-3);
    padding: 0.85rem 1rem;
    border-left: 0.25rem solid #195b92;
    background: rgba(238, 243, 248, 0.72);
    color: var(--bc-muted);
}

.channel-working-context strong {
    color: var(--bc-text);
}

.channel-connection-browser,
.channel-detail-stack {
    display: grid;
    gap: var(--bc-space-4);
    min-width: 0;
}

.channel-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--bc-space-4);
    min-width: 0;
}

.channel-section-heading > * {
    min-width: 0;
}

.channel-section-heading h2,
.channel-section-heading h3 {
    margin: 0.25rem 0 0;
}

.channel-section-heading > .muted {
    max-width: 48ch;
    margin: 0;
    text-align: right;
}

.channel-row-selected {
    background: rgba(25, 91, 146, 0.08);
    box-shadow: inset 0.25rem 0 #195b92;
}

.table-supporting-text {
    display: block;
    margin-top: 0.2rem;
    color: #687788;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

.compact-action {
    min-height: 2.35rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.88rem;
}

.channel-editor,
.channel-identity,
.authority-panel,
.channel-mapping-panel {
    display: grid;
    gap: var(--bc-space-4);
}

.channel-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--bc-space-4);
    min-width: 0;
}

.channel-status-summary {
    display: grid;
    justify-items: end;
    gap: 0.35rem;
    min-width: 9rem;
}

.channel-identity-list {
    margin-top: 0;
}

.channel-action-groups {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--bc-space-2);
}

.channel-action-groups form {
    margin: 0;
}

.channel-inline-note,
.channel-readonly-note,
.channel-empty-note {
    margin: 0;
    color: var(--bc-muted);
}

.channel-inline-note {
    padding: 0.85rem 1rem;
    border-left: 0.25rem solid #e08a32;
    background: rgba(224, 138, 50, 0.1);
    color: #70400c;
}

.channel-readonly-note {
    padding: 0.75rem 0;
}

.authority-current {
    display: grid;
    gap: 0.25rem;
    padding: 1rem;
    border-left: 0.25rem solid #195b92;
    background: rgba(238, 243, 248, 0.72);
}

.authority-label {
    color: var(--bc-muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.authority-editor {
    display: grid;
    gap: var(--bc-space-3);
    padding-top: var(--bc-space-2);
    border-top: 1px solid var(--bc-border);
}

.authority-editor label,
.mapping-form label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    color: #31465b;
    font-weight: 700;
}

.authority-editor select,
.mapping-form select,
.channel-editor input,
.channel-editor select {
    width: 100%;
    min-height: var(--bc-control-height);
    box-sizing: border-box;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
    background: var(--bc-surface-strong);
    color: var(--bc-text);
}

.authority-consequence {
    margin: 0;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(25, 91, 146, 0.16);
    background: rgba(25, 91, 146, 0.06);
    color: #174d78;
}

.authority-no-change {
    display: inline-flex;
    min-height: var(--bc-control-height);
    align-items: center;
    color: var(--bc-muted);
    font-weight: 750;
}

.mapping-editor {
    display: grid;
    gap: var(--bc-space-3);
    padding-top: var(--bc-space-4);
    border-top: 1px solid var(--bc-border);
}

.channel-synchronization-panel,
.channel-workflow,
.channel-workflow-steps,
.channel-result-region {
    display: grid;
    gap: var(--bc-space-4);
    min-width: 0;
}

.channel-workflow-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(8rem, 1fr));
    gap: var(--bc-space-2);
    width: min(100%, 36rem);
    padding-bottom: var(--bc-space-3);
    border-bottom: 1px solid var(--bc-border);
}

.channel-workflow-selector .ghost-button,
.channel-workflow-selector .secondary-button {
    width: 100%;
    margin: 0;
}

.channel-workflow-selected {
    border-color: rgba(25, 91, 146, 0.35);
    background: rgba(25, 91, 146, 0.11);
    color: #174d78;
}

.channel-workflow-region[hidden] {
    display: none;
}

.channel-workflow-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--bc-space-4);
}

.channel-workflow-heading h3,
.channel-step-heading h4,
.channel-result-region h4 {
    margin: 0.25rem 0 0;
}

.channel-direction-summary,
.channel-evidence-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--bc-space-3);
    margin: 0;
}

.channel-evidence-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.channel-direction-summary > div,
.channel-evidence-summary > div {
    min-width: 0;
    padding-left: 0.8rem;
    border-left: 0.2rem solid rgba(25, 91, 146, 0.28);
}

.channel-direction-summary dt,
.channel-evidence-summary dt {
    color: var(--bc-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.channel-direction-summary dd,
.channel-evidence-summary dd {
    margin: 0.25rem 0 0;
    color: var(--bc-text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.channel-workflow-step {
    display: grid;
    gap: var(--bc-space-3);
    min-width: 0;
    padding: var(--bc-space-4) 0;
    border-top: 1px solid var(--bc-border);
}

.channel-workflow-step:last-child {
    padding-bottom: 0;
}

.channel-step-heading {
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr);
    align-items: start;
    gap: var(--bc-space-3);
}

.channel-step-heading p {
    max-width: 76ch;
    margin: 0.35rem 0 0;
    color: var(--bc-muted);
}

.channel-step-number {
    display: inline-grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    border-radius: 50%;
    background: rgba(25, 91, 146, 0.11);
    color: #174d78;
    font-weight: 850;
}

.channel-preview-banner,
.channel-result-summary,
.channel-confirmation,
.channel-blocked-note,
.channel-reconciliation-required {
    margin: 0;
    padding: 0.85rem 1rem;
    border-left: 0.25rem solid #195b92;
    background: rgba(238, 243, 248, 0.72);
}

.channel-preview-banner,
.channel-result-summary {
    display: grid;
    gap: 0.2rem;
}

.channel-blocked-note,
.channel-reconciliation-required {
    border-left-color: #b35c18;
    background: rgba(224, 138, 50, 0.11);
    color: #70400c;
}

.channel-reconciliation-required {
    display: grid;
    justify-items: start;
    gap: var(--bc-space-2);
}

.channel-reconciliation-required p,
.channel-confirmation p {
    margin: 0;
}

.channel-confirmation {
    display: grid;
    gap: var(--bc-space-3);
    border-left-color: #8a4b12;
    background: rgba(138, 75, 18, 0.08);
}

.external-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.8rem;
    padding: 0.75rem 1rem;
    border: 1px solid #713c0d;
    border-radius: 0.9rem;
    background: #8a4b12;
    color: white;
    cursor: pointer;
    font-weight: 750;
    transition: background 140ms ease, box-shadow 140ms ease;
}

.external-action-button:hover:not(:disabled) {
    background: #713c0d;
    box-shadow: 0 4px 12px rgba(113, 60, 13, 0.22);
}

.external-action-button:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.channel-workflow .resource-table {
    min-width: 58rem;
}

.channel-workflow .technical-value {
    max-width: 24rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mapping-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.channel-mapping-panel .resource-table-container + .mapping-editor {
    margin-top: var(--bc-space-2);
}

@media (max-width: 900px) {
    .channel-section-grid {
        grid-template-columns: 1fr;
    }

    .channel-direction-summary,
    .channel-evidence-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .onboarding-wizard {
        padding: 1rem;
    }

    .profile-section {
        min-height: 0;
        padding: 1rem;
    }

    .profile-section-tabs {
        margin: 0.85rem 0 1rem;
    }

    .setup-list {
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .setup-row {
        gap: 0.6rem;
        padding: 0.75rem;
    }

    .setup-row .secondary-button {
        width: fit-content;
    }

    .setup-completed {
        margin-top: 0.75rem;
    }

    .channel-detail-page .merchant-page-header-actions,
    .channel-detail-page .merchant-page-header-actions > *,
    .channel-detail-page .merchant-page-header-actions button,
    .channel-detail-page .merchant-page-header-actions a {
        width: auto;
    }

    .channel-detail-page .merchant-page-header-actions {
        justify-content: flex-start;
    }

    .channel-working-context {
        grid-template-columns: 1fr;
    }

    .channel-workflow-selector,
    .channel-direction-summary,
    .channel-evidence-summary {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .channel-workflow-heading {
        display: grid;
        grid-template-columns: 1fr;
    }

    .channel-workflow-step > .primary-button,
    .channel-workflow-step > .secondary-button,
    .channel-workflow-step > .external-action-button,
    .channel-confirmation .form-action-group,
    .channel-confirmation .form-action-group > * {
        width: 100%;
        box-sizing: border-box;
    }

    .channel-section-heading,
    .channel-status-summary {
        align-items: flex-start;
        justify-items: start;
        flex-direction: column;
    }

    .channel-section-heading > .muted {
        text-align: left;
    }

    .channel-action-groups,
    .channel-action-groups > *,
    .channel-action-groups form,
    .channel-action-groups form button {
        width: 100%;
    }

    .channel-action-groups > a,
    .channel-action-groups > button,
    .channel-action-groups form button {
        box-sizing: border-box;
    }

    .channel-identity-list,
    .channel-identity-list.detail-list {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .channel-identity-list dt:not(:first-child) {
        margin-top: 0.6rem;
    }

    .mapping-form {
        grid-template-columns: 1fr;
    }
}

/* BYTECREST UI Phase 1: token-driven application shell and merchant dashboard. */
.app-icon {
    display: block;
    flex: 0 0 auto;
}

.app-shell {
    grid-template-columns: var(--bc-sidebar-width) minmax(0, 1fr);
    background: var(--bc-canvas);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    height: 100svh;
    min-height: 0;
    box-sizing: border-box;
    padding: 0.85rem 0.75rem;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, var(--bc-sidebar) 0%, var(--bc-sidebar-strong) 100%);
    color: var(--bc-sidebar-text);
    backdrop-filter: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.25rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    margin: 0;
    border-radius: 0.55rem;
}

.brand-mark {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.58rem;
    background: linear-gradient(145deg, #f4b23a, #e47b19);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    color: #17202a;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

.brand-copy {
    display: grid;
    min-width: 0;
}

.brand-kicker {
    color: var(--bc-sidebar-muted);
    font-size: 0.61rem;
    letter-spacing: 0.16em;
}

.brand-title {
    margin: 0;
    color: #ffffff;
    font-size: 0.98rem;
    line-height: 1.15;
}

.sidebar-close-button,
.sidebar-icon-button,
.mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    min-height: 2.35rem;
    box-sizing: border-box;
    padding: 0;
    border-radius: 0.55rem;
    cursor: pointer;
}

.sidebar-close-button {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
}

.nav-stack {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0.65rem -0.2rem 0;
    padding: 0 0.2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.nav-section + .nav-section {
    margin-top: 0.2rem;
}

.nav-section-toggle {
    display: grid;
    grid-template-columns: 1.55rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 2.35rem;
    box-sizing: border-box;
    padding: 0.4rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: transparent;
    color: var(--bc-sidebar-muted);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-align: left;
    text-transform: uppercase;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.nav-section-toggle:hover,
.nav-section.has-active-route > .nav-section-toggle {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.065);
}

.nav-section.is-expanded > .nav-section-toggle {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
}

.nav-section-icon {
    display: grid;
    place-items: center;
    color: #aebdcc;
}

.nav-section.has-active-route .nav-section-icon {
    color: #f4b23a;
}

.nav-section-chevron {
    transition: transform 140ms ease;
}

.nav-section.is-expanded .nav-section-chevron {
    transform: rotate(180deg);
}

.nav-section-items {
    display: grid;
    gap: 0.12rem;
    margin: 0.2rem 0 0.35rem 0.78rem;
    padding-left: 0.72rem;
    border-left: 1px solid rgba(255, 255, 255, 0.11);
}

.nav-section-items[hidden] {
    display: none;
}

.nav-stack a {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    align-items: center;
    gap: 0.45rem;
    min-height: 2.18rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #bdc9d5;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.nav-stack a:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    transform: none;
}

.nav-stack a.active {
    border-color: rgba(244, 178, 58, 0.24);
    background: linear-gradient(90deg, rgba(244, 178, 58, 0.17), rgba(255, 255, 255, 0.055));
    box-shadow: inset 2px 0 #f4b23a;
    color: #ffffff;
    transform: none;
}

.nav-stack a .app-icon {
    color: #93a5b7;
}

.nav-stack a.active .app-icon {
    color: #f4b23a;
}

.session-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.65rem;
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.045);
}

.session-identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
}

.session-identity > span:last-child {
    display: grid;
    min-width: 0;
}

.session-identity strong,
.session-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-identity strong {
    color: #ffffff;
    font-size: 0.78rem;
}

.session-identity small {
    color: var(--bc-sidebar-muted);
    font-size: 0.67rem;
}

.session-avatar,
.topbar-avatar {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(244, 178, 58, 0.16);
    color: #ffd27a;
    font-size: 0.7rem;
    font-weight: 850;
}

.session-avatar {
    width: 1.9rem;
    height: 1.9rem;
}

.session-actions {
    display: flex;
    gap: 0.25rem;
}

.sidebar-icon-button {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: transparent;
    color: #c8d3dd;
}

.sidebar-icon-button:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.workspace {
    min-width: 0;
    padding: 0.75rem var(--bc-page-gutter) 1.5rem;
}

.topbar {
    position: sticky;
    top: 0.55rem;
    z-index: 30;
    align-items: center;
    min-height: 3.2rem;
    box-sizing: border-box;
    margin-bottom: 0.85rem;
    padding: 0.45rem 0.55rem 0.45rem 0.8rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--bc-shadow-sm);
    backdrop-filter: blur(12px);
}

.topbar.organization-switcher-open {
    z-index: 110;
    pointer-events: none;
}

.topbar.organization-switcher-open .organization-switcher {
    pointer-events: auto;
}

.topbar-title {
    gap: 0.65rem;
    min-width: 0;
}

.workspace-context {
    margin: 0;
    color: var(--bc-muted);
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-transform: uppercase;
}

.workspace-title {
    margin: 0.08rem 0 0;
    color: var(--bc-text-strong);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.18;
}

.topbar-actions {
    gap: 0.45rem;
}

.topbar-context,
.topbar-account {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.3rem;
    box-sizing: border-box;
    padding: 0.35rem 0.58rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.55rem;
    background: var(--bc-surface-subtle);
    color: var(--bc-muted-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.topbar-account:hover {
    border-color: #aac0d3;
    background: var(--bc-primary-soft);
    color: var(--bc-primary-strong);
}

.topbar-avatar {
    width: 1.55rem;
    height: 1.55rem;
    background: var(--bc-primary-soft);
    color: var(--bc-primary-strong);
}

.organization-switch-button {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-width: min(17rem, 70vw);
    min-height: 2.35rem;
    padding: 0.3rem 0.55rem;
    border-color: var(--bc-border);
    border-radius: 0.55rem;
    background: var(--bc-surface-subtle);
}

.organization-switch-button > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.organization-switch-icon {
    color: var(--bc-primary);
}

.organization-switch-label {
    color: var(--bc-muted);
    font-size: 0.61rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.organization-switch-button strong {
    font-size: 0.78rem;
}

.workspace-body {
    gap: 0.85rem;
}

.merchant-page-header {
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.merchant-page-header .page-title {
    color: var(--bc-text-strong);
    font-size: clamp(1.55rem, 2.2vw, 2.15rem);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.merchant-page-header-description {
    margin-top: 0.35rem;
}

.hero-card,
.panel-card,
.metric-card,
.table-card,
.form-card,
.auth-card,
.callout-card,
.resource-table-card,
.resource-detail-card,
.profile-panel,
.dashboard-details-card {
    border-color: var(--bc-border);
    border-radius: var(--bc-radius-panel);
    background: var(--bc-surface);
    box-shadow: var(--bc-shadow-sm);
    backdrop-filter: none;
}

.panel-card,
.metric-card,
.table-card,
.form-card,
.callout-card,
.resource-table-card,
.resource-detail-card {
    padding: 0.9rem;
}

.primary-button,
.button.primary {
    min-height: var(--bc-control-height);
    padding: 0.48rem 0.75rem;
    border: 1px solid var(--bc-primary-strong);
    border-radius: var(--bc-radius-control);
    background: var(--bc-primary);
    box-shadow: 0 1px 2px rgba(14, 71, 114, 0.18);
    font-size: 0.86rem;
}

.primary-button:hover:not(:disabled),
.button.primary:hover:not(:disabled) {
    background: var(--bc-primary-strong);
}

.secondary-button,
.button.secondary,
.ghost-button {
    min-height: var(--bc-control-height);
    padding: 0.48rem 0.72rem;
    border: 1px solid var(--bc-border-strong);
    border-radius: var(--bc-radius-control);
    background: var(--bc-surface);
    color: var(--bc-text);
    font-size: 0.86rem;
}

.secondary-button:hover:not(:disabled),
.button.secondary:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
    border-color: #9fb4c7;
    background: var(--bc-primary-soft);
    color: var(--bc-primary-strong);
}

.status-pill,
.status-badge,
.chip {
    min-height: 1.55rem;
    box-sizing: border-box;
    gap: 0.3rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 750;
    line-height: 1.15;
}

.status-badge-positive { border-color: #b8dfcb; background: #e9f7ef; color: #13663f; }
.status-badge-warning { border-color: #ead3a7; background: #fff7e6; color: #865008; }
.status-badge-danger { border-color: #ebc0c8; background: #fff0f2; color: #8e2438; }
.status-badge-info { border-color: #bed5e8; background: #edf6fc; color: #155583; }
.status-badge-neutral { border-color: var(--bc-border); background: var(--bc-surface-muted); color: var(--bc-muted-strong); }

.merchant-state {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 0;
    padding: 1rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-panel);
    background: var(--bc-surface);
    text-align: left;
}

.merchant-state-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 0.55rem;
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
}

.merchant-error-state {
    border-left: 3px solid var(--bc-danger);
}

.merchant-error-state .merchant-state-icon {
    background: #fff0f2;
    color: var(--bc-danger);
}

.merchant-loading-state .loading-spinner {
    margin: 0.2rem 0 0;
}

.merchant-state-copy {
    min-width: 0;
}

.merchant-state h2,
.merchant-state p,
.merchant-state-title {
    margin: 0;
}

.merchant-state h2,
.merchant-state-title {
    color: var(--bc-text-strong);
    font-size: 1rem;
    font-weight: 800;
}

.merchant-state .muted,
.merchant-state h2 + p,
.merchant-state-title + p {
    margin-top: 0.25rem;
}

.merchant-state .button-row {
    margin-top: 0.65rem;
}

.dashboard-content {
    display: grid;
    gap: 0.9rem;
    width: 100%;
    max-width: var(--bc-content-max);
    margin-inline: auto;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 0.1rem 0.35rem;
}

.dashboard-heading-copy,
.dashboard-card-heading,
.metric-card-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.dashboard-heading-icon,
.dashboard-card-icon,
.metric-icon,
.dashboard-empty-icon,
.callout-icon,
.attention-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.58rem;
}

.dashboard-heading-icon {
    width: 2.35rem;
    height: 2.35rem;
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
}

.dashboard-heading .page-title {
    margin: 0.08rem 0 0;
    color: var(--bc-text-strong);
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.dashboard-heading .muted {
    margin: 0.3rem 0 0;
    font-size: 0.82rem;
}

.period-selector {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.18rem;
    padding: 0.22rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.65rem;
    background: var(--bc-surface-muted);
}

.period-button {
    min-height: 2rem;
    padding: 0.32rem 0.58rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: var(--bc-muted-strong);
    font-size: 0.76rem;
    font-weight: 750;
}

.period-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.75);
    color: var(--bc-primary-strong);
}

.period-button.active {
    background: var(--bc-surface);
    box-shadow: var(--bc-shadow-sm);
    color: var(--bc-primary-strong);
}

.dashboard-onboarding-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-left: 3px solid var(--bc-primary);
    background: linear-gradient(90deg, #f5faff, #ffffff 42%);
}

.dashboard-onboarding-callout .callout-icon {
    width: 2rem;
    height: 2rem;
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
}

.dashboard-onboarding-callout h2 {
    margin: 0.12rem 0 0;
    font-size: 1rem;
}

.dashboard-onboarding-callout .muted {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
}

.dashboard-onboarding-callout .text-link {
    margin-top: 0.45rem;
}

.dashboard-kpi-section {
    gap: 0.55rem;
}

.dashboard-section-heading {
    align-items: center;
}

.dashboard-section-heading h2 {
    color: var(--bc-text-strong);
    font-size: 1.05rem;
}

.dashboard-kpi-grid {
    gap: 0.7rem;
}

.dashboard-kpi-primary {
    min-height: 7.15rem;
    border-top: 1px solid var(--bc-border);
    box-shadow: var(--bc-shadow-sm);
}

.metric-card-heading {
    justify-content: space-between;
}

.metric-card-heading .metric-label {
    flex: 1 1 auto;
}

.metric-icon,
.dashboard-card-icon,
.dashboard-empty-icon {
    width: 1.9rem;
    height: 1.9rem;
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
}

.metric-icon-violet { background: #f1edff; color: #6347a5; }
.metric-icon-green { background: #e9f7ef; color: var(--bc-positive); }
.metric-icon-amber { background: #fff5e3; color: var(--bc-warning); }
.dashboard-card-icon-warning { background: #fff5e3; color: var(--bc-warning); }

.metric-snapshot-label {
    padding: 0.12rem 0.35rem;
    border: 1px solid var(--bc-border);
    border-radius: 999px;
    background: var(--bc-surface-subtle);
    color: var(--bc-muted);
    font-size: 0.61rem;
    font-weight: 750;
    text-transform: uppercase;
}

.metric-value {
    margin: 0.6rem 0 0.1rem;
    color: var(--bc-text-strong);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.metric-card > .muted {
    margin: 0.25rem 0 0;
    font-size: 0.76rem;
    line-height: 1.38;
}

.dashboard-secondary-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 0;
}

.dashboard-secondary-metrics > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 0.1rem 0.55rem;
    min-width: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.65rem;
    background: var(--bc-surface-subtle);
}

.dashboard-secondary-metrics .metric-label {
    grid-row: 1;
}

.dashboard-secondary-metrics strong {
    grid-row: 1;
    color: var(--bc-text-strong);
    font-size: 0.95rem;
}

.dashboard-secondary-metrics .muted {
    grid-column: 1 / -1;
    font-size: 0.7rem;
}

.dashboard-chart-grid,
.dashboard-insight-grid,
.dashboard-operations-grid,
.dashboard-supporting-grid {
    gap: 0.75rem;
}

.dashboard-chart-grid {
    grid-template-columns: minmax(0, 1.42fr) minmax(19rem, 0.7fr);
}

.dashboard-chart-grid > .dashboard-chart-empty {
    grid-column: auto;
}

.dashboard-chart,
.dashboard-chart-empty {
    border-color: var(--bc-border);
    border-radius: var(--bc-radius-panel);
    background: var(--bc-surface);
    box-shadow: var(--bc-shadow-sm);
}

.dashboard-chart-empty {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 10rem;
    box-sizing: border-box;
    padding: 0.9rem;
}

.dashboard-chart-empty h2 {
    margin: 0.12rem 0 0;
    font-size: 1rem;
}

.dashboard-chart-empty .muted {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
}

.dashboard-chart-empty .secondary-button {
    margin-top: 0.7rem;
}

.dashboard-card-heading {
    align-items: flex-start;
}

.dashboard-card-heading h2,
.dashboard-card-heading p {
    margin: 0;
}

.dashboard-card-heading h2 {
    margin-top: 0.1rem;
    color: var(--bc-text-strong);
    font-size: 1rem;
}

.dashboard-insight-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(14rem, 0.72fr) minmax(17rem, 0.9fr);
}

.dashboard-insight-grid > .table-card {
    padding: 0.85rem;
}

.dashboard-insight-grid > .table-card > .muted {
    margin: 0.45rem 0 0.6rem;
    font-size: 0.76rem;
}

.dashboard-inline-empty {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.7rem 0 0;
    padding: 0.55rem 0.65rem;
    border-radius: 0.55rem;
    background: var(--bc-surface-subtle);
    color: var(--bc-muted);
    font-size: 0.76rem;
}

.dashboard-status-list {
    gap: 0;
    margin-top: 0.7rem;
}

.dashboard-status-list > a {
    min-height: 2.25rem;
    box-sizing: border-box;
    padding: 0.45rem 0;
}

.dashboard-attention-list {
    display: grid;
    gap: 0.35rem;
    margin: 0.7rem 0 0;
    padding: 0;
    list-style: none;
}

.dashboard-attention-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.42rem 0.5rem;
    border-radius: 0.5rem;
    background: var(--bc-surface-subtle);
    color: var(--bc-muted-strong);
    font-size: 0.76rem;
}

.attention-icon {
    width: 1.6rem;
    height: 1.6rem;
}

.attention-warning { background: #fff5e3; color: var(--bc-warning); }
.attention-danger { background: #fff0f2; color: var(--bc-danger); }

.dashboard-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.85rem;
    margin-top: 0.65rem;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    width: fit-content;
}

.icon-link .app-icon {
    transition: transform 120ms ease;
}

.icon-link:hover .app-icon {
    transform: translateX(2px);
}

.dashboard-operations-grid .metric-card {
    min-height: 9rem;
}

.dashboard-operations-grid .text-link {
    margin-top: auto;
    padding-top: 0.65rem;
}

.dashboard-details-card {
    padding: 0;
    overflow: hidden;
}

.dashboard-details-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 2.65rem;
    box-sizing: border-box;
    padding: 0.65rem 0.8rem;
    color: var(--bc-text);
    font-size: 0.82rem;
}

.dashboard-details-card summary > span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-details-card[open] summary {
    margin-bottom: 0;
    border-bottom: 1px solid var(--bc-border);
    background: var(--bc-surface-subtle);
}

.dashboard-details-card[open] .details-chevron {
    transform: rotate(180deg);
}

.dashboard-details-card > .table-wrap,
.dashboard-details-card > .dashboard-inline-empty {
    margin: 0;
    padding: 0.7rem 0.8rem;
}

@media (max-width: 1120px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(19.5rem, 88vw);
        height: 100svh;
        padding: 0.85rem 0.75rem;
        overflow: hidden;
        transform: translateX(-105%);
        visibility: hidden;
        pointer-events: none;
    }

    .sidebar.mobile-nav-open {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-close-button,
    .mobile-nav-toggle {
        display: inline-flex;
    }

    .mobile-nav-toggle {
        border: 1px solid var(--bc-border);
        background: var(--bc-surface-subtle);
        color: var(--bc-primary-strong);
    }

    .dashboard-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-insight-grid > :first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .dashboard-chart-grid,
    .dashboard-insight-grid,
    .dashboard-operations-grid,
    .dashboard-supporting-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-insight-grid > :first-child {
        grid-column: auto;
    }
}

@media (max-width: 767px) {
    :root {
        --bc-page-gutter: 0.7rem;
        --bc-control-height: 2.65rem;
    }

    .workspace {
        padding: 0.55rem var(--bc-page-gutter) 1rem;
    }

    .topbar {
        top: 0.35rem;
        flex-direction: row;
        gap: 0.45rem;
        min-height: 3rem;
        margin-bottom: 0.7rem;
        padding: 0.35rem 0.4rem;
        border-radius: 0.65rem;
    }

    .topbar-title {
        width: auto;
        flex: 1 1 auto;
    }

    .topbar-actions {
        width: auto;
        flex: 0 0 auto;
    }

    .topbar-context,
    .topbar-account-name,
    .topbar-actions > .status-pill {
        display: none;
    }

    .topbar-account {
        width: 2.35rem;
        height: 2.35rem;
        min-height: 2.35rem;
        justify-content: center;
        padding: 0;
    }

    .topbar-avatar {
        width: 1.65rem;
        height: 1.65rem;
    }

    .workspace-context {
        font-size: 0.58rem;
    }

    .workspace-title {
        max-width: 13rem;
        overflow: hidden;
        font-size: 0.9rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .organization-switcher {
        width: auto;
    }

    .organization-switch-button {
        width: 2.35rem;
        min-width: 2.35rem;
        padding: 0;
    }

    .organization-switch-button > span:nth-child(2),
    .organization-switch-button > .app-icon {
        display: none;
    }

    .organization-switch-button .organization-switch-icon {
        display: grid;
        margin: auto;
    }

    .organization-popover {
        position: fixed;
        inset: 3.9rem 0.7rem auto;
        width: auto;
        max-width: none;
    }

    .dashboard-content {
        gap: 0.75rem;
    }

    .dashboard-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 0.7rem;
        padding: 0.1rem 0;
    }

    .dashboard-heading-icon {
        width: 2rem;
        height: 2rem;
    }

    .dashboard-heading .page-title {
        font-size: 1.55rem;
    }

    .dashboard-heading .muted {
        font-size: 0.76rem;
    }

    .period-selector {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
        box-sizing: border-box;
    }

    .period-button {
        width: 100%;
        min-width: 0;
        padding-inline: 0.25rem;
    }

    .dashboard-onboarding-callout {
        padding: 0.75rem;
    }

    .dashboard-kpi-grid,
    .dashboard-secondary-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi-primary {
        min-height: 6.25rem;
    }

    .metric-value {
        font-size: 1.3rem;
    }

    .dashboard-chart-empty {
        min-height: 0;
    }

    .dashboard-insight-grid > .table-card,
    .dashboard-operations-grid .metric-card {
        min-height: 0;
    }

    .merchant-page-header .page-title {
        font-size: 1.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-section-chevron,
    .nav-section-toggle,
    .nav-stack a,
    .icon-link .app-icon {
        transition: none;
    }
}

/* Merchant Team and custom-role administration */
.team-index-surface .resource-table td,
.team-role-index .resource-table td {
    vertical-align: middle;
}

.team-index-surface .role-badge,
.team-role-index .role-badge {
    display: inline-flex;
    margin-left: 0.5rem;
}

.role-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.team-role-fieldset,
.permission-group {
    min-width: 0;
    margin: 1rem 0 0;
    padding: 0.9rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.8rem;
}

.team-role-fieldset legend,
.permission-group legend {
    padding: 0 0.35rem;
    color: var(--bc-text);
    font-weight: 750;
}

.team-role-options {
    display: grid;
    gap: 0.55rem;
}

.team-role-option,
.permission-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.7rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.65rem;
    background: var(--bc-surface-strong);
    cursor: pointer;
}

.team-role-option input,
.permission-option input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.15rem;
}

.team-role-option span,
.permission-option span {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.team-role-option small,
.permission-option small,
.assigned-user-list small,
.technical-role-code {
    color: var(--bc-muted);
}

.role-permission-section,
.role-review-section {
    margin-top: 1.2rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--bc-border);
}

.role-permission-section h3,
.role-review-section h3 {
    margin: 0.2rem 0 0.35rem;
}

.permission-matrix {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    align-items: start;
}

.permission-group {
    display: grid;
    gap: 0.5rem;
    margin: 0;
}

.permission-group:disabled {
    opacity: 0.72;
}

.technical-permission-key,
.technical-role-code {
    display: block;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
}

.assigned-user-list {
    display: grid;
    gap: 0;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--bc-border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.assigned-user-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--bc-border);
}

.assigned-user-list li:last-child {
    border-bottom: 0;
}

.assigned-user-list li > span:first-child {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.protected-role-notice {
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--bc-primary);
    background: rgba(25, 91, 146, 0.07);
}

.protected-role-notice p {
    margin: 0;
}

.protected-role-notice p + p {
    margin-top: 0.3rem;
}

.role-review-body {
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
}

.team-member-drawer .working-drawer-form,
.team-role-drawer .working-drawer-form {
    height: 100%;
}

@media (max-width: 767px) {
    .permission-matrix {
        grid-template-columns: 1fr;
    }

    .team-index-surface .table-actions,
    .team-role-index .table-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .team-index-surface .table-actions > *,
    .team-role-index .table-actions > * {
        width: 100%;
    }

    .assigned-user-list li {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Final desktop delivery pass: compact the established merchant system without changing its responsive contract. */
.channel-hero-surface,
.channel-readiness-surface,
.channel-summary-grid,
.channel-location-flow,
.channel-review-grid {
    border: 1px solid var(--bc-border, #d6dde5);
    border-radius: 0.85rem;
    background: var(--bc-surface, #ffffff);
}

.channel-hero-surface {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(26rem, 1.1fr);
    gap: 1rem;
    padding: 1.1rem;
}

.channel-hero-copy h2 {
    margin: 0.15rem 0 0.45rem;
    max-width: 32rem;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.1;
}

.channel-store-identity {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    align-items: baseline;
    margin-top: 0.8rem;
}

.channel-store-identity span,
.channel-topology small,
.channel-flow,
.channel-readiness-step span:not(.readiness-step-number),
.channel-summary-item > span:last-child,
.channel-location-flow span:not(.eyebrow),
.channel-review-grid .channel-review-choice > span {
    color: var(--bc-muted, #64748b);
    font-size: 0.78rem;
}

.channel-topology {
    display: grid;
    grid-template-columns: minmax(8rem, 0.8fr) minmax(12rem, 1fr) minmax(8rem, 0.8fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid #e3e8ee;
    border-radius: 0.7rem;
    background: #f7f9fb;
}

.topology-node {
    display: grid;
    gap: 0.2rem;
    min-height: 7rem;
    align-content: center;
    padding: 0.75rem;
    border: 1px solid #cbd6e1;
    border-radius: 0.65rem;
    background: #ffffff;
}

.topology-node-channel {
    border-color: #b9d5d2;
    background: #f4fbfa;
}

.topology-node-kicker {
    color: #52667a;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topology-flows {
    display: grid;
    gap: 0.35rem;
}

.channel-flow {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.42rem 0.55rem;
    border: 1px solid #dce4eb;
    border-radius: 0.45rem;
    background: #ffffff;
    font-weight: 600;
}

.channel-flow strong {
    color: #167a73;
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.channel-flow span:last-child,
.channel-flow.reverse span:first-child,
.channel-flow-arrow {
    color: #167a73;
    font-weight: 800;
}

.channel-readiness-surface {
    padding: 0.95rem 1.1rem 1.1rem;
}

.channel-readiness-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 0.8rem 0 0;
    padding: 0;
    list-style: none;
}

.channel-readiness-step {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    min-height: 4.1rem;
    padding: 0.65rem;
    border: 1px solid #dbe2e9;
    border-radius: 0.6rem;
    background: #f8fafc;
}

.channel-readiness-step.complete {
    border-color: #b8d8d2;
    background: #f2fbf8;
}

.channel-readiness-step.attention {
    border-color: #ead49d;
    background: #fffaf0;
}

.readiness-step-number {
    display: grid;
    flex: 0 0 1.45rem;
    width: 1.45rem;
    height: 1.45rem;
    place-items: center;
    border-radius: 50%;
    background: #dce5ed;
    color: #334155;
    font-size: 0.75rem;
    font-weight: 800;
}

.channel-readiness-step.complete .readiness-step-number {
    background: #167a73;
    color: #ffffff;
}

.channel-readiness-step.attention .readiness-step-number {
    background: #b7791f;
    color: #ffffff;
}

.channel-readiness-step div,
.channel-summary-item,
.channel-review-grid .channel-review-choice,
.channel-location-flow > div {
    display: grid;
    gap: 0.18rem;
}

.channel-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: #dfe5eb;
}

.channel-summary-item {
    min-height: 5.25rem;
    padding: 0.75rem 0.85rem;
    background: #ffffff;
}

.channel-summary-item .eyebrow {
    margin: 0;
}

.channel-summary-item strong {
    overflow-wrap: anywhere;
}

.channel-location-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.8rem;
    margin: 0.85rem 0 0.55rem;
    background: #f8fafc;
}

.channel-location-flow > div {
    padding: 0.55rem 0.65rem;
    border: 1px solid #dbe2e9;
    border-radius: 0.55rem;
    background: #ffffff;
}

.channel-flow-arrow {
    font-size: 1.3rem;
}

.channel-review-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.7rem;
    margin-bottom: 0.85rem;
    background: #f8fafc;
}

.channel-review-grid .channel-review-choice {
    padding: 0.65rem;
    border: 1px solid #dbe2e9;
    border-radius: 0.55rem;
    background: #ffffff;
}

.channel-review-grid .eyebrow {
    margin: 0;
}

.movement-reference-cell,
.resource-table td .movement-reference-cell {
    width: 14rem;
    max-width: 18rem;
    min-width: 11rem;
}

.movement-reference-cell strong,
.movement-reference-cell .table-supporting-text {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.movement-reference-cell .movement-reference-secondary {
    margin-top: 0.2rem;
    color: var(--bc-muted, #64748b);
    font-size: 0.76rem;
}

.channel-empty-note > span {
    display: block;
    margin-top: 0.25rem;
}

.inventory-product-identity {
    min-width: 12rem;
}

.inventory-product-identity strong,
.inventory-product-identity .table-supporting-text,
.inventory-product-identity .table-subordinate {
    display: block;
    overflow-wrap: anywhere;
}

.inventory-product-identity .table-subordinate {
    margin-top: 0.15rem;
    color: var(--bc-muted, #64748b);
    font-size: 0.76rem;
}

.empty-workflow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    align-items: center;
    justify-content: center;
    margin: 0.8rem auto 0;
    color: #52667a;
    font-size: 0.78rem;
    font-weight: 700;
}

@media (min-width: 1200px) {
    :root {
        --bc-sidebar-width: 244px;
        --bc-page-gutter: 1.1rem;
        --bc-control-height: 2.55rem;
    }

    .app-shell {
        grid-template-columns: 244px minmax(0, 1fr);
    }

    .sidebar {
        padding: 1rem 0.85rem;
    }

    .brand {
        gap: 0.6rem;
        margin-bottom: 0.85rem;
    }

    .brand-mark {
        width: 2.35rem;
        height: 2.35rem;
    }

    .nav-stack {
        gap: 0.18rem;
    }

    .nav-group-title {
        margin: 0.75rem 0 0.15rem;
        padding: 0 0.55rem;
    }

    .nav-stack a {
        min-height: 2.25rem;
        padding: 0.42rem 0.6rem;
        border-radius: 0.55rem;
        font-size: 0.88rem;
    }

    .session-card {
        margin-top: 0.85rem;
        padding: 0.7rem;
        border-radius: 0.65rem;
    }

    .session-card p {
        max-width: 100%;
        overflow-wrap: anywhere;
        font-size: 0.76rem;
    }

    .workspace {
        padding: 0.85rem 1.1rem 1.25rem;
    }

    .topbar {
        min-height: 2.55rem;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
        border: 0;
        border-radius: 0.65rem;
        background: transparent;
        box-shadow: none;
    }

    .workspace-title {
        font-size: clamp(1.05rem, 1.45vw, 1.35rem);
    }

    .workspace-body,
    .resource-index-page,
    .resource-detail-page {
        gap: 0.75rem;
    }

    .merchant-page-header {
        margin-bottom: 0.7rem;
    }

    .merchant-page-header .page-title {
        font-size: clamp(1.55rem, 2.1vw, 2.15rem);
    }

    .resource-table-card,
    .resource-detail-card,
    .table-card,
    .form-card,
    .panel-card,
    .callout-card,
    .metric-card {
        padding: 0.85rem;
        border: 1px solid #d6dde5;
        border-radius: 0.85rem;
        background: #ffffff;
        box-shadow: none;
        backdrop-filter: none;
    }

    .filter-toolbar {
        gap: 0.55rem;
        margin-bottom: 0.7rem;
        padding: 0.65rem 0.75rem;
        border-radius: 0.7rem;
    }

    .filter-toolbar input,
    .filter-toolbar select,
    .filter-field select,
    .filter-field input,
    .form-grid input,
    .form-grid select,
    .form-grid textarea,
    .working-drawer-form input,
    .working-drawer-form select,
    .working-drawer-form textarea {
        min-height: 2.45rem;
        border-radius: 0.5rem;
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .danger-button,
    .table-actions button,
    .compact-action {
        min-height: 2.45rem;
        border-radius: 0.5rem;
        padding: 0.48rem 0.72rem;
    }

    .resource-table th,
    .resource-table td {
        padding: 0.58rem 0.58rem;
    }

    .resource-table th {
        font-size: 0.7rem;
    }

    .resource-table td {
        font-size: 0.84rem;
    }

    .empty-state,
    .merchant-empty-state,
    .merchant-error-state {
        padding: 1rem;
        border-radius: 0.7rem;
    }
}

/* The menu trigger belongs only to the compact/mobile shell. */
.mobile-nav-toggle {
    display: none;
}

@media (max-width: 1120px) {
    .mobile-nav-toggle {
        display: inline-flex;
    }
}

@media (max-width: 1000px) {
    .channel-hero-surface {
        grid-template-columns: 1fr;
    }

    .channel-readiness-list,
    .channel-summary-grid,
    .channel-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .channel-topology,
    .channel-location-flow {
        grid-template-columns: 1fr;
    }

    .topology-flows {
        order: 3;
    }

    .channel-flow-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }

    .channel-readiness-list,
    .channel-summary-grid,
    .channel-review-grid {
        grid-template-columns: 1fr;
    }
}

/* Stock Transfer V1: resource index plus focused, safety-forward posting workspace. */
.stock-transfer-detail > .merchant-page-header .page-title {
    max-width: min(100%, 32ch);
    overflow-wrap: anywhere;
    font-size: clamp(1.45rem, 2.4vw, 2.2rem);
    line-height: 1.08;
}

.stock-transfer-index .resource-table-card {
    overflow: hidden;
}

.stock-transfer-index .table-subordinate,
.stock-transfer-detail .table-subordinate {
    display: block;
    margin-top: 0.15rem;
    color: var(--bc-muted);
}

.stock-transfer-summary {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto minmax(0, 1.4fr) repeat(2, minmax(9rem, 1fr));
    gap: 1rem;
    align-items: center;
    padding: 1.1rem;
    border: 1px solid var(--bc-border);
    border-radius: 1rem;
    background: var(--bc-surface-strong);
}

.stock-transfer-summary > div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.stock-transfer-summary small,
.stock-transfer-summary .eyebrow {
    color: var(--bc-muted);
}

.transfer-route-arrow {
    font-size: 1.5rem;
    color: var(--bc-primary);
}

.stock-transfer-notes,
.stock-transfer-line-workspace,
.stock-transfer-posting-panel {
    padding: 1.1rem;
    border: 1px solid var(--bc-border);
    border-radius: 1rem;
    background: var(--bc-surface-strong);
}

.stock-transfer-line-workspace,
.stock-transfer-posting-panel,
.consequence-confirmation {
    display: grid;
    gap: 1rem;
}

.transfer-product-selector {
    margin-bottom: 1rem;
}

.transfer-selected-product {
    margin-bottom: 1rem;
}

.transfer-line-entry {
    display: grid;
    grid-template-columns: minmax(10rem, 16rem) auto;
    gap: 1rem;
    align-items: end;
}

.transfer-line-entry label {
    display: grid;
    gap: 0.4rem;
}

.stock-transfer-posting-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    border-color: color-mix(in srgb, var(--bc-primary) 35%, var(--bc-border));
}

.stock-transfer-posting-panel .consequence-confirmation {
    grid-column: 1 / -1;
}

@media (max-width: 1000px) {
    .stock-transfer-summary {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    }

    .stock-transfer-summary > div:nth-last-child(-n + 2) {
        grid-column: span 1;
    }
}

@media (max-width: 767px) {
    .stock-transfer-summary,
    .stock-transfer-posting-panel,
    .transfer-line-entry {
        grid-template-columns: 1fr;
    }

    .transfer-route-arrow {
        transform: rotate(90deg);
        justify-self: start;
    }

    .stock-transfer-summary > div:nth-last-child(-n + 2),
    .stock-transfer-posting-panel .consequence-confirmation {
        grid-column: auto;
    }
}

.operational-section {
    display: grid;
    gap: var(--bc-space-4);
    min-width: 0;
    padding-top: var(--bc-space-5);
    border-top: 1px solid var(--bc-border);
}

.operational-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--bc-space-4);
    min-width: 0;
}

.operational-section-heading > div {
    min-width: 0;
}

.operational-section-heading h2,
.operational-section-heading h3,
.operational-section-heading p {
    margin-top: 0;
}

.operational-section-heading h2 {
    margin-bottom: 0.35rem;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.operational-section-heading .eyebrow {
    margin-bottom: 0.3rem;
}

.operational-readonly-note {
    max-width: 28rem;
    margin: 0;
    text-align: right;
}

.operational-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--bc-space-3);
    min-width: 0;
}

.operational-summary-item {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--bc-border);
    border-top: 0.25rem solid #64748b;
    border-radius: var(--bc-radius-panel);
    background: rgba(255, 255, 255, 0.74);
}

.operational-summary-item p {
    margin-top: 0;
}

.operational-summary-item .metric-value {
    margin: 0.2rem 0;
    font-variant-numeric: tabular-nums;
}

.operational-summary-item .muted {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.operational-summary-critical,
.operational-summary-danger {
    border-top-color: var(--bc-danger);
}

.operational-summary-warning {
    border-top-color: #c36b14;
}

.operational-summary-info {
    border-top-color: var(--bc-primary);
}

.operational-supporting-statuses,
.operational-domain-summary {
    display: flex;
    align-items: center;
    gap: 0.55rem 1.2rem;
    flex-wrap: wrap;
    margin: 0;
    color: var(--bc-muted);
}

.operational-supporting-statuses span,
.operational-domain-summary span:not(.muted) {
    white-space: nowrap;
}

.operational-domain-summary {
    padding: 0.75rem 0;
    border-top: 1px solid var(--bc-border);
    border-bottom: 1px solid var(--bc-border);
}

.operational-filter-note {
    margin: calc(var(--bc-space-4) * -1) 0 0;
    font-size: 0.86rem;
}

.operational-primary-cell,
.operational-evidence-cell,
.operational-row-actions {
    min-width: 12rem;
}

.operational-primary-cell > span,
.operational-evidence-cell > span,
.action-explanation {
    display: block;
    margin-top: 0.2rem;
}

.operational-evidence-cell {
    max-width: 32rem;
    white-space: normal;
}

.operational-row-actions {
    display: grid;
    justify-items: start;
    gap: 0.55rem;
    max-width: 18rem;
}

.operational-row-actions .secondary-button {
    text-decoration: none;
}

.consequential-recovery-action {
    border-color: rgba(195, 107, 20, 0.32);
    background: rgba(224, 138, 50, 0.12);
    color: #7b4209;
}

.operational-feedback,
.operational-warning {
    margin: 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(25, 91, 146, 0.2);
    border-radius: var(--bc-radius-control);
    background: rgba(25, 91, 146, 0.08);
    color: #114b7c;
}

.operational-feedback-error,
.operational-warning {
    border-color: rgba(177, 76, 94, 0.25);
    background: rgba(188, 44, 64, 0.08);
    color: #7f1d2d;
}

.operational-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--bc-space-3);
    margin: 0;
}

.operational-facts > div {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
    background: rgba(238, 243, 248, 0.52);
}

.operational-facts dt,
.technical-detail-list dt {
    color: var(--bc-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.operational-facts dd,
.technical-detail-list dd {
    margin: 0.2rem 0 0;
}

.operational-evidence-block {
    min-width: 0;
}

.operational-evidence-block h3,
.operational-evidence-block p {
    margin-top: 0;
}

.technical-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
    margin: 0;
}

.technical-detail-list > div {
    min-width: 0;
}

.technical-detail-list code {
    overflow-wrap: anywhere;
}

.operational-workspace .resource-table-container {
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
}

.operational-workspace .resource-table th:first-child,
.operational-workspace .resource-table td:first-child {
    padding-left: 0.9rem;
}

.operational-workspace .resource-table th:last-child,
.operational-workspace .resource-table td:last-child {
    padding-right: 0.9rem;
}

/* UI-V1D Exceptions keeps the full decision table inside the desktop workspace. */
@media (min-width: 1200px) {
    .exceptions-workspace .resource-table {
        min-width: 0;
        table-layout: fixed;
    }

    .exceptions-workspace .resource-table th,
    .exceptions-workspace .resource-table td {
        overflow-wrap: anywhere;
    }

    .exceptions-workspace .resource-table th:nth-child(1),
    .exceptions-workspace .resource-table td:nth-child(1) {
        width: 9%;
    }

    .exceptions-workspace .resource-table th:nth-child(2),
    .exceptions-workspace .resource-table td:nth-child(2) {
        width: 19%;
    }

    .exceptions-workspace .resource-table th:nth-child(3),
    .exceptions-workspace .resource-table td:nth-child(3) {
        width: 17%;
    }

    .exceptions-workspace .resource-table th:nth-child(4),
    .exceptions-workspace .resource-table td:nth-child(4) {
        width: 36%;
    }

    .exceptions-workspace .resource-table th:nth-child(5),
    .exceptions-workspace .resource-table td:nth-child(5) {
        width: 19%;
    }

    .exceptions-workspace .resource-table td:last-child .compact-action {
        white-space: normal;
    }
}

/* UI-V1A contract breakpoints: desktop >= 1200, tablet 768–1199, mobile < 768. */
@media (max-width: 1199px) {
    .merchant-page-header {
        flex-wrap: wrap;
    }

    .merchant-page-header-actions {
        flex-basis: 100%;
        justify-content: flex-start;
    }

    .filter-toolbar {
        grid-template-columns: 1fr;
    }

    .filter-toolbar-actions {
        justify-content: flex-start;
    }

    .operational-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operational-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .operational-readonly-note {
        text-align: left;
    }
}

@media (max-width: 767px) {
    .merchant-page-header,
    .merchant-page-header-actions,
    .pagination {
        align-items: stretch;
    }

    .merchant-page-header-actions,
    .merchant-page-header-primary,
    .merchant-page-header-secondary,
    .merchant-page-header-actions > *,
    .merchant-page-header-actions button,
    .merchant-page-header-actions a {
        width: 100%;
    }

    .filter-toolbar-fields {
        grid-template-columns: 1fr;
    }

    .filter-toolbar-actions,
    .filter-toolbar-actions button {
        width: 100%;
    }

    .operational-workspace {
        gap: var(--bc-space-4);
    }

    .operational-section {
        gap: var(--bc-space-3);
        padding-top: var(--bc-space-4);
    }

    .operational-summary-grid,
    .operational-facts,
    .technical-detail-list {
        grid-template-columns: 1fr;
    }

    .operational-summary-item {
        padding: 0.85rem;
    }

    .merchant-state {
        padding: var(--bc-space-4);
    }

    .pagination,
    .pagination-controls {
        align-items: stretch;
    }

    .pagination-summary,
    .pagination-controls,
    .pagination-controls > *,
    .pagination-controls button {
        width: 100%;
    }

    .pagination-controls {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pagination-page-size {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

    .pagination-page {
        display: grid;
        place-items: center;
    }
}

/* Orders workspace: dense, list-first operations with a focused create panel. */
.orders-index-surface {
    gap: 0.75rem;
}

.orders-index-surface .merchant-page-header {
    margin-bottom: 0;
}

.orders-index-surface .filter-toolbar {
    margin-bottom: 0.15rem;
}

.orders-index-surface .resource-table th,
.orders-index-surface .resource-table td {
    padding: 0.62rem 0.6rem;
}

.orders-index-surface .resource-table th {
    font-size: 0.76rem;
}

.orders-index-surface .resource-table td {
    vertical-align: middle;
}

.orders-index-surface .table-primary-link {
    font-size: 0.98rem;
}

.working-drawer-layer {
    position: fixed;
    inset: 0;
    z-index: 80;
}

.working-drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(8, 19, 30, 0.42);
    cursor: default;
}

.working-drawer {
    position: absolute;
    inset: 0 0 auto auto;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(43rem, calc(100vw - 2rem));
    max-width: 100vw;
    height: auto;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0;
    border-radius: 1.2rem 0 0 1.2rem;
    background: var(--bc-surface-strong);
    box-shadow: -18px 0 48px rgba(18, 30, 48, 0.2);
}

.working-drawer-compact {
    width: min(38rem, calc(100vw - 2rem));
}

.working-drawer-wide {
    width: min(49rem, calc(100vw - 2rem));
}

.working-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem 0.9rem;
    border-bottom: 1px solid var(--bc-border);
}

.working-drawer-heading {
    min-width: 0;
}

.working-drawer-heading h2,
.working-drawer-heading p {
    margin: 0;
}

.working-drawer-heading h2 {
    color: var(--bc-text);
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.12;
}

.working-drawer-heading p {
    max-width: 42rem;
    margin-top: 0.35rem;
}

.working-drawer-close {
    flex: 0 0 auto;
}

.working-drawer-helper {
    margin: 0.9rem 1.25rem 0;
    padding: 0.7rem 0.8rem;
    border-left: 3px solid var(--bc-primary);
    background: rgba(25, 91, 146, 0.07);
    color: #174d78;
    font-size: 0.9rem;
}

.working-drawer-helper > :first-child {
    margin-top: 0;
}

.working-drawer-helper > :last-child {
    margin-bottom: 0;
}

.working-drawer-content {
    min-height: 0;
    overflow: hidden;
}

.working-drawer-form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 100%;
    min-height: 0;
}

.working-drawer-form-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1.25rem 1.25rem;
}

.working-drawer-form-grid {
    gap: 0.7rem;
}

.working-drawer-form-section {
    margin-top: 0.35rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--bc-border);
}

.working-drawer-form-section .eyebrow {
    margin: 0;
}

.product-reference-details {
    margin-top: 1rem;
}

.detail-pairs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1.2rem;
}

.detail-pairs p {
    display: grid;
    gap: 0.2rem;
    margin: 0;
}

.detail-pairs span {
    color: var(--bc-muted);
    font-size: 0.8rem;
}

.detail-pairs strong {
    overflow-wrap: anywhere;
}

.working-drawer label,
.order-edit-surface label,
.order-line-editor-card label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    color: #31465b;
    font-size: 0.84rem;
    font-weight: 700;
}

.working-drawer input,
.working-drawer textarea,
.working-drawer select,
.order-edit-surface input,
.order-edit-surface textarea,
.order-edit-surface select {
    min-height: 2.55rem;
    padding: 0.62rem 0.75rem;
    border-radius: 0.7rem;
}

.working-drawer textarea,
.order-edit-surface textarea {
    min-height: 5.5rem;
}

.working-drawer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 4.75rem;
    margin: 0;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--bc-border);
    background: var(--bc-surface-strong);
    box-shadow: 0 -10px 24px rgba(18, 30, 48, 0.05);
}

.working-drawer-feedback {
    margin-top: 0.85rem;
}

.order-detail-surface {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

.order-detail-surface > .merchant-page-header {
    order: 1;
    margin-bottom: 0;
}

.order-header-summary {
    order: 2;
    display: grid;
    grid-template-columns: minmax(11rem, 0.7fr) minmax(0, 1.7fr);
    gap: 0.9rem 1.4rem;
    padding: 1rem;
    box-shadow: none;
}

.order-header-summary-main {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 0.35rem;
}

.order-header-summary-main .eyebrow {
    margin: 0;
}

.order-number-title {
    margin: 0;
    color: var(--bc-text);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1;
    overflow-wrap: anywhere;
}

.order-fact-grid,
.totals-grid {
    display: grid;
    gap: 0.65rem 1rem;
    margin: 0;
}

.order-fact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: start;
}

.order-fact-grid dt,
.totals-grid dt {
    color: var(--bc-muted);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.order-fact-grid dd,
.totals-grid dd {
    margin: 0.14rem 0 0;
    overflow-wrap: anywhere;
}

.order-note {
    grid-column: 1 / -1;
    margin: 0;
    padding-top: 0.7rem;
    border-top: 1px solid var(--bc-border);
}

.order-technical-details {
    grid-column: 1 / -1;
    margin-top: 0;
}

.order-technical-details .technical-details-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.2rem;
}

.order-technical-details p {
    margin: 0;
}

.order-totals-summary {
    order: 4;
    padding: 0.9rem 1rem;
    box-shadow: none;
}

.order-totals-summary .eyebrow {
    margin-bottom: 0.55rem;
}

.totals-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
}

.totals-grand {
    padding-left: 0.9rem;
    border-left: 1px solid var(--bc-border);
}

.totals-grand dd {
    color: var(--bc-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.order-lifecycle-actions {
    order: 3;
    margin-top: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(25, 91, 146, 0.14);
    border-radius: 0.85rem;
    background: rgba(25, 91, 146, 0.05);
}

.order-lifecycle-note {
    order: 3;
    margin: -0.45rem 0 0;
    padding: 0 0.85rem;
    font-size: 0.84rem;
}

.order-cancel-confirmation {
    order: 5;
    margin-top: 0;
    padding: 0.8rem 1rem;
    box-shadow: none;
}

.order-edit-surface {
    order: 6;
    display: grid;
    gap: 0.75rem;
    margin-top: 0;
    padding: 1rem;
    box-shadow: none;
}

.order-edit-surface > .page-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.order-edit-surface > .eyebrow {
    margin: 0;
}

.order-edit-surface .button-row,
.order-line-editor-card .button-row {
    margin-top: 0.85rem;
}

.order-line-editor-card {
    margin-top: 0;
    padding: 0.9rem;
    border: 1px solid var(--bc-border);
    box-shadow: none;
}

.order-line-editor-card > .eyebrow,
.order-line-editor-card > .muted {
    margin-top: 0;
}

.order-advanced-line-fields {
    grid-column: 1 / -1;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.7rem;
    background: rgba(238, 243, 248, 0.46);
}

.order-advanced-line-fields summary {
    color: var(--bc-primary);
    cursor: pointer;
    font-weight: 750;
}

.order-advanced-line-fields[open] summary {
    margin-bottom: 0.7rem;
}

.order-advanced-line-fields > p {
    grid-column: 1 / -1;
    margin: 0 0 0.7rem;
    font-size: 0.82rem;
}

.order-finance-section,
.order-cost-section {
    order: 7;
    overflow: hidden;
    border: 1px solid var(--bc-border);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.64);
}

.order-cost-section {
    order: 8;
}

.order-secondary-section > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.8rem;
    padding: 0.7rem 0.9rem;
    color: var(--bc-text);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    position: relative;
}

.order-secondary-section > summary::-webkit-details-marker {
    display: none;
}

.order-secondary-section > summary::after {
    content: "⌄";
    color: var(--bc-primary);
    font-size: 1.05rem;
}

.order-secondary-section[open] > summary {
    border-bottom: 1px solid var(--bc-border);
    background: rgba(238, 243, 248, 0.44);
}

.order-secondary-section[open] > summary::after {
    transform: rotate(180deg);
}

.order-secondary-content {
    padding: 0.8rem 0.9rem 0.95rem;
}

.order-secondary-content > p:first-child {
    margin-top: 0;
}

/* Purchasing: compact resource index and focused detail evidence. */
.purchasing-list-card {
    padding: 0.95rem;
}

.purchasing-list-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.purchasing-list-heading p {
    margin: 0;
}

.purchasing-list-heading .eyebrow {
    margin-bottom: 0.2rem;
}

.purchasing-list-card .resource-table {
    min-width: 74rem;
}

.purchasing-list-card .resource-table th,
.purchasing-list-card .resource-table td {
    padding: 0.62rem 0.58rem;
    vertical-align: middle;
}

.purchasing-list-card .resource-table th {
    font-size: 0.74rem;
}

.purchase-order-row-target {
    cursor: pointer;
}

.purchase-order-row-target:hover {
    background: rgba(239, 245, 250, 0.56);
}

.purchase-order-reference-cell {
    min-width: 9.5rem;
}

.purchase-order-quantity-cell,
.purchase-order-actions-cell {
    white-space: nowrap;
}

.purchase-order-actions-cell {
    position: relative;
    width: 3.4rem;
}

.purchase-order-action-disclosure {
    position: relative;
    display: inline-block;
    z-index: 1;
}

.purchase-order-action-disclosure[open] {
    z-index: 2;
}

.purchase-order-action-summary {
    position: relative;
    min-width: 2.45rem;
    padding-inline: 0.5rem;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    list-style: none;
}

.purchase-order-action-summary::-webkit-details-marker,
.purchase-order-action-summary::marker {
    display: none;
    content: "";
}

.purchase-order-action-panel {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 3;
    display: grid;
    gap: 0.15rem;
    box-sizing: border-box;
    min-width: 13rem;
    max-width: min(16rem, calc(100vw - 1rem));
    padding: 0.35rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.7rem;
    background: var(--bc-surface-strong);
    box-shadow: 0 14px 32px rgba(18, 30, 48, 0.18);
}

/* Keep the final rows inside the local table scrollport when the menu opens. */
.purchase-order-row:nth-last-child(-n + 2) .purchase-order-action-panel {
    top: auto;
    bottom: calc(100% + 0.35rem);
}

.purchase-order-action-panel a {
    display: block;
    min-height: 2.5rem;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    border-radius: 0.45rem;
    color: var(--bc-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.purchase-order-action-panel a:hover,
.purchase-order-action-panel a:focus-visible {
    background: rgba(25, 91, 146, 0.1);
    color: var(--bc-primary);
}

.purchase-order-detail-header .merchant-page-header .page-title {
    max-width: min(100%, 32ch);
    overflow-wrap: anywhere;
    font-size: clamp(1.45rem, 2.4vw, 2.2rem);
    line-height: 1.08;
}

.purchase-order-summary,
.purchase-order-lifecycle,
.purchase-order-lines,
.purchase-order-commercial-totals {
    margin-top: 0.85rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.6);
}

.purchase-order-summary-heading,
.purchase-order-commercial-totals {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.purchase-order-summary-heading h2,
.purchase-order-lifecycle h2,
.purchase-order-commercial-totals h2 {
    margin: 0;
    color: var(--bc-text);
    font-size: 1.1rem;
}

.purchase-order-summary-heading .eyebrow,
.purchase-order-commercial-totals .eyebrow,
.purchase-order-lifecycle .eyebrow {
    margin: 0 0 0.25rem;
}

.purchase-order-status-pair {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.purchase-order-fact-grid,
.purchase-order-totals-grid {
    display: grid;
    gap: 0.7rem 1.1rem;
    margin: 0.9rem 0 0;
}

.purchase-order-fact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.purchase-order-totals-grid {
    grid-template-columns: repeat(4, minmax(7rem, 1fr));
    min-width: min(38rem, 100%);
    align-items: end;
    margin: 0;
}

.purchase-order-fact-grid dt,
.purchase-order-totals-grid dt,
.purchase-order-notes dt {
    color: var(--bc-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.purchase-order-fact-grid dd,
.purchase-order-totals-grid dd {
    margin: 0.18rem 0 0;
    overflow-wrap: anywhere;
}

.purchase-order-notes {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bc-border);
}

.purchase-order-notes p {
    margin: 0.25rem 0 0;
    overflow-wrap: anywhere;
}

.purchase-order-technical-details {
    margin-top: 0.8rem;
    font-size: 0.82rem;
}

.purchase-order-technical-details summary {
    width: fit-content;
    color: var(--bc-primary);
    cursor: pointer;
    font-weight: 750;
}

.purchase-order-technical-details > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.55rem;
    color: var(--bc-muted);
}

.purchase-order-lines {
    overflow: hidden;
}

.purchase-order-lines .page-title {
    margin: 0.15rem 0 0.65rem;
    font-size: 1.25rem;
}

.purchase-order-lines .table-wrap {
    margin-top: 0.75rem;
}

.purchase-order-lines table {
    min-width: 66rem;
}

.purchase-line-product {
    color: var(--bc-text);
    font-weight: 800;
}

.purchase-line-meta {
    max-width: 25rem;
    margin-top: 0.18rem;
    color: var(--bc-muted);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.purchase-line-selector {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    margin-bottom: 0.9rem;
}

.purchase-line-selector h4,
.purchase-line-selector label,
.purchase-line-selector p {
    margin: 0;
}

.purchase-line-selector h4 {
    color: var(--bc-text);
    font-size: 1rem;
}

.purchase-line-selector label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    color: #31465b;
    font-size: 0.84rem;
    font-weight: 700;
}

.purchase-line-selector input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: var(--bc-control-height);
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius-control);
    background: var(--bc-surface-strong);
    color: var(--bc-text);
}

.purchase-line-results {
    display: grid;
    gap: 0.2rem;
    max-height: min(17rem, 42vh);
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid var(--bc-border);
    border-radius: 0.7rem;
    background: var(--bc-surface-strong);
    box-shadow: 0 10px 24px rgba(18, 30, 48, 0.1);
}

.purchase-line-result {
    display: grid;
    gap: 0.12rem;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    background: transparent;
    color: var(--bc-text);
    text-align: left;
    cursor: pointer;
}

.purchase-line-result:hover,
.purchase-line-result:focus-visible,
.purchase-line-result.is-highlighted {
    border-color: rgba(25, 91, 146, 0.2);
    background: rgba(25, 91, 146, 0.09);
}

.purchase-line-result-product {
    overflow-wrap: anywhere;
    font-weight: 800;
}

.purchase-line-result-meta {
    overflow-wrap: anywhere;
    color: var(--bc-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.purchase-line-empty {
    padding: 0.65rem 0.75rem;
    border-left: 3px solid var(--bc-border);
    color: var(--bc-muted);
}

.selected-product-context {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    border-left: 3px solid var(--bc-primary);
    background: rgba(25, 91, 146, 0.07);
    color: var(--bc-text);
}

.selected-product-context .eyebrow {
    margin: 0;
}

.selected-product-context strong {
    overflow-wrap: anywhere;
}

.selected-product-context dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 0.9rem;
    margin: 0.2rem 0 0;
}

.selected-product-context dt {
    color: var(--bc-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.selected-product-context dd {
    margin: 0.1rem 0 0;
    overflow-wrap: anywhere;
}

.purchase-order-line-editing > td {
    padding: 0.85rem;
    border-left: 3px solid var(--bc-primary);
    background: rgba(25, 91, 146, 0.06);
}

.purchase-line-inline-editor {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(22rem, 1.25fr);
    align-items: start;
    gap: 1rem;
}

.purchase-line-inline-identity {
    min-width: 0;
}

.purchase-line-inline-identity .eyebrow {
    margin: 0 0 0.25rem;
}

.purchase-line-inline-identity .muted {
    margin: 0.55rem 0 0;
}

.purchase-line-inline-editor-form {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.purchase-line-inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
    gap: 0.75rem;
}

.purchase-line-inline-fields label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    color: #31465b;
    font-size: 0.84rem;
    font-weight: 700;
}

.purchase-line-inline-feedback {
    margin: 0;
}

.purchase-order-commercial-totals {
    align-items: end;
}

.purchase-order-commercial-totals > div:first-child {
    min-width: 12rem;
}

.purchase-order-commercial-totals p {
    max-width: 34rem;
    margin: 0.35rem 0 0;
}

.purchase-order-grand-total {
    padding-left: 0.85rem;
    border-left: 1px solid var(--bc-border);
}

.purchase-order-grand-total dd {
    color: var(--bc-primary);
    font-size: 1.08rem;
    font-weight: 850;
}

.purchase-order-secondary-section {
    margin-top: 0.85rem;
    overflow: hidden;
    border: 1px solid var(--bc-border);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.6);
}

.purchase-order-secondary-section > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.8rem;
    box-sizing: border-box;
    padding: 0.7rem 0.9rem;
    color: var(--bc-text);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.purchase-order-secondary-section > summary::-webkit-details-marker {
    display: none;
}

.purchase-order-secondary-section > summary::after {
    content: "⌄";
    color: var(--bc-primary);
}

.purchase-order-secondary-section[open] > summary {
    border-bottom: 1px solid var(--bc-border);
    background: rgba(238, 243, 248, 0.44);
}

.purchase-order-secondary-content {
    padding: 0.85rem 0.9rem 0.95rem;
}

.purchase-order-secondary-content > p:first-child {
    margin-top: 0;
}

.receipt-line-evidence {
    display: grid;
    gap: 0.18rem;
    min-width: 14rem;
    color: var(--bc-muted);
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .purchase-order-fact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .purchase-order-commercial-totals {
        align-items: stretch;
        flex-direction: column;
    }

    .purchase-order-totals-grid {
        min-width: 0;
    }
}

@media (max-width: 767px) {
    .purchasing-list-heading,
    .purchase-order-summary-heading,
    .purchase-order-commercial-totals {
        align-items: flex-start;
        flex-direction: column;
    }

    .purchase-order-status-pair {
        justify-content: flex-start;
    }

    .purchase-order-totals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .purchase-order-grand-total {
        padding-left: 0;
        border-left: 0;
    }

    .selected-product-context dl {
        grid-template-columns: 1fr;
    }

    .purchase-line-inline-editor,
    .purchase-line-inline-fields {
        grid-template-columns: 1fr;
    }

    .purchase-order-secondary-section > summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

@media (max-width: 900px) {
    .order-header-summary {
        grid-template-columns: 1fr;
    }

    .order-fact-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .totals-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .totals-grand {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 767px) {
    .working-drawer {
        inset: 0 0 auto 0;
        width: 100%;
        border-radius: 0;
    }

    .working-drawer-header {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .working-drawer-close {
        align-self: flex-start;
    }

    .working-drawer-helper {
        margin: 0.75rem 1rem 0;
    }

    .working-drawer-form-body {
        padding: 0.9rem 1rem 1rem;
    }

    .working-drawer-actions {
        align-items: stretch;
        flex-direction: column;
        padding: 0.75rem 1rem max(0.75rem, env(safe-area-inset-bottom));
    }

    .working-drawer-actions > * {
        width: 100%;
        box-sizing: border-box;
    }

    .order-fact-grid,
    .totals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .courier-booking-facts {
        grid-template-columns: 1fr;
    }

    .courier-provider-detail .detail-list,
    .courier-shipment-summary .detail-list,
    .courier-booking-review .detail-list,
    .courier-editor .detail-list,
    .courier-capability-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.3rem;
    }

    .courier-provider-detail .detail-list dt:not(:first-child),
    .courier-shipment-summary .detail-list dt:not(:first-child),
    .courier-booking-review .detail-list dt:not(:first-child),
    .courier-editor .detail-list dt:not(:first-child),
    .courier-capability-list dt:not(:first-child) {
        margin-top: 0.55rem;
    }

    .courier-provider-detail .detail-list dd,
    .courier-shipment-summary .detail-list dd,
    .courier-booking-review .detail-list dd,
    .courier-editor .detail-list dd,
    .courier-capability-list dd {
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .courier-booking-state {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.4rem;
    }

    .order-secondary-section > summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .order-secondary-section > summary::after {
        position: absolute;
        right: 1rem;
    }
}

/* Keep the Phase 1 shell authoritative after feature-specific legacy layers. */
@media (min-width: 1200px) {
    :root {
        --bc-sidebar-width: 238px;
        --bc-page-gutter: 1.25rem;
        --bc-control-height: 2.5rem;
    }

    .app-shell {
        grid-template-columns: var(--bc-sidebar-width) minmax(0, 1fr);
    }

    .sidebar {
        padding: 0.85rem 0.75rem;
    }

    .brand {
        gap: 0.65rem;
        margin: 0;
    }

    .brand-mark {
        width: 2.15rem;
        height: 2.15rem;
    }

    .nav-stack {
        display: block;
    }

    .nav-stack a {
        min-height: 2.18rem;
        padding: 0.35rem 0.5rem;
        border-radius: 0.5rem;
        font-size: 0.84rem;
    }

    .session-card {
        margin-top: 0.65rem;
        padding: 0.65rem;
    }

    .workspace {
        padding: 0.75rem var(--bc-page-gutter) 1.5rem;
    }

    .topbar {
        min-height: 3.2rem;
        margin-bottom: 0.85rem;
        padding: 0.45rem 0.55rem 0.45rem 0.8rem;
        border: 1px solid var(--bc-border);
        border-radius: 0.75rem;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: var(--bc-shadow-sm);
    }

    .workspace-title {
        font-size: 1rem;
    }

    .resource-table-card,
    .resource-detail-card,
    .table-card,
    .form-card,
    .panel-card,
    .callout-card,
    .metric-card {
        padding: 0.9rem;
        border-color: var(--bc-border);
        border-radius: var(--bc-radius-panel);
        box-shadow: var(--bc-shadow-sm);
    }

    .primary-button,
    .secondary-button,
    .ghost-button,
    .danger-button,
    .table-actions button,
    .compact-action {
        min-height: var(--bc-control-height);
        border-radius: var(--bc-radius-control);
    }
}
.privacy-case-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 1rem 1.5rem;
    margin: 0 0 1.5rem;
}

.privacy-case-meta div { min-width: 0; }
.privacy-case-meta dt { color: var(--text-muted, #667085); font-size: .875rem; }
.privacy-case-meta dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.privacy-pager { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.privacy-confirmation { display: flex; align-items: flex-start; gap: .5rem; margin: 1rem 0; }
.privacy-workspace .filter-field { max-width: 28rem; margin: 1rem 0; }
.privacy-workspace code { overflow-wrap: anywhere; }
.privacy-case-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1rem 0; }

/* Semantic summary navigation retains the existing compact surface geometry. */
.navigation-tile {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    min-width: 0;
}
.navigation-tile:hover { outline: 1px solid #195b92; outline-offset: -1px; background-color: #f0f6fb; }
.navigation-tile:focus-visible { outline: 3px solid #195b92; outline-offset: 2px; }
.dashboard-attention-list li > a { display: flex; gap: 0.6rem; align-items: center; width: 100%; }
.channel-review-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; font: inherit; }
.product-description { white-space: pre-line; overflow-wrap: anywhere; }
[id$="-heading"], #report-drilldown, #profitability-drilldown { scroll-margin-top: 1rem; }

.shortage-page { grid-template-columns: minmax(0, 1fr); }
.shortage-page > * { min-width: 0; }
.shortage-page h2 { overflow-wrap: anywhere; }
.shortage-page .shortage-scroll-hint { display: none; }
@media (max-width: 767px) {
    .shortage-page .shortage-scroll-hint { display: block; font-size: 0.85rem; }
}
