html,
body {
    min-height: 100%;
    margin: 0;
    background: #f6f7f9;
}

.foundation-main, .app-main {
    min-height: 100vh;
    padding-top: 72px;
    display: flex;
    align-items: center;
}
.app-card { border: 1px solid #eaecf0; border-radius: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.app-main { align-items: flex-start; min-width: 0; }
.app-main > .mud-container { box-sizing: border-box; width: 100%; min-width: 0; }
.app-content { min-width: 0; }
.app-public-nav { flex-wrap: wrap; }
.app-topbar { height: 72px !important; min-height: 72px !important; padding: 0 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.app-topbar-brand { display: flex; align-items: center; min-width: 0; gap: .75rem; }
.app-topbar-logo { display: block; width: 3rem; height: 2rem; flex: 0 0 auto; object-fit: contain; }
.app-topbar-title { font-weight: 650; line-height: 1.2; }
.app-nav-toggle { display: inline-flex; }
.app-drawer { border-right: 1px solid #eaecf0; overflow-y: auto; overscroll-behavior: contain; }
.app-drawer-content { min-height: 100%; padding: .75rem .5rem 1.25rem; }
.app-drawer-heading { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem 1rem; border-bottom: 1px solid #eaecf0; }
.app-drawer-user-icon { flex: 0 0 auto; }
.app-drawer-user-name { min-width: 0; color: #344054; font-weight: 650; overflow-wrap: anywhere; }
.app-nav-menu { padding-top: .5rem; }
.app-nav-group { display: block; padding: 1rem 1rem .35rem; color: #667085; font-weight: 700; letter-spacing: .08em; }
.app-nav-link { width: auto; margin: 2px .25rem; border-radius: 8px; }
.app-nav-link .mud-nav-link.active { background: rgba(111, 100, 45, .11); color: #554c22; font-weight: 650; }
.login-shell { display: flex; justify-content: center; width: 100%; padding: 1rem 0 2rem; }
.login-card { width: 100%; max-width: 30rem; }
.login-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.25rem; border-bottom: 1px solid #eaecf0; }
.login-brand-logo { display: block; width: 5.5rem; height: 3.25rem; flex: 0 0 auto; object-fit: contain; }
.login-brand-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.2; }
.login-brand-company { color: #7a6b34; font-weight: 800; letter-spacing: .1em; line-height: 1.2; }
.login-brand-app { color: #101828; font-weight: 750; line-height: 1.25; }
.login-title { color: #101828; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.home-shell { width: 100%; max-width: 60rem; margin: 0 auto; }
.home-state { min-height: 12rem; }
.home-welcome-card, .home-public-card { overflow: hidden; }
.home-welcome-heading { display: flex; align-items: center; gap: 1rem; }
.home-welcome-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; flex: 0 0 auto; border-radius: 50%; background: #f4f3ea; }
.home-email-summary { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; overflow-wrap: anywhere; }
.home-public-card { display: flex; min-height: 15rem; flex-direction: column; align-items: flex-start; justify-content: center; gap: .75rem; }
.profile-shell { width: 100%; max-width: 56rem; margin: 0 auto; }
.profile-state { min-height: 14rem; }
.profile-section { overflow: hidden; }
.profile-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.profile-verification-cell { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: .35rem; }
.profile-save-actions { display: flex; justify-content: flex-end; }
.profile-security-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.profile-security-dialog { max-width: 40rem; }
.profile-current-email { border: 1px solid #eaecf0; background: #fcfcfd; overflow-wrap: anywhere; }
.laundry-item-surface { overflow: hidden; }
.laundry-item-toolbar { padding: 1rem; border-bottom: 1px solid #eaecf0; background: #fcfcfd; align-items: center; }
.laundry-item-toolbar-actions-cell { display: flex; align-items: center; }
.laundry-item-toolbar-actions { display: flex; width: 100%; align-items: center; gap: .375rem; }
.laundry-item-search-button { flex: 1 1 auto; min-width: 0; }
.laundry-item-table { width: 100%; }
.laundry-item-row { cursor: pointer; }
.laundry-item-actions-heading { text-align: right; }
.laundry-item-actions-cell { min-width: 11rem; }
.laundry-item-actions { display: flex; justify-content: flex-end; align-items: center; gap: .125rem; }
.empty-state { display: flex; min-height: 13rem; padding: 2rem; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; }
.laundry-item-detail-grid { padding-top: .25rem; }
.laundry-version-table { border: 1px solid #eaecf0; border-radius: 10px; overflow: hidden; }
.master-surface { overflow: hidden; }
.master-toolbar { padding: 1rem; border-bottom: 1px solid #eaecf0; background: #fcfcfd; align-items: center; }
.master-toolbar-actions-cell { display: flex; align-items: center; }
.master-toolbar-actions { display: flex; width: 100%; align-items: center; gap: .375rem; }
.master-search-button { flex: 1 1 auto; min-width: 0; }
.master-table { width: 100%; }
.master-row { cursor: pointer; }
.master-actions-heading { text-align: right; }
.master-actions-cell { min-width: 9rem; }
.master-actions { display: flex; justify-content: flex-end; align-items: center; gap: .125rem; }
.master-detail-grid { padding-top: .25rem; overflow-wrap: anywhere; }
.master-dialog .mud-dialog-content { overflow-x: hidden; }
.user-detail-dialog { max-width: 64rem; }
.user-detail-heading, .user-section-heading, .user-assignment-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.user-detail-section { border: 1px solid #eaecf0; background: #fcfcfd; }
.user-role-list, .user-detail-actions { display: flex; flex-wrap: wrap; gap: .375rem; }
.user-assignment-row { border: 1px solid #eaecf0; border-radius: 8px; background: #fff; overflow-wrap: anywhere; }
.role-code, .role-permission-code { overflow-wrap: anywhere; word-break: break-word; }
.role-detail-dialog { max-width: 66rem; }
.role-permission-editor-dialog { max-width: 70rem; }
.role-error-content, .role-permission-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.role-permissions-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.role-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.role-permission-group { height: 100%; border: 1px solid #eaecf0; background: #fcfcfd; }
.role-permission-list { display: grid; gap: .75rem; margin-top: .75rem; }
.role-permission-item { padding-top: .75rem; border-top: 1px solid #eaecf0; }
.role-permission-item:first-child { padding-top: 0; border-top: 0; }
.role-permission-option { min-height: 2.75rem; display: flex; align-items: flex-start; gap: .5rem; padding-top: .75rem; border-top: 1px solid #eaecf0; cursor: pointer; }
.role-permission-option:first-child { padding-top: 0; border-top: 0; }
.role-permission-option-copy { min-width: 0; padding-top: .3rem; }
.role-editor-group { overflow: hidden; }
.role-empty-state { min-height: 10rem; }
.data-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.detergent-surface { overflow: hidden; }
.detergent-toolbar { padding: 1rem; border-bottom: 1px solid #eaecf0; background: #fcfcfd; align-items: center; }
.detergent-toolbar-action { display: flex; align-items: center; }
.detergent-content { display: grid; gap: 1rem; padding: 1rem; }
.detergent-summary-card { height: 100%; background: #fcfcfd; }
.detergent-table { width: 100%; border: 1px solid #eaecf0; border-radius: 10px; overflow: hidden; }
.detergent-table .mud-table-cell { vertical-align: middle; }
.detergent-unit { min-width: 7rem; }
.detergent-variance { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.detergent-variance-chip { color: #475467; border-color: #d0d5dd; background: #f9fafb; }
.detergent-status-chip { color: #475467; border-color: #d0d5dd; background: #f9fafb; }
.detergent-status-recorded { color: #175cd3; border-color: #b2ddff; background: #eff8ff; }
.detergent-note { min-width: 9rem; max-width: 18rem; overflow-wrap: anywhere; }
.detergent-action-cell { min-width: 9.5rem; }
.detergent-dialog-context { border: 1px solid #eaecf0; background: #fcfcfd; }
.detergent-actual-dialog { max-width: 42rem; }
.variance-positive { color: #b54708; }
.variance-negative { color: #067647; }
.complaint-surface { overflow: hidden; }
.complaint-toolbar { padding: 1rem; border-bottom: 1px solid #eaecf0; background: #fcfcfd; align-items: center; }
.complaint-camp-context { align-self: center; min-width: 0; overflow-wrap: anywhere; }
.complaint-toolbar-actions-cell { display: flex; align-items: center; }
.complaint-toolbar-actions { display: flex; width: 100%; align-items: center; gap: .375rem; }
.complaint-search-button { flex: 1 1 auto; min-width: 0; }
.complaint-table { width: 100%; }
.complaint-table .mud-table-cell { vertical-align: middle; }
.complaint-row { cursor: pointer; }
.complaint-row:hover { background: #f9fafb; }
.complaint-actions-heading { text-align: right; }
.complaint-actions-cell { width: 4rem; }
.complaint-actions { display: flex; justify-content: flex-end; align-items: center; }
.complaint-created { min-width: 9.5rem; white-space: nowrap; }
.complaint-error-content, .complaint-pagination, .complaint-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.complaint-pagination { padding: .75rem 1rem; border-top: 1px solid #eaecf0; background: #fcfcfd; }
.complaint-status { font-weight: 650; }
.complaint-status-open { color: #175cd3; border-color: #b2ddff; background: #eff8ff; }
.complaint-status-inreview { color: #854a0e; border-color: #fedf89; background: #fffaeb; }
.complaint-status-resolved { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.complaint-status-closed { color: #475467; border-color: #d0d5dd; background: #f9fafb; }
.complaint-create-dialog { max-width: 60rem; }
.complaint-detail-dialog { max-width: 66rem; }
.complaint-resolve-dialog { max-width: 52rem; }
.complaint-dialog-context, .complaint-detail-section { border: 1px solid #eaecf0; background: #fcfcfd; }
.complaint-text-section { height: 100%; }
.complaint-preserved-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-action-surface { border: 1px solid #b2ddff; background: #f5faff; }
.complaint-operational-actions { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .75rem; }
.complaint-assign-control { flex: 1 1 18rem; min-width: 14rem; }
.complaint-timeline { display: grid; gap: 0; }
.complaint-timeline-item { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .75rem; padding-bottom: 1.25rem; }
.complaint-timeline-item:last-child { padding-bottom: 0; }
.complaint-timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 1rem; top: 2rem; bottom: 0; width: 2px; background: #d0d5dd; }
.complaint-timeline-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: #175cd3; background: #eff8ff; border: 1px solid #b2ddff; font-size: .75rem; font-weight: 700; }
.complaint-timeline-content { min-width: 0; padding-top: .25rem; }
.complaint-timeline-arrow { padding: 0 .4rem; color: #667085; }
.order-surface { overflow: hidden; }
.order-toolbar { padding: 1rem; border-bottom: 1px solid #eaecf0; background: #fcfcfd; align-items: center; }
.order-toolbar-actions-cell { display: flex; align-items: center; }
.order-toolbar-actions { display: flex; width: 100%; align-items: center; gap: .375rem; }
.order-search-button { flex: 1 1 auto; min-width: 0; }
.order-table { width: 100%; }
.order-table .mud-table-cell { vertical-align: middle; }
.order-row { cursor: pointer; }
.order-row:hover { background: #f9fafb; }
.order-actions-heading { text-align: right; }
.order-actions-cell { width: 4rem; }
.order-actions { display: flex; justify-content: flex-end; align-items: center; }
.order-created { min-width: 9.5rem; white-space: nowrap; }
.order-error-content, .order-pagination, .order-detail-heading, .order-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.order-pagination { padding: .75rem 1rem; border-top: 1px solid #eaecf0; background: #fcfcfd; }
.order-status { font-weight: 650; }
.order-status-created, .order-status-verification { color: #175cd3; border-color: #b2ddff; background: #eff8ff; }
.order-status-readyforpickup, .order-status-verifiedreadyforpickup, .order-status-pickedup { color: #b54708; border-color: #fedf89; background: #fffaeb; }
.order-status-processing { color: #6941c6; border-color: #d9d6fe; background: #f4f3ff; }
.order-status-verificationhold, .order-status-cancelled { color: #b42318; border-color: #fecdca; background: #fef3f2; }
.order-status-completed { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.order-status-delivered, .order-status-closed { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.order-detail-dialog { max-width: 66rem; }
.order-verification-dialog { max-width: 70rem; }
.representative-transfer-dialog { max-width: 48rem; }
.order-dialog-context, .order-detail-section { border: 1px solid #eaecf0; background: #fcfcfd; }
.order-context-value { min-width: 0; overflow-wrap: anywhere; }
.order-detail-table, .order-verification-table { border: 1px solid #eaecf0; border-radius: 10px; overflow: hidden; }
.order-detail-table .mud-table-cell, .order-verification-table .mud-table-cell { vertical-align: middle; }
.order-action-surface { border: 1px solid #b2ddff; background: #f5faff; }
.order-operational-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.order-add-unexpected { display: flex; align-items: center; }
.order-review-summary { border: 1px solid #d0d5dd; background: #f9fafb; }
.order-review-exact { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.order-review-mismatch { color: #b54708; border-color: #fedf89; background: #fffaeb; }
.order-timeline { display: grid; gap: 0; }
.order-timeline-item { position: relative; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .75rem; padding-bottom: 1.25rem; }
.order-timeline-item:last-child { padding-bottom: 0; }
.order-timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 1rem; top: 2rem; bottom: 0; width: 2px; background: #d0d5dd; }
.order-timeline-marker { position: relative; z-index: 1; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: #175cd3; background: #eff8ff; border: 1px solid #b2ddff; font-size: .75rem; font-weight: 700; }

@media (min-width: 960px) {
    .complaint-filter-camp { flex-basis: 18.5%; max-width: 18.5%; }
    .complaint-filter-search { flex-basis: 34.5%; max-width: 34.5%; }
    .complaint-filter-status { flex-basis: 15%; max-width: 15%; }
    .complaint-filter-category { flex-basis: 19%; max-width: 19%; }
    .complaint-filter-actions { flex-basis: 13%; max-width: 13%; }
}
.supporting-state { min-height: 14rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; text-align: center; }
.supporting-error-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.analytics-toolbar-surface { padding: 1rem; }
.analytics-toolbar { align-items: center; }
.analytics-toolbar-action { display: flex; align-items: center; }
.analytics-toolbar-hint { display: block; margin-top: .75rem; }
.dashboard-overview-layout { display: grid; grid-template-columns: minmax(13rem, .34fr) minmax(0, 1.66fr); align-items: center; gap: 1rem; }
.dashboard-overview-title { min-width: 0; }
.dashboard-filter-surface { padding: .875rem; }
.dashboard-filter-toolbar { display: grid; grid-template-columns: minmax(15rem, 1.2fr) minmax(12rem, 1fr) minmax(10.5rem, .78fr) minmax(0, 1fr); grid-template-areas: "period camp auto actions"; align-items: center; gap: .625rem; }
.dashboard-period-control { display: flex; min-width: 0; align-items: center; gap: .25rem; }
.dashboard-period-control { grid-area: period; }
.dashboard-period-control .mud-input-control { flex: 1 1 auto; min-width: 0; }
.dashboard-camp-control { grid-area: camp; min-width: 0; }
.dashboard-camp-control .mud-input-control { width: 100%; }
.dashboard-refresh-actions { grid-area: actions; display: flex; width: 100%; min-width: 0; align-items: center; justify-content: flex-end; gap: .625rem; }
.dashboard-reload-control { display: flex; flex: 0 0 auto; min-width: 0; align-items: center; justify-content: flex-end; }
.dashboard-reload-control .mud-icon-button { width: 3.25rem; height: 3.25rem; border: 1px solid #d0d5dd; border-radius: 12px; }
.dashboard-reload-control .dashboard-manual-refresh { color: #344054; }
.dashboard-reload-control .dashboard-manual-refresh:hover, .dashboard-reload-control .dashboard-manual-refresh:focus-visible { color: #175cd3; border-color: #84adff; background: #eff8ff; }
.dashboard-refresh-control, .dashboard-refresh-status { display: flex; align-items: center; gap: .5rem; }
.dashboard-refresh-control { grid-area: auto; min-width: 0; color: #475467; }
.dashboard-refresh-control .mud-input-control { flex: 1 1 auto; min-width: 0; }
.dashboard-refresh-status { min-width: 0; min-height: 2rem; justify-content: flex-end; white-space: nowrap; }
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.dashboard-kpi { display: flex; height: 100%; min-height: 7rem; min-width: 0; flex-direction: column; padding: .875rem 1rem; }
.dashboard-kpi-action { cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-kpi-action:hover, .dashboard-kpi-action:focus-visible { transform: translateY(-2px); border-color: #84adff; box-shadow: 0 10px 20px rgba(16, 24, 40, .10); outline: none; }
.dashboard-kpi-heading { display: flex; min-height: 2rem; align-items: center; gap: .625rem; min-width: 0; }
.dashboard-kpi-icon { color: inherit; font-size: 1.25rem !important; }
.dashboard-kpi-icon-shell { display: grid; place-items: center; flex: 0 0 2rem; width: 2rem; height: 2rem; border-radius: 9px; color: #175cd3; background: #eff8ff; }
.dashboard-kpi-summary { display: flex; min-height: 2rem; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .5rem; }
.dashboard-kpi-summary .mud-typography-caption { line-height: 1.2; text-align: right; }
.dashboard-kpi-value { line-height: 1; }
.dashboard-kpi-waiting .dashboard-kpi-icon-shell { color: #b54708; background: #fffaeb; }
.dashboard-kpi-processing .dashboard-kpi-icon-shell { color: #6941c6; background: #f4f3ff; }
.dashboard-kpi-completed .dashboard-kpi-icon-shell { color: #067647; background: #ecfdf3; }
.dashboard-kpi-danger .dashboard-kpi-icon-shell { color: #b42318; background: #fef3f2; }
.dashboard-section { overflow: hidden; }
.dashboard-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dashboard-empty-state { min-height: 9rem; padding: 1.5rem; }
.dashboard-table-wrap { max-width: 100%; overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; }
.dashboard-table th, .dashboard-table td { padding: .75rem; border-bottom: 1px solid #dce3eb; text-align: left; vertical-align: top; }
.dashboard-table th { color: #475467; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.dashboard-table small { display: block; color: #667085; margin-top: .2rem; }
.dashboard-time, .report-time { white-space: nowrap; }
.dashboard-drilldown-context { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dashboard-back-button { flex: 0 0 auto; background: #fff; white-space: nowrap; }
.dashboard-back-button:hover, .dashboard-back-button:focus-visible { background: #fffcf0; }
.operational-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr); align-items: start; gap: .75rem; }
.operational-dashboard-lower-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(25rem, .65fr); gap: .75rem; }
.operational-dashboard-panel { padding: 1rem; }
.operational-dashboard-panel .dashboard-section-heading > .mud-icon-root { color: #475467; }
.operational-dashboard-panel .mud-button-root { color: #175cd3; }
.dashboard-compact-alert { margin: 0; }
.dashboard-action-list, .dashboard-status-list, .dashboard-order-list, .dashboard-detergent-list { display: grid; margin-top: .75rem; }
.dashboard-action-list { gap: .5rem; }
.dashboard-action-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto 1.25rem; align-items: center; gap: .625rem; min-width: 0; padding: .625rem .75rem; border: 1px solid #eaecf0; border-radius: 10px; color: #344054; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.dashboard-action-row:hover, .dashboard-action-row:focus-visible { border-color: #84adff; background: #eff8ff; outline: none; }
.dashboard-action-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: #f2f4f7; }
.dashboard-action-copy { display: grid; min-width: 0; }
.dashboard-action-copy strong { font-size: .875rem; }
.dashboard-action-copy small { overflow: hidden; color: #667085; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-action-count { min-width: 1.75rem; padding: .15rem .45rem; border-radius: 999px; background: #f2f4f7; text-align: center; font-size: .75rem; font-weight: 700; }
.dashboard-action-danger .dashboard-action-icon, .dashboard-action-danger .dashboard-action-count { color: #b42318; background: #fef3f2; }
.dashboard-action-warning .dashboard-action-icon, .dashboard-action-warning .dashboard-action-count { color: #b54708; background: #fffaeb; }
.dashboard-action-info .dashboard-action-icon, .dashboard-action-info .dashboard-action-count { color: #175cd3; background: #eff8ff; }
.dashboard-action-waiting .dashboard-action-icon, .dashboard-action-waiting .dashboard-action-count { color: #b54708; background: #fffaeb; }
.dashboard-action-processing .dashboard-action-icon, .dashboard-action-processing .dashboard-action-count { color: #6941c6; background: #f4f3ff; }
.dashboard-status-list { gap: 0; }
.dashboard-status-row { display: grid; grid-template-columns: .75rem minmax(0, 1fr) auto; align-items: center; gap: .625rem; width: 100%; min-width: 0; padding: .625rem .25rem; border: 0; border-bottom: 1px solid #eaecf0; background: transparent; color: #344054; font: inherit; text-align: left; cursor: pointer; }
.dashboard-status-row:last-child { border-bottom: 0; }
.dashboard-status-row:hover, .dashboard-status-row:focus-visible { color: #175cd3; background: #eff8ff; outline: none; }
.dashboard-status-row strong { font-size: 1rem; }
.dashboard-status-dot { width: .625rem; height: .625rem; border-radius: 50%; background: #98a2b3; }
.dashboard-status-pickup { background: #f79009; }
.dashboard-status-processing { background: #7f56d9; }
.dashboard-status-success { background: #12b76a; }
.dashboard-compact-empty { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 4.25rem; margin-top: .75rem; padding: .75rem; border: 1px dashed #d0d5dd; border-radius: 10px; color: #667085; text-align: center; }
.dashboard-compact-empty-success { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.dashboard-order-list { margin-top: .5rem; }
.dashboard-order-row { display: grid; grid-template-columns: minmax(13rem, 1.4fr) minmax(8rem, 1fr) auto auto; align-items: center; gap: .75rem; min-width: 0; padding: .625rem 0; border-bottom: 1px solid #eaecf0; }
.dashboard-order-row:last-child { border-bottom: 0; }
.dashboard-order-primary { display: grid; min-width: 0; }
.dashboard-order-primary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-order-primary small, .dashboard-detergent-row small { color: #667085; }
.dashboard-order-person { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-order-quantity { white-space: nowrap; }
.dashboard-detergent-list { margin-top: .5rem; }
.dashboard-detergent-row { display: grid; grid-template-columns: minmax(4rem, .7fr) repeat(3, minmax(5rem, 1fr)); align-items: center; gap: .75rem; padding: .625rem 0; border-bottom: 1px solid #eaecf0; }
.dashboard-detergent-row:last-child { border-bottom: 0; }
.dashboard-detergent-row > div { display: grid; min-width: 0; }
.dashboard-detergent-row strong { overflow-wrap: anywhere; }
.dashboard-compact-table-wrap { margin-top: .5rem; }
.dashboard-compact-table-wrap .dashboard-table th, .dashboard-compact-table-wrap .dashboard-table td { padding-top: .55rem; padding-bottom: .55rem; }
.report-mobile-selector { display: none; }
.report-tabs { max-width: 100%; min-width: 0; overflow: hidden; }
.report-tabs .mud-tabs-panels { min-width: 0; }
.report-table { min-width: 720px; }
.report-detergent-table { min-width: 1000px; }
.report-toolbar-actions { display: grid; grid-template-columns: minmax(8.25rem, 1fr) minmax(9.25rem, 1.15fr) auto; gap: .5rem; width: 100%; }
.report-reload-button, .report-export-button { min-width: 0; white-space: nowrap; }
.report-specific-toolbar { border-top: 1px solid #eaecf0; padding-top: 1rem; }
.report-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.report-completeness { min-width: 12rem; }
.report-completeness small { display: block; }
.report-empty-state { min-height: 11rem; }
.audit-surface { overflow: hidden; }
.audit-toolbar { padding: 1rem; border-bottom: 1px solid #eaecf0; background: #fcfcfd; align-items: center; }
.audit-toolbar-actions-cell { display: flex; align-items: center; }
.audit-toolbar-actions { display: flex; width: 100%; align-items: center; gap: .375rem; }
.audit-apply-button { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.audit-filter-popover { max-width: calc(100vw - 2rem); }
.audit-filter-list { overflow-x: hidden; }
.audit-filter-option { display: flex; width: 100%; min-width: 0; flex-direction: column; gap: .125rem; padding: .125rem 0; line-height: 1.3; }
.audit-filter-option-primary { color: #101828; font-size: .875rem; font-weight: 650; white-space: normal; overflow-wrap: anywhere; }
.audit-filter-option-secondary { color: #667085; font-size: .75rem; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.audit-camp-option-code { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-camp-option-name { overflow-wrap: break-word; word-break: normal; }
.audit-event-option-code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; word-break: normal; }
.audit-event-code-segment { white-space: nowrap; }
.mud-select-input > .audit-filter-option { display: flex; width: auto; min-width: 0; flex-direction: row; align-items: baseline; gap: 0; padding: 0; overflow: hidden; white-space: nowrap; line-height: inherit; }
.mud-select-input > .audit-filter-option .audit-filter-option-primary,
.mud-select-input > .audit-filter-option .audit-filter-option-secondary { display: block; color: inherit; font: inherit; white-space: nowrap; }
.mud-select-input > .audit-filter-option .audit-filter-option-primary { flex: 0 0 auto; }
.mud-select-input > .audit-filter-option .audit-filter-option-secondary { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.mud-select-input > .audit-filter-option .audit-filter-option-secondary::before { content: " · "; }
.mud-select-input > .audit-filter-option wbr { display: none; }
.audit-state { min-height: 14rem; }
.audit-table { width: 100%; }
.audit-table .mud-table-cell { vertical-align: middle; }
.audit-time { min-width: 11.5rem; white-space: nowrap; }
.audit-raw-value { overflow-wrap: anywhere; word-break: break-word; }
.audit-result { font-weight: 650; }
.audit-result-success { color: #067647; border-color: #abefc6; background: #ecfdf3; }
.audit-result-failure { color: #b42318; border-color: #fecdca; background: #fef3f2; }
.audit-actions-heading { text-align: right; }
.audit-actions-cell { width: 5rem; text-align: right; }
.audit-mobile-list { display: none; }
.audit-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; border-top: 1px solid #eaecf0; background: #fcfcfd; }
.audit-detail-dialog { max-width: 64rem; }
.audit-detail-grid { padding-top: .25rem; }
.audit-detail-raw { box-sizing: border-box; width: 100%; max-height: 26rem; margin-bottom: 0; padding: 1rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; border: 1px solid #eaecf0; border-radius: 8px; background: #fcfcfd; color: #344054; font: .8125rem/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }

@media (min-width: 1200px) {
    .audit-filter-camp { flex-basis: 28%; max-width: 28%; }
    .audit-filter-event { flex-basis: 44%; max-width: 44%; }
    .audit-filter-result { flex-basis: 28%; max-width: 28%; }
    .audit-filter-date { flex-basis: 28%; max-width: 28%; }
    .audit-filter-actions { flex-basis: 28%; max-width: 28%; }
}

@media (min-width: 1200px) {
    .report-filter-date { flex-basis: 19.5%; max-width: 19.5%; }
    .report-filter-camp { flex-basis: 23.5%; max-width: 23.5%; }
    .report-filter-actions { flex-basis: 37.5%; max-width: 37.5%; }
}

.foundation-card {
    width: 100%;
    border-radius: 16px;
}

.language-switcher {
    white-space: nowrap;
}

.loading-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.loading-mark {
    width: 48px;
    height: 48px;
    border: 5px solid #cad5e1;
    border-top-color: #12355b;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

#blazor-error-ui {
    background: #fff3cd;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.75rem 3rem 0.75rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 0.75rem;
    border: 0;
    background: transparent;
    cursor: pointer;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1599.98px) {
    .dashboard-overview-layout { grid-template-columns: 1fr; align-items: stretch; }
}

@media (max-width: 1279.98px) {
    .dashboard-filter-toolbar { grid-template-columns: minmax(13rem, 1fr) minmax(12rem, 1fr); grid-template-areas: "period camp" "auto actions"; }
    .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .operational-dashboard-grid { grid-template-columns: 1fr; }
    .operational-dashboard-lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .foundation-main {
        align-items: flex-start;
    }

    .language-switcher .mud-typography-caption {
        display: none;
    }

    .app-topbar { height: 64px !important; min-height: 64px !important; padding: 0 .75rem; }
    .app-main { padding-top: 64px; }
    .app-topbar-title { display: none; }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header > .mud-button-root { align-self: stretch; }
    .home-welcome-heading { align-items: flex-start; }
    .profile-section-heading { align-items: flex-start; }
    .profile-save-actions, .profile-security-actions { align-items: stretch; flex-direction: column; }
    .profile-save-actions > .mud-button-root, .profile-security-actions > .mud-button-root { width: 100%; }
    .laundry-item-toolbar { padding: .75rem; }
    .laundry-item-toolbar-actions { max-width: 16rem; }
    .laundry-item-actions { justify-content: flex-start; }
    .laundry-item-actions-cell { min-width: 0; }
    .master-toolbar { padding: .75rem; }
    .master-toolbar-actions { max-width: 16rem; }
    .master-actions { justify-content: flex-start; }
    .master-actions-cell { min-width: 0; }
    .user-detail-heading, .user-section-heading, .user-assignment-row { align-items: stretch; flex-direction: column; }
    .user-detail-actions { flex-direction: column; }
    .user-detail-actions > .mud-button-root { width: 100%; }
    .role-error-content, .role-permissions-heading, .role-editor-heading { align-items: flex-start; flex-direction: column; }
    .detergent-toolbar { padding: .75rem; }
    .detergent-content { padding: .75rem; }
    .complaint-toolbar { padding: .75rem; }
    .complaint-toolbar-actions { max-width: 16rem; }
    .complaint-error-content, .complaint-pagination, .complaint-detail-heading { align-items: flex-start; flex-direction: column; }
    .complaint-operational-actions { align-items: stretch; flex-direction: column; }
    .complaint-operational-actions > .mud-button-root, .complaint-assign-control { width: 100%; min-width: 0; }
    .complaint-detail-section, .complaint-action-surface { padding: .75rem !important; }
    .order-toolbar { padding: .75rem; }
    .order-toolbar-actions { max-width: 16rem; }
    .order-error-content, .order-pagination, .order-detail-heading, .order-section-heading { align-items: flex-start; flex-direction: column; }
    .order-operational-actions { align-items: stretch; flex-direction: column; }
    .order-operational-actions > .mud-button-root, .order-add-unexpected > .mud-button-root { width: 100%; }
    .order-detail-section, .order-action-surface { padding: .75rem !important; }
    .supporting-error-content, .dashboard-section-heading, .report-pagination { align-items: flex-start; flex-direction: column; }
    .dashboard-drilldown-context { align-items: stretch; flex-direction: column; }
    .dashboard-back-button { align-self: flex-start; }
    .audit-toolbar { padding: .75rem; }
    .audit-toolbar-actions { max-width: 18rem; }
    .audit-pagination { align-items: flex-start; flex-direction: column; }
    .analytics-toolbar-surface { padding: .75rem; }
    .dashboard-overview-layout { gap: 1rem; }
    .dashboard-filter-surface { padding: .75rem; }
    .dashboard-filter-toolbar { grid-template-columns: 1fr; grid-template-areas: "period" "camp" "auto" "actions"; }
    .dashboard-period-control, .dashboard-camp-control, .dashboard-refresh-actions, .dashboard-refresh-control { width: 100%; min-width: 0; flex-basis: auto; }
    .dashboard-refresh-control .mud-input-control { flex: 1; min-width: 0; }
    .dashboard-refresh-status { white-space: normal; }
    .dashboard-refresh-actions { justify-content: flex-end; }
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
    .dashboard-kpi-summary { align-items: flex-start; flex-direction: column; gap: .2rem; }
    .operational-dashboard-panel { padding: .875rem; }
    .dashboard-action-copy small { white-space: normal; }
    .dashboard-order-row { grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .75rem; }
    .dashboard-order-person { grid-column: 1; }
    .dashboard-order-row .mud-chip { grid-column: 2; grid-row: 1; justify-self: end; }
    .dashboard-order-quantity { grid-column: 2; grid-row: 2; justify-self: end; }
    .dashboard-detergent-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-mobile-selector { display: block; }
    .report-tabs .mud-tabs-tabbar { display: none; }
    .report-toolbar-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; }
    .dashboard-table, .dashboard-table tbody, .dashboard-table tr, .dashboard-table td { display: block; width: 100%; }
    .dashboard-table thead { display: none; }
    .dashboard-table tr { padding: .5rem 0; border-bottom: 1px solid #dce3eb; }
    .dashboard-table td { display: grid; grid-template-columns: minmax(7rem, 40%) 1fr; gap: .75rem; border: 0; padding: .35rem 0; overflow-wrap: anywhere; }
    .dashboard-table td::before { content: attr(data-label); color: #667085; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
    .report-table { min-width: 0; }
    .report-detergent-table { min-width: 0; }
}

@media (max-width: 959.98px) {
    .app-nav-toggle { display: inline-flex; }
    .app-drawer { --mud-drawer-width: min(87vw, 336px); max-width: 336px; }
    .detergent-table .mud-table-row { border: 1px solid #eaecf0; border-radius: 10px; margin-bottom: .75rem; background: #fff; }
    .detergent-table .mud-table-cell { align-items: start; padding-top: .5rem; padding-bottom: .5rem; }
    .detergent-table .mud-table-cell::before { min-width: 8rem; color: #667085; font-weight: 600; }
    .detergent-note, .detergent-action-cell, .detergent-unit { min-width: 0; max-width: none; }
    .detergent-variance { justify-content: flex-end; }
    .complaint-table .mud-table-row { border: 1px solid #eaecf0; border-radius: 10px; margin-bottom: .75rem; background: #fff; }
    .complaint-table .mud-table-cell { align-items: start; padding-top: .5rem; padding-bottom: .5rem; overflow-wrap: anywhere; }
    .complaint-table .mud-table-cell::before { min-width: 8.5rem; color: #667085; font-weight: 600; }
    .complaint-actions-cell, .complaint-created { min-width: 0; width: auto; white-space: normal; }
    .complaint-actions { justify-content: flex-start; }
    .order-table .mud-table-row, .order-detail-table .mud-table-row, .order-verification-table .mud-table-row { border: 1px solid #eaecf0; border-radius: 10px; margin-bottom: .75rem; background: #fff; }
    .order-table .mud-table-cell, .order-detail-table .mud-table-cell, .order-verification-table .mud-table-cell { align-items: start; padding-top: .5rem; padding-bottom: .5rem; overflow-wrap: anywhere; }
    .order-table .mud-table-cell::before, .order-detail-table .mud-table-cell::before, .order-verification-table .mud-table-cell::before { min-width: 8.5rem; color: #667085; font-weight: 600; }
    .order-actions-cell, .order-created { min-width: 0; width: auto; white-space: normal; }
    .order-actions { justify-content: flex-start; }
    .audit-desktop-table { display: none; }
    .audit-mobile-list { display: grid; gap: .75rem; padding: .75rem; }
    .audit-mobile-card { border: 1px solid #eaecf0; border-radius: 10px; background: #fff; }
    .audit-mobile-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
    .audit-mobile-heading > div { min-width: 0; }
    .audit-mobile-evidence { display: grid; gap: .5rem; }
    .audit-mobile-evidence > div { display: grid; grid-template-columns: minmax(7rem, 36%) minmax(0, 1fr); gap: .75rem; }
    .audit-mobile-evidence span { color: #667085; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
    .dashboard-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .operational-dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-mobile-heading { flex-direction: column; }
    .audit-mobile-evidence > div { grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr); }
}

/* Management analytics dashboard. Kept separate from the operational dashboard styles. */
.management-dashboard { min-width: 0; }
.management-dashboard-header { align-items: flex-end; }
.management-dashboard-header .mud-typography-h4 { line-height: 1.12; }
.management-dashboard-header .mud-typography-body2 { margin-top: .15rem; line-height: 1.3; }
.management-loading { min-height: 14rem; }
.management-filter-surface { padding: .75rem; }
.management-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(19rem, 1.25fr) minmax(14rem, .9fr) minmax(10rem, auto) auto;
    align-items: center;
    gap: .625rem;
}
.management-period-control { display: flex; min-width: 0; align-items: center; gap: .25rem; }
.management-period-control > .mud-input-control { min-width: 0; flex: 1 1 auto; }
.management-camp-control { min-width: 0; }
.management-updated { display: flex; min-width: 9rem; align-items: center; justify-content: flex-end; gap: .4rem; white-space: nowrap; }
.management-refresh-button { width: 3rem; height: 3rem; border: 1px solid #d0d5dd; border-radius: 10px; }
.management-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .625rem; }
.management-kpi {
    display: grid;
    min-width: 0;
    min-height: 7rem;
    grid-template-rows: auto 1fr auto;
    gap: .35rem;
    padding: .8rem;
    border: 1px solid #eaecf0;
    border-top: 3px solid #2563eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
.management-kpi-heading { display: flex; min-width: 0; min-height: 2rem; align-items: flex-start; gap: .45rem; color: #344054; font-size: .82rem; font-weight: 650; line-height: 1.2; }
.management-kpi-heading > span:last-child { overflow-wrap: anywhere; }
.management-kpi-icon { display: grid; width: 1.8rem; height: 1.8rem; flex: 0 0 auto; place-items: center; border-radius: 7px; background: #eff6ff; color: #1d4ed8; }
.management-kpi-icon .mud-icon-root { font-size: 1.1rem; }
.management-kpi > strong { align-self: end; color: #101828; font-size: 1.65rem; font-weight: 750; line-height: 1; }
.management-kpi > small { min-height: 1rem; color: #667085; font-size: .74rem; line-height: 1.2; }
.management-kpi.danger { border-top-color: #dc2626; }
.management-kpi.danger .management-kpi-icon { background: #fef2f2; color: #dc2626; }
.management-kpi.warning { border-top-color: #ea580c; }
.management-kpi.warning .management-kpi-icon { background: #fff7ed; color: #c2410c; }
.management-kpi.success { border-top-color: #059669; }
.management-kpi.success .management-kpi-icon { background: #ecfdf5; color: #047857; }
.management-kpi.unavailable { border-top-color: #98a2b3; }
.management-kpi.unavailable .management-kpi-icon { background: #f2f4f7; color: #667085; }
.management-kpi.unavailable > small { justify-self: start; min-height: 0; padding: .18rem .42rem; border-radius: 999px; background: #f2f4f7; color: #475467; }
.management-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.management-chart-card { min-width: 0; padding: .9rem; overflow: hidden; }
.management-section-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.management-section-heading > div { min-width: 0; }
.management-chart-canvas { min-width: 0; height: 16.25rem; margin-top: .5rem; overflow: hidden; }
.management-chart-canvas .mud-chart { max-width: 100%; }
.management-chart-canvas .mud-charts-xaxis text:not(:nth-of-type(5n + 1)):not(:last-of-type) { visibility: hidden; }
.management-chart-empty { display: flex; min-height: 11rem; align-items: center; justify-content: center; gap: .6rem; color: #667085; text-align: center; }
.management-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; align-items: start; }
.management-summary-card { min-width: 0; padding: .9rem; }
.management-status-list { display: grid; margin-top: .65rem; }
.management-status-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid #eaecf0; }
.management-status-list > div:first-child { border-top: 0; }
.management-status-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #2563eb; }
.management-status-dot.waiting { background: #f97316; }
.management-status-dot.processing { background: #7c3aed; }
.management-status-dot.success { background: #10b981; }
.management-status-dot.danger { background: #dc2626; }
.management-status-dot.muted { background: #98a2b3; }
.management-bottleneck-highlight { display: grid; gap: .15rem; margin-top: .65rem; padding: .7rem; border-radius: 10px; background: #f8fafc; }
.management-bottleneck-highlight small { color: #667085; }
.management-bottleneck-highlight strong { color: #101828; font-size: 1.1rem; }
.management-bottleneck-highlight span { color: #475467; }
.management-mini-bars { display: grid; margin-top: .4rem; }
.management-mini-bars > div { display: flex; justify-content: space-between; gap: 1rem; padding: .38rem .15rem; border-top: 1px solid #eaecf0; }
.management-alert-list { display: grid; gap: .45rem; margin-top: .65rem; }
.management-alert-list > div { display: flex; align-items: flex-start; gap: .5rem; padding: .58rem; border-radius: 9px; background: #f8fafc; color: #475467; }
.management-alert-list .mud-icon-root { flex: 0 0 auto; font-size: 1.2rem; }
.management-alert-list .danger { background: #fef2f2; color: #b42318; }
.management-alert-list .warning { background: #fff7ed; color: #c2410c; }
.management-alert-list .success { background: #ecfdf5; color: #047857; }
.management-wide-section { min-width: 0; padding: .9rem; }
.management-table-wrap { width: 100%; margin-top: .65rem; overflow-x: auto; }
.management-table { width: 100%; border-collapse: collapse; }
.management-table th, .management-table td { padding: .55rem .65rem; border-bottom: 1px solid #eaecf0; text-align: left; vertical-align: middle; }
.management-table th { color: #475467; font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; }
.management-table td:first-child { display: grid; gap: .15rem; }
.management-table td small { color: #667085; }
.management-detergent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .65rem; margin-top: .65rem; }
.management-detergent-grid > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .65rem; padding: .7rem; border: 1px solid #eaecf0; border-radius: 10px; background: #fcfcfd; }
.management-detergent-grid > div > span { grid-column: 1 / -1; color: #344054; font-weight: 700; }
.management-detergent-grid small { color: #667085; }
.management-detergent-grid strong { text-align: right; }

@media (max-width: 1199.98px) {
    .management-filter-toolbar { grid-template-columns: minmax(17rem, 1.2fr) minmax(13rem, .8fr) auto auto; }
    .management-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1099.98px) {
    .management-filter-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .management-updated { justify-content: flex-start; }
    .management-refresh-button { justify-self: end; }
    .management-summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767.98px) {
    .management-filter-toolbar { grid-template-columns: 1fr; }
    .management-period-control, .management-camp-control, .management-updated { width: 100%; min-width: 0; }
    .management-refresh-button { justify-self: stretch; width: 100%; }
    .management-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .management-chart-grid { grid-template-columns: 1fr; }
    .management-chart-card, .management-summary-card, .management-wide-section { padding: .875rem; }
    .management-table, .management-table tbody, .management-table tr, .management-table td { display: block; width: 100%; }
    .management-table thead { display: none; }
    .management-table tr { padding: .45rem 0; border-bottom: 1px solid #eaecf0; }
    .management-table td { display: grid; grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr); gap: .7rem; border: 0; padding: .35rem 0; overflow-wrap: anywhere; }
    .management-table td::before { content: attr(data-label); color: #667085; font-size: .72rem; font-weight: 650; text-transform: uppercase; }
    .management-table td:first-child { display: grid; grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr); }
}

@media (max-width: 479.98px) {
    .management-kpi-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Executive Pro Dashboard (1-Screen Cockpit)
   ========================================================================== */
.app-content:has(.management-pro-container) {
    padding: 0.4rem 0.75rem !important;
}

.management-pro-container {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

@media (min-width: 1200px) {
    .management-pro-container {
        max-height: calc(100vh - 85px);
    }
}

.management-pro-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.management-pro-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.management-pro-title-wrap .mud-typography-h5 {
    font-weight: 750;
    letter-spacing: -0.01em;
    color: #0f172a;
    font-size: 1.1rem;
}

.management-pro-badge {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #f8fafc;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    text-transform: uppercase;
}

.management-pro-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.management-pro-datepicker {
    width: 185px !important;
    max-width: 195px !important;
}

.management-pro-datepicker .mud-input {
    font-size: 0.75rem !important;
}

.management-pro-datepicker input {
    font-size: 0.75rem !important;
    padding: 4px 6px !important;
    letter-spacing: -0.01em;
}

.management-pro-datepicker .mud-icon-root {
    font-size: 0.95rem !important;
}

.management-pro-presets {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 0.15rem;
    border-radius: 6px;
    gap: 0.1rem;
}

.management-pro-preset-btn {
    padding: 0.18rem 0.45rem;
    font-size: 0.71rem;
    font-weight: 600;
    color: #475467;
    border-radius: 5px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.management-pro-preset-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}

.management-pro-preset-btn.active {
    background: #ffffff;
    color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.management-pro-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
}

.management-pro-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 4.4rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.management-pro-kpi-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #94a3b8;
}

.management-pro-kpi-card.blue::before { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.management-pro-kpi-card.cyan::before { background: linear-gradient(90deg, #0284c7, #06b6d4); }
.management-pro-kpi-card.green::before { background: linear-gradient(90deg, #059669, #10b981); }
.management-pro-kpi-card.amber::before { background: linear-gradient(90deg, #d97706, #f59e0b); }
.management-pro-kpi-card.purple::before { background: linear-gradient(90deg, #7c3aed, #a855f7); }

.management-pro-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
}

.management-pro-kpi-label {
    font-size: 0.67rem;
    font-weight: 650;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.management-pro-kpi-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
    margin: 0.08rem 0;
}

.management-pro-kpi-sub {
    font-size: 0.67rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.management-pro-body-grid {
    display: grid;
    grid-template-columns: 4.8fr 7.2fr;
    gap: 0.45rem;
    align-items: stretch;
}

.management-pro-col {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.management-pro-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
    display: flex;
    flex-direction: column;
}

.management-pro-col:first-child .management-pro-panel {
    height: 100%;
}

.management-pro-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.management-pro-panel-title {
    font-size: 0.8rem;
    font-weight: 750;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.management-pro-pipeline-step {
    display: grid;
    grid-template-columns: 1.75rem 1fr auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.55rem;
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    margin-bottom: 0.3rem;
}

.management-pro-step-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 5px;
    display: grid;
    place-items: center;
}

.management-pro-step-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.management-pro-step-name {
    font-size: 0.8rem;
    font-weight: 650;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.management-pro-step-count {
    font-size: 0.95rem;
    font-weight: 750;
    color: #0f172a;
    text-align: right;
    min-width: 2rem;
}

.management-pro-bottleneck-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.35rem 0.6rem;
    border-radius: 7px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    margin-top: 0.25rem;
}

.management-pro-bottleneck-card .mud-icon-root {
    color: #d97706;
}

.management-pro-scorecard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
}

.management-pro-scorecard-scroll {
    width: 100%;
    overflow-x: auto;
}

.management-pro-scorecard-table th {
    text-align: left;
    padding: 0.25rem 0.35rem;
    color: #64748b;
    font-weight: 650;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.67rem;
    text-transform: uppercase;
}

.management-pro-scorecard-table td {
    padding: 0.3rem 0.35rem;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

.management-pro-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
}

.management-pro-status-badge.success {
    background: #ecfdf5;
    color: #065f46;
}

.management-pro-status-badge.warning {
    background: #fffbeb;
    color: #92400e;
}

.management-pro-chart-wrap {
    height: 170px !important;
    width: 100%;
}

/* Order volume trend: plain HTML bars so the chart fills the panel and labels stay readable. */
.trend-chart { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem; height: 100%; padding-top: 0.4rem; }
.trend-y { position: relative; min-width: 1.1rem; margin-bottom: 1.35rem; font-size: 0.68rem; color: #94a3b8; line-height: 1; }
.trend-y span { position: absolute; right: 0; transform: translateY(-50%); }
.trend-plot { position: relative; display: flex; flex-direction: column; min-width: 0; }
.trend-grid { position: absolute; inset: 0 0 1.35rem 0; border-top: 1px dashed #e2e8f0; border-bottom: 1px solid #cbd5e1; pointer-events: none; }
.trend-grid.with-mid { background: linear-gradient(to bottom, transparent calc(50% - 0.5px), #eef2f7 calc(50% - 0.5px), #eef2f7 calc(50% + 0.5px), transparent calc(50% + 0.5px)); }
.trend-bars { position: relative; flex: 1; display: flex; align-items: flex-end; gap: 2px; }
.trend-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; border-radius: 3px 3px 0 0; }
.trend-col:hover { background: #f1f5f9; }
.trend-bar { display: block; width: 72%; max-width: 26px; background: #2563eb; border-radius: 3px 3px 0 0; }
.trend-col:hover .trend-bar { background: #1d4ed8; }
.trend-value { font-size: 0.68rem; font-weight: 700; color: #334155; margin-bottom: 2px; }
.trend-x { position: relative; height: 1.35rem; }
.trend-x span { position: absolute; top: 0.3rem; transform: translateX(-50%); font-size: 0.7rem; color: #64748b; white-space: nowrap; }
.trend-x span:first-child { transform: translateX(-30%); }
.trend-x span:last-child { transform: translateX(-70%); }
@media (max-width: 520px) { .trend-x span.minor { display: none; } .trend-bars { gap: 1px; } }

.management-pro-insights-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.management-pro-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    background: #f8fafc;
    font-size: 0.75rem;
    color: #334155;
}

.management-pro-insight-item.positive {
    background: #ecfdf5;
    color: #065f46;
}

.management-pro-insight-item.caution {
    background: #fffbeb;
    color: #92400e;
}

@media (max-width: 1099.98px) {
    .management-pro-body-grid {
        grid-template-columns: 1fr;
    }
    .management-pro-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640.98px) {
    .management-pro-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .management-pro-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==========================================================================
   Operational Dashboard (1-Screen Command Center Cockpit)
   ========================================================================== */
.app-content:has(.operational-dashboard-container) {
    padding: 0.35rem 0.65rem !important;
}

.operational-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

@media (min-width: 1200px) {
    .operational-dashboard-container {
        height: calc(100vh - 78px);
        max-height: calc(100vh - 78px);
        overflow: hidden;
    }
}

/* Header */
.ops-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
    flex-shrink: 0;
}

.ops-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ops-title-text {
    font-weight: 750 !important;
    font-size: 1.05rem !important;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.ops-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
}

.ops-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: opsPulse 1.8s infinite;
}

@keyframes opsPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ops-presets {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
    margin-left: 0.25rem;
}

.ops-preset-btn {
    border: none;
    background: transparent;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475467;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ops-preset-btn:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.ops-preset-btn.active {
    color: #175cd3;
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.ops-controls-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.ops-camp-select {
    min-width: 120px;
    max-width: 155px;
}

.ops-datepicker {
    min-width: 195px;
    max-width: 225px;
}

.ops-autorefresh-select {
    min-width: 110px;
    max-width: 130px;
}

.ops-camp-select .mud-input,
.ops-datepicker .mud-input,
.ops-autorefresh-select .mud-input {
    font-size: 0.78rem;
    height: 32px;
}

.ops-datepicker input {
    font-size: 0.72rem !important;
    padding: 2px 3px !important;
}

.ops-refresh-status-wrap {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.2rem;
}

.ops-refresh-time {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ops-manual-refresh-btn {
    border: 1px solid #d0d5dd !important;
    border-radius: 6px;
    padding: 4px !important;
}

.ops-manual-refresh-btn:hover {
    background: #eff8ff !important;
    border-color: #84adff !important;
}

.ops-partial-data-alert,
.management-pro-stale-alert {
    margin: 0;
    min-height: 2rem;
    font-size: 0.75rem;
}

.ops-pipe-step:disabled,
.ops-pipe-side-stat:disabled,
.ops-breakdown-row:disabled,
.ops-card-disabled {
    cursor: default;
}

.ops-pipe-step:disabled:hover,
.ops-pipe-side-stat:disabled:hover,
.ops-breakdown-row:disabled:hover,
.ops-card-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Loading & Empty States */
.ops-loading-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Pipeline Ribbon */
.ops-pipeline-ribbon {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.65rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
    min-height: 58px;
    flex-shrink: 0;
}

.ops-pipe-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.ops-pipe-step:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.ops-pipe-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475467;
    font-size: 0.72rem;
    font-weight: 750;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ops-pipe-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.ops-pipe-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ops-pipe-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.ops-pipe-sub {
    font-size: 0.65rem;
    color: #94a3b8;
    white-space: nowrap;
}

.ops-pipe-step.highlight-waiting {
    background: #fffbeb !important;
    border-color: #fde68a !important;
}
.ops-pipe-num.num-waiting {
    background: #d97706 !important;
    color: #ffffff !important;
}
.ops-pipe-val.val-waiting {
    color: #b45309 !important;
}

.ops-pipe-step.highlight-processing {
    background: #f5f3ff !important;
    border-color: #ddd6fe !important;
}
.ops-pipe-num.num-processing {
    background: #7c3aed !important;
    color: #ffffff !important;
}
.ops-pipe-val.val-processing {
    color: #6d28d9 !important;
}

.ops-pipe-step.highlight-success {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.ops-pipe-num.num-success {
    background: #059669 !important;
    color: #ffffff !important;
}
.ops-pipe-val.val-success {
    color: #047857 !important;
}

.ops-pipe-num.num-delivered {
    background: #0f766e !important;
    color: #ffffff !important;
}

.ops-pipe-val.val-delivered {
    color: #0f766e !important;
}

.ops-pipe-arrow {
    color: #cbd5e1;
    flex-shrink: 0;
    font-size: 1.1rem !important;
}

.ops-pipe-divider {
    width: 1px;
    height: 32px;
    background: #e2e8f0;
    margin: 0 0.35rem;
    flex-shrink: 0;
}

.ops-pipe-side-stat {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.ops-pipe-side-stat:hover {
    background: #f1f5f9;
}

.ops-pipe-side-stat.side-danger {
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

.ops-pipe-side-icon {
    color: #64748b;
}

.ops-pipe-side-icon.danger {
    color: #dc2626 !important;
}

.ops-pipe-val.val-danger {
    color: #dc2626 !important;
}

/* 3-Column Cockpit Grid */
.ops-cockpit-grid {
    display: grid;
    grid-template-columns: 275px minmax(0, 1fr) 290px;
    gap: 0.45rem;
    flex: 1;
    min-height: 0;
}

@media (max-width: 1199.98px) {
    .ops-cockpit-grid {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

.ops-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 0;
    height: 100%;
}

.ops-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ops-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
    flex-shrink: 0;
    min-height: 34px;
}

.ops-card-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 750;
    color: #0f172a;
}

.ops-badge-count {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
}

.ops-badge-amber { background: #fef3c7; color: #92400e; }
.ops-badge-blue { background: #e0f2fe; color: #0369a1; }
.ops-badge-red { background: #fee2e2; color: #b91c1c; }

.ops-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0.4rem 0.55rem;
}

.ops-scroll-area::-webkit-scrollbar { width: 5px; height: 5px; }
.ops-scroll-area::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.ops-scroll-area::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Column 1: Action Center & Breakdown */
.ops-card-urgent {
    flex: 1.1;
    min-height: 0;
}

.ops-card-breakdown {
    flex: 0.9;
    min-height: 0;
}

.ops-card-breakdown .ops-card-content {
    padding: 0.45rem 0.6rem;
}

.ops-all-clear {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    color: #166534;
}

.ops-all-clear div strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
}

.ops-all-clear div small {
    display: block;
    font-size: 0.68rem;
    color: #15803d;
}

.ops-action-items {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ops-action-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.12s ease;
}

.ops-action-row:hover {
    transform: translateX(2px);
}

.ops-action-danger {
    background: #fef2f2;
    border-color: #fee2e2;
    color: #991b1b;
}

.ops-action-warning {
    background: #fffbeb;
    border-color: #fef3c7;
    color: #92400e;
}

.ops-action-waiting {
    background: #fff7ed;
    border-color: #ffedd5;
    color: #9a3412;
}

.ops-action-processing {
    background: #f5f3ff;
    border-color: #ede9fe;
    color: #5b21b6;
}

.ops-action-icon-wrap {
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.ops-action-body {
    flex: 1;
    min-width: 0;
}

.ops-action-title {
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.ops-action-sub {
    font-size: 0.68rem;
    opacity: 0.85;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.ops-action-qty {
    font-size: 0.82rem;
    font-weight: 800;
    margin-left: auto;
    padding-right: 0.2rem;
}

.ops-action-arrow {
    opacity: 0.5;
    flex-shrink: 0;
}

.ops-progress-bar-track {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #e2e8f0;
    margin-bottom: 0.4rem;
}

.ops-progress-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.ops-progress-segment.seg-waiting { background: #f59e0b; }
.ops-progress-segment.seg-processing { background: #8b5cf6; }
.ops-progress-segment.seg-completed { background: #10b981; }

.ops-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ops-breakdown-row {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.4rem;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    transition: background 0.12s ease;
    font-size: 0.74rem;
}

.ops-breakdown-row:hover {
    background: #f8fafc;
}

.ops-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 0.4rem;
    flex-shrink: 0;
}

.ops-dot.dot-neutral { background: #64748b; }
.ops-dot.dot-waiting { background: #f59e0b; }
.ops-dot.dot-processing { background: #8b5cf6; }
.ops-dot.dot-completed { background: #10b981; }
.ops-dot.dot-delivered { background: #0f766e; }

.ops-breakdown-label {
    flex: 1;
    text-align: left;
    color: #475467;
}

.ops-breakdown-num {
    font-weight: 750;
    color: #0f172a;
}

/* Column 2: Live Feed */
.ops-feed-card {
    height: 100%;
}

.ops-feed-header {
    gap: 0.25rem;
    padding: 0.35rem 0.45rem !important;
}

.ops-feed-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.ops-feed-title {
    font-size: 0.76rem;
    font-weight: 750;
    color: #0f172a;
    white-space: nowrap;
}

.ops-feed-filters {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 5px;
    padding: 1px;
    gap: 1px;
    flex-shrink: 0;
}

.ops-feed-filter-btn {
    border: none;
    background: transparent;
    padding: 0.1rem 0.35rem;
    font-size: 0.66rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s ease;
}

.ops-feed-filter-btn:hover {
    color: #0f172a;
}

.ops-feed-filter-btn.active {
    color: #175cd3;
    background: #ffffff;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.ops-view-all-btn {
    font-size: 0.7rem !important;
    padding: 2px 4px !important;
    text-transform: none !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: auto !important;
}

.ops-view-all-btn .mud-button-label {
    white-space: nowrap !important;
}

.ops-feed-loading, .ops-feed-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    font-size: 0.76rem;
    padding: 1.5rem;
}

.ops-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ops-order-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    cursor: pointer;
    transition: all 0.14s ease;
}

.ops-order-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 2px 5px rgba(16, 24, 40, 0.05);
    transform: translateY(-1px);
}

.ops-order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.ops-order-id-group {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.ops-order-num {
    font-size: 0.78rem;
    font-weight: 750;
    color: #175cd3;
}

.ops-order-location {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
}

.ops-status-chip {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.ops-status-pickedup { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ops-status-processing { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.ops-status-completed { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.ops-status-verificationhold { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.ops-status-submitted { background: #f8fafc; color: #475467; border: 1px solid #e2e8f0; }
.ops-status-draft { background: #f8fafc; color: #64748b; border: 1px solid #cbd5e1; }

.ops-order-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #475467;
}

.ops-order-rep {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.ops-rep-icon {
    font-size: 0.85rem !important;
    color: #94a3b8;
}

.ops-order-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.ops-order-qty {
    font-weight: 700;
    color: #0f172a;
}

.ops-order-date {
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

/* Column 3: Detergent & Issues */
.ops-card-detergent {
    flex: 0.95;
    min-height: 0;
}

.ops-card-complaints {
    flex: 1.05;
    min-height: 0;
}

.ops-detergent-body {
    padding: 0.4rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.ops-warning-banner {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 5px;
    padding: 0.25rem 0.45rem;
    font-size: 0.68rem;
    color: #92400e;
    line-height: 1.2;
}

.ops-detergent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}

.ops-detergent-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
}

.ops-det-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.75rem;
    font-weight: 750;
    color: #0f172a;
    margin-bottom: 0.25rem;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 0.15rem;
}

.ops-det-uom {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: normal;
}

.ops-det-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ops-det-col {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #475467;
}

.ops-det-col strong {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.ops-var-badge {
    font-size: 0.68rem;
    font-weight: 750;
    padding: 0.08rem 0.3rem;
    border-radius: 3px;
    font-variant-numeric: tabular-nums;
}

.ops-var-pos { background: #fef3c7; color: #92400e; }
.ops-var-neg { background: #fee2e2; color: #b91c1c; }
.ops-var-zero { background: #f1f5f9; color: #475467; }

.ops-complaint-clear {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    color: #166534;
}

.ops-complaint-clear div strong {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
}

.ops-complaint-clear div small {
    display: block;
    font-size: 0.68rem;
    color: #15803d;
}

.ops-complaint-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ops-complaint-row {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    transition: all 0.12s ease;
}

.ops-complaint-row:hover {
    border-color: #fca5a5;
    background: #fffdfd;
}

.ops-complaint-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.15rem;
}

.ops-complaint-num {
    font-size: 0.76rem;
    font-weight: 750;
    color: #dc2626;
}

.ops-complaint-mid {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #1e293b;
    margin-bottom: 0.15rem;
    font-weight: 600;
}

.ops-complaint-loc {
    color: #64748b;
    font-size: 0.68rem;
}

.ops-complaint-bot {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #94a3b8;
}

.ops-empty-compact {
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    padding: 0.75rem;
}

@media (max-width: 899.98px) {
    .ops-header {
        align-items: stretch;
    }

    .ops-title-group,
    .ops-controls-group {
        width: 100%;
    }

    .ops-controls-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    }

    .ops-camp-select,
    .ops-datepicker,
    .ops-autorefresh-select {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .ops-refresh-status-wrap {
        margin-left: 0;
        justify-content: flex-end;
    }

    .ops-pipeline-ribbon {
        overflow-x: auto;
    }

    .ops-pipe-step {
        min-width: 8.5rem;
    }
}

@media (max-width: 640.98px) {
    .ops-controls-group {
        grid-template-columns: 1fr;
    }

    .management-pro-controls,
    .management-pro-presets {
        width: 100%;
    }

    .management-pro-controls > *,
    .management-pro-datepicker {
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    .management-pro-scorecard-table {
        min-width: 36rem;
    }
}

/* ---- Executive dashboard: clickable KPI + insight side panel ---- */
.management-pro-kpi-card.clickable { cursor: pointer; }
.management-pro-kpi-card.clickable:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08); }
.management-pro-kpi-card.clickable:focus-visible { outline: 2px solid #7c7134; outline-offset: 2px; }

.insight-backdrop {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.38); z-index: 1300;
    animation: insight-fade 0.15s ease-out;
}
.insight-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 1301;
    background: #f8fafc; display: flex; flex-direction: column;
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.18); animation: insight-slide 0.2s ease-out; outline: none;
}
@keyframes insight-slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes insight-fade { from { opacity: 0; } to { opacity: 1; } }
.insight-panel-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.1rem 0.8rem; background: #ffffff; border-bottom: 1px solid #e2e8f0;
}
.insight-eyebrow { margin: 0; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7c7134; }
.insight-panel-head h2 { margin: 0.1rem 0 0; font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.insight-panel-body { flex: 1; overflow-y: auto; padding: 0.9rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.insight-panel-foot { padding: 0.6rem 1.1rem; background: #ffffff; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; }

.insight-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
.insight-stats > div { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 0.45rem 0.5rem; display: flex; flex-direction: column; }
.insight-stats strong { font-size: 1.15rem; color: #0f172a; line-height: 1.2; }
.insight-stats span { font-size: 0.68rem; color: #64748b; line-height: 1.2; }
.insight-stats > div.warn strong { color: #b45309; }
@media (max-width: 520px) { .insight-stats { grid-template-columns: repeat(3, 1fr); } }

.insight-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.insight-chip { font-size: 0.75rem; background: #f1efe1; color: #4a4420; border-radius: 999px; padding: 0.15rem 0.6rem; }
.insight-chip b { margin-left: 0.25rem; }
.insight-note { margin: 0; font-size: 0.75rem; color: #64748b; display: flex; align-items: center; gap: 0.3rem; }
.insight-empty { display: flex; align-items: center; gap: 0.5rem; padding: 1rem; background: #ecfdf5; border-radius: 8px; color: #065f46; font-size: 0.85rem; }

.insight-item { background: #ffffff; border: 1px solid #e2e8f0; border-left: 3px solid #f59e0b; border-radius: 8px; padding: 0.65rem 0.75rem; display: flex; flex-direction: column; gap: 0.3rem; }
.insight-item.late { border-left-color: #dc2626; }
.insight-item-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.insight-number { font-size: 0.72rem; font-weight: 600; color: #475569; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.insight-status { font-size: 0.68rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.5rem; }
.insight-status.open { background: #fef3c7; color: #92400e; }
.insight-status.review { background: #e0e7ff; color: #3730a3; }
.insight-item-title { font-weight: 700; color: #0f172a; font-size: 0.92rem; }
.insight-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; font-size: 0.78rem; color: #334155; }
.insight-desc { margin: 0; font-size: 0.8rem; color: #475569; font-style: italic; }
.insight-facts { display: flex; flex-wrap: wrap; gap: 0.2rem 0.75rem; font-size: 0.74rem; color: #64748b; }
.insight-facts .late { color: #dc2626; font-weight: 700; }
.insight-repeat {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 0.3rem; border: 0; cursor: pointer;
    background: #fef2f2; color: #b91c1c; font-size: 0.74rem; font-weight: 600; border-radius: 6px; padding: 0.2rem 0.5rem;
}
.insight-history { margin: 0; padding: 0.4rem 0 0 0.9rem; font-size: 0.76rem; color: #334155; display: flex; flex-direction: column; gap: 0.3rem; }
.insight-resolution { color: #64748b; }
.insight-sub { margin: 0.15rem 0 0; font-size: 0.74rem; color: #64748b; }
.insight-empty.neutral { background: #f1f5f9; color: #334155; }
.insight-section { display: flex; flex-direction: column; gap: 0.45rem; }
.insight-section h3 { margin: 0.2rem 0 0; font-size: 0.8rem; font-weight: 700; color: #334155; text-transform: uppercase; letter-spacing: 0.04em; }
.insight-stage { display: grid; grid-template-columns: 11rem 1fr 4.5rem; align-items: center; gap: 0.6rem; font-size: 0.8rem; color: #334155; }
.insight-stage-label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.insight-stage-bar { height: 0.55rem; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.insight-stage-bar span { display: block; height: 100%; background: #0ea5e9; border-radius: 999px; }
.insight-stage.bottleneck .insight-stage-bar span { background: #f59e0b; }
.insight-stage.outside { color: #94a3b8; }
.insight-stage.outside .insight-stage-bar span { background: #cbd5e1; }
.insight-stage-value { text-align: right; font-weight: 700; }
.insight-tag { font-size: 0.64rem; font-weight: 700; background: #fef3c7; color: #92400e; border-radius: 999px; padding: 0.05rem 0.4rem; }
.insight-tag.muted { background: #f1f5f9; color: #64748b; }
.insight-item.compact { gap: 0.2rem; padding: 0.5rem 0.7rem; border-left-color: #0ea5e9; }
.insight-item.compact.running { border-left-color: #0ea5e9; }
.insight-item.compact.late { border-left-color: #dc2626; }
.insight-duration { font-weight: 700; color: #0f172a; font-size: 0.85rem; }
.late-text { color: #dc2626; font-weight: 700; }
@media (max-width: 520px) { .insight-stage { grid-template-columns: 1fr 4rem; } .insight-stage-bar { grid-column: 1 / -1; grid-row: 2; } }

/* Verification / throughput / detergent insight panels */
.insight-stage.wide { grid-template-columns: 7.5rem 1fr 8.5rem; }
.insight-stage.peak .insight-stage-bar span { background: #2563eb; }
.insight-stage.wide .insight-stage-value { font-weight: 600; font-size: 0.76rem; }
.insight-days { display: flex; flex-direction: column; gap: 0.35rem; max-height: 22rem; overflow-y: auto; padding-right: 0.2rem; }
.insight-rank { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; font-size: 0.82rem; color: #0f172a; padding: 0.35rem 0; border-bottom: 1px dashed #e2e8f0; }
.insight-rank small { color: #94a3b8; font-size: 0.7rem; margin-left: 0.3rem; }
.insight-rank-value { color: #475569; font-size: 0.76rem; white-space: nowrap; font-weight: 600; }
.insight-note.up { color: #047857; font-weight: 600; }
.insight-note.down { color: #b45309; font-weight: 600; }
.insight-uom { border-left-color: #7c3aed; }
.insight-uom .insight-number { font-size: 0.85rem; color: #0f172a; font-family: inherit; font-weight: 700; }
.insight-variance { font-size: 0.75rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.5rem; white-space: nowrap; }
.insight-variance.ok { background: #ecfdf5; color: #047857; }
.insight-variance.over { background: #fee2e2; color: #b91c1c; }
.insight-variance.under { background: #fef3c7; color: #92400e; }
.insight-variance.muted { background: #f1f5f9; color: #64748b; }
@media (max-width: 520px) { .insight-stage.wide { grid-template-columns: 1fr 8rem; } }
.insight-item.compact.insight-uom { border-left-color: #7c3aed; }
.insight-day-title { font-size: 0.82rem; font-weight: 700; color: #0f172a; }
