html, body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #17212b;
    max-width: 100%;
    overflow-x: hidden;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --er-red: #e32636;
    --er-red-dark: #b61827;
    --er-navy: #17212b;
    --er-blue: #285b82;
    --er-border: #d8dee5;
    --er-surface: #ffffff;
    --er-muted: #647383;
}

h1, h2, h3 { color: var(--er-navy); letter-spacing: -.025em; }
h1 { font-weight: 750; }

.eyebrow {
    color: var(--er-red-dark);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .13em;
    margin: 0 0 .35rem;
    text-transform: uppercase;
}

.page-heading, .editor-heading {
    align-items: flex-start;
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin: .6rem 0 1.5rem;
    max-width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.page-heading.compact h1, .editor-heading h1 { margin-bottom: .25rem; }
.page-heading p, .editor-heading p { color: var(--er-muted); margin-bottom: 0; }
.scope-badge, .coming-soon {
    background: #e8eef3;
    border-radius: 999px;
    color: #38536b;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    padding: .55rem .8rem;
    white-space: nowrap;
}

.safety-notice { border: 0; border-left: 4px solid #d29a00; }
.dashboard-grid, .placeholder-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
    align-items: flex-start;
    background: var(--er-surface);
    border: 1px solid var(--er-border);
    border-radius: 12px;
    color: inherit;
    display: flex;
    gap: 1rem;
    min-height: 150px;
    padding: 1.25rem;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover { box-shadow: 0 10px 28px rgba(24, 40, 55, .10); color: inherit; transform: translateY(-2px); }
.feature-card.primary { border-top: 4px solid var(--er-red); }
.feature-card h2 { font-size: 1.1rem; margin: .2rem 0 .4rem; }
.feature-card p { color: var(--er-muted); font-size: .9rem; margin: 0; }
.feature-icon {
    align-items: center; background: #edf1f4; border-radius: 9px; color: var(--er-navy);
    display: flex; flex: 0 0 44px; font-size: .76rem; font-weight: 900; height: 44px; justify-content: center;
}
.feature-card.primary .feature-icon { background: #fdebed; color: var(--er-red-dark); }

.scope-panel, .placeholder-page, .context-toolbar, .po-summary-grid, .grid-toolbar {
    background: var(--er-surface);
    border: 1px solid var(--er-border);
    border-radius: 10px;
}
.scope-panel { margin-top: 1rem; padding: 1.25rem; }
.scope-panel h2 { font-size: 1rem; }
.store-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.store-chips span { background: #eef3f7; border-radius: 6px; color: #3a5268; font-size: .8rem; padding: .45rem .65rem; }

.context-toolbar { align-items: center; display: flex; gap: 1rem; margin-bottom: .8rem; padding: .85rem 1rem; }
.context-toolbar label { font-size: .8rem; font-weight: 800; margin: 0; text-transform: uppercase; }
.scope-hint { color: var(--er-muted); font-size: .85rem; }
.demo-data-note { color: #695b2c; font-size: .82rem; margin: 0 0 .8rem; }
.po-link { color: #095fa7; font-weight: 750; }
.maintenance-toolbar {
    align-items: end; background: var(--er-surface); border: 1px solid var(--er-border); border-radius: 10px;
    display: grid; gap: .8rem; grid-template-columns: minmax(170px, .8fr) minmax(260px, 1.35fr) auto auto;
    margin-bottom: .8rem; padding: 1rem;
}
.maintenance-toolbar label > span { display: block; font-size: .72rem; font-weight: 800; margin-bottom: .35rem; text-transform: uppercase; }
.maintenance-check { align-items: center; display: flex; gap: .45rem; padding-bottom: .55rem; white-space: nowrap; }
.maintenance-grid { min-height: 400px; }
.result-note { color: var(--er-muted); font-size: .78rem; margin-top: .65rem; }
.link-button { background: none; border: 0; color: #095fa7; cursor: pointer; font: inherit; font-weight: 750; padding: 0; text-decoration: underline; }
.maintenance-detail-heading { align-items: flex-end; display: flex; gap: 1rem; justify-content: space-between; margin: 1.2rem 0; }
.maintenance-detail-heading .eyebrow { margin-top: 1rem; }
.maintenance-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .6rem; }
.legacy-group-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.legacy-group-card { background: white; border: 1px solid var(--er-border); border-radius: 10px; padding: 1.2rem; }
.legacy-group-card h2 { border-bottom: 2px solid var(--er-red); font-size: 1rem; margin-bottom: .8rem; padding-bottom: .55rem; }
.legacy-group-card dl { margin: 0; }
.legacy-group-card dl div { align-items: baseline; border-top: 1px solid #edf0f2; display: flex; gap: 1rem; justify-content: space-between; padding: .5rem 0; }
.legacy-group-card dl div:first-child { border-top: 0; }
.legacy-group-card dt { color: var(--er-muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.legacy-group-card dd { font-size: .86rem; margin: 0; max-width: 70%; text-align: right; }
.preserve-lines { white-space: pre-line; }
.event-terms-card { grid-column: 1 / -1; }

.vendor-editor-page { margin-top: -.25rem; }
.vendor-editor-toolbar { align-items: center; display: flex; justify-content: space-between; margin-bottom: .65rem; }
.vendor-editor-grid { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .95fr); }
.vendor-form-card { min-width: 0; padding: .8rem 1rem 1rem; }
.vendor-form-card legend { border-bottom: 2px solid var(--er-red); float: none; font-size: .92rem; font-weight: 750; margin: 0 0 .65rem; padding: 0 0 .4rem; }
.vendor-form-grid { display: grid; gap: .48rem .6rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vendor-form-grid > label, .freight-event-row label, .terms-field { min-width: 0; }
.vendor-form-grid label > span, .freight-event-row label > span, .terms-field > span, .payment-methods > span {
    color: var(--er-muted); display: block; font-size: .65rem; font-weight: 800; margin-bottom: .18rem; text-transform: uppercase;
}
.vendor-form-card .form-control, .vendor-form-card .form-select { font-size: .78rem; min-height: 31px; padding: .28rem .42rem; }
.vendor-form-card textarea.form-control { min-height: 48px; resize: vertical; }
.vendor-form-grid .full-field { grid-column: 1 / -1; }
.vendor-form-grid .wide-field { grid-column: span 2; }
.vendor-form-grid .short-field { grid-column: span 1; }
.vendor-form-grid .check-field { align-items: center; display: flex; gap: .35rem; padding-top: 1.15rem; }
.contact-form-grid { grid-template-columns: minmax(130px, .65fr) minmax(180px, 1fr); }
.freight-event-row { display: grid; gap: .6rem; grid-template-columns: minmax(220px, 1fr) 110px; margin-bottom: .4rem; }
.freight-grid-scroll { max-width: 100%; overflow-x: auto; }
.freight-grid { font-size: .72rem; width: 100%; }
.freight-grid th { color: var(--er-muted); font-size: .64rem; padding: .16rem .28rem; text-transform: uppercase; white-space: nowrap; }
.freight-grid td { padding: .11rem .18rem; }
.freight-grid td:nth-child(2) { min-width: 205px; }
.freight-grid td:nth-child(3) { width: 68px; }
.freight-grid td:nth-child(4) { width: 90px; }
.freight-grid .form-control { min-height: 27px; padding: .15rem .3rem; }
.terms-field { display: block; margin-top: .42rem; }
.terms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.payment-methods { align-items: center; display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.payment-methods > span { flex: 0 0 100%; }
.payment-methods label { align-items: center; display: flex; font-size: .75rem; gap: .3rem; }
.empty-editor-note { color: var(--er-muted); font-size: .82rem; margin: 0; }

.item-maintenance-page { display: flex; flex-direction: column; height: calc(100dvh - 4.2rem); margin-top: -.55rem; min-height: 0; overflow: hidden; }
.item-grid-controls { flex: 0 0 auto; }
.item-maintenance-page .maintenance-toolbar {
    gap: .55rem; grid-template-columns: minmax(170px, .65fr) minmax(260px, 1.4fr) auto auto auto auto; margin-bottom: .35rem; padding: .55rem .7rem;
}
.item-maintenance-page .maintenance-toolbar label > span { margin-bottom: .2rem; }
.item-maintenance-page .maintenance-toolbar .btn { padding: .36rem .62rem; white-space: nowrap; }
.item-maintenance-page .maintenance-check { padding-bottom: .38rem; }
.item-maintenance-page .demo-data-note { font-size: .72rem; margin-bottom: .3rem; }
.item-grid-scroll { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.item-grid-scroll .viewport-grid { height: 100%; min-height: 0; }
.item-grid-scroll .rz-data-grid-data { max-height: 100%; overflow: auto; }
.item-grid-scroll .rz-grid-table thead { position: sticky; top: 0; z-index: 5; }
.item-maintenance-page .result-note { flex: 0 0 auto; margin: .28rem 0 0; }

@media (max-width: 1100px) {
    .vendor-editor-grid { grid-template-columns: 1fr; }
    .item-maintenance-page { height: auto; overflow: visible; }
    .item-maintenance-page .maintenance-toolbar { grid-template-columns: 1fr 2fr auto auto; }
    .item-grid-scroll { height: 65vh; }
}

@media (max-width: 700px) {
    .vendor-form-grid, .terms-grid, .contact-form-grid { grid-template-columns: 1fr; }
    .vendor-form-grid .wide-field, .vendor-form-grid .short-field, .vendor-form-grid .full-field { grid-column: auto; }
    .vendor-form-grid .check-field { padding-top: 0; }
    .item-maintenance-page .maintenance-toolbar { grid-template-columns: 1fr; }
}

.setup-backdrop {
    align-items: center;
    background: rgba(12, 22, 31, .56);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 1000;
}
.setup-dialog {
    background: var(--er-surface);
    border-radius: 14px;
    box-shadow: 0 22px 70px rgba(8, 20, 31, .28);
    max-width: 650px;
    padding: 1.5rem;
    width: 100%;
}
.setup-dialog-heading { align-items: flex-start; display: flex; gap: 1rem; justify-content: space-between; }
.setup-dialog-heading h2 { font-size: 1.35rem; margin-bottom: .25rem; }
.setup-dialog-heading p:last-child { color: var(--er-muted); margin-bottom: 0; }
.setup-fields { display: grid; gap: 1rem; margin: 1.4rem 0; }
.setup-fields label { display: block; font-size: .75rem; font-weight: 800; margin-bottom: .4rem; text-transform: uppercase; }
.setup-fields small { color: var(--er-muted); display: block; margin-top: .4rem; }
.setup-dialog-actions { display: flex; gap: .65rem; justify-content: flex-end; }

.editor-actions { display: flex; gap: .65rem; }
.back-link { color: var(--er-muted); display: inline-block; font-size: .85rem; margin-bottom: .9rem; text-decoration: none; }
.po-summary-grid { display: grid; gap: 1rem; grid-template-columns: 180px minmax(300px, 1fr) 360px; margin-bottom: .8rem; padding: .9rem; }
.po-summary-grid label { display: block; font-size: .72rem; font-weight: 800; margin-bottom: .35rem; text-transform: uppercase; }
.totals-card { align-items: center; background: #f3f6f8; border-radius: 8px; display: grid; grid-template-columns: repeat(3, 1fr); padding: .7rem; }
.totals-card span { display: flex; flex-direction: column; padding: 0 .7rem; }
.totals-card span + span { border-left: 1px solid var(--er-border); }
.totals-card small { color: var(--er-muted); font-size: .7rem; text-transform: uppercase; }
.totals-card strong { font-size: 1.05rem; }
.compact-alert { margin-bottom: .8rem; padding: .55rem .8rem; }
.po-workbench { display: grid; gap: .8rem; grid-template-columns: 380px 225px minmax(320px, 1fr); margin-bottom: .8rem; }
.po-dates-card, .po-totals-card, .supplier-context-card { background: white; border: 1px solid var(--er-border); border-radius: 10px; min-width: 0; }
.po-dates-card { display: grid; gap: .55rem; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: .8rem; }
.po-dates-card label { color: var(--er-muted); font-size: .66rem; font-weight: 800; margin: 0; text-transform: uppercase; }
.po-dates-card label, .po-dates-card input { min-width: 0; width: 100%; }
.po-dates-card input { font-size: .75rem; padding: .35rem; }
.po-comments-label { grid-column: 1 / -1; }
.po-comments-label textarea { font-size: .78rem; margin-top: .3rem; resize: vertical; text-transform: none; }
.po-totals-card { padding: .75rem .9rem; }
.totals-heading { align-items: baseline; border-bottom: 1px solid var(--er-border); display: flex; justify-content: space-between; padding-bottom: .45rem; }
.totals-heading span { font-size: .82rem; font-weight: 800; text-transform: uppercase; }
.totals-heading small { color: var(--er-muted); }
.po-totals-card dl { margin: .35rem 0 0; }
.po-totals-card dl div { display: flex; font-size: .78rem; justify-content: space-between; padding: .16rem 0; }
.po-totals-card dt { color: var(--er-muted); font-weight: 600; }
.po-totals-card dd { font-weight: 800; margin: 0; }
.supplier-context-card { overflow: hidden; }
.supplier-tabs { background: #f0f3f5; border-bottom: 1px solid var(--er-border); display: flex; flex-wrap: wrap; overflow: hidden; }
.supplier-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: #516273; font-size: .67rem; font-weight: 750; padding: .55rem .52rem .45rem; white-space: nowrap; }
.supplier-tabs button.active { background: white; border-bottom-color: var(--er-red); color: var(--er-navy); }
.supplier-tab-content { height: 128px; overflow: auto; padding: .65rem .8rem; }
.supplier-tab-content pre { color: #374554; font-family: inherit; font-size: .75rem; margin: 0; white-space: pre-wrap; }
.grid-toolbar { align-items: center; display: flex; justify-content: space-between; margin-bottom: .5rem; padding: .55rem .8rem; }
.status-legend { display: flex; gap: .35rem; }
.status-legend button, .status-pill { border: 0; border-radius: 999px; font-size: .68rem; font-weight: 750; padding: .22rem .48rem; white-space: nowrap; }
.status-legend button { cursor: pointer; opacity: .82; transition: box-shadow .12s ease, opacity .12s ease, transform .12s ease; }
.status-legend button:hover { opacity: 1; transform: translateY(-1px); }
.status-legend button.selected { box-shadow: 0 0 0 2px white, 0 0 0 4px #355b78; opacity: 1; }
.status-legend button:focus-visible { outline: 2px solid #1b6ec2; outline-offset: 2px; }
.legend-key, .status-key { background: #5d1022; color: white; }
.legend-core, .status-core { background: #58db57; color: #143c14; }
.legend-new, .status-new { background: #d7fff8; color: #116257; }
.legend-inactive, .status-inactive { background: #5e1a73; color: white; }
.legend-removeatactivation, .status-removeatactivation { background: #f3b51b; color: #3d2b00; }
.status-pricechange { background: #007a77; color: white; }
.status-unavailable { background: #e1e3e5; color: #4b5056; }
.status-notrecommended { background: #b1a36c; color: #27220d; }
.status-normal { background: #edf1f4; color: #425466; }

.po-grid, .po-list-grid { background: white; border: 1px solid var(--er-border); border-radius: 8px; max-width: 100%; min-width: 0; overflow: hidden; width: 100%; }
.po-grid .rz-grid-table td { font-size: .78rem; }
.product-id-preview-host { align-items: center; display: flex; gap: .35rem; }
.image-available-marker { background: #e8f0f7; border-radius: 3px; color: #36536d; font-size: .52rem; font-weight: 800; padding: .12rem .2rem; }
.product-image-preview { background: white; border: 1px solid var(--er-border); border-radius: 10px; bottom: 1.5rem; box-shadow: 0 16px 44px rgba(22, 37, 50, .28); padding: .5rem; position: fixed; right: 1.5rem; z-index: 2000; }
.product-image-preview img { display: block; max-height: min(480px, 65vh); max-width: min(640px, 55vw); object-fit: contain; }
.po-grid .rz-column-title, .po-list-grid .rz-column-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.case-pack-help { color: var(--er-muted); font-size: .74rem; margin-left: .65rem; }
.qty-stepper { align-items: center; display: inline-flex; gap: 2px; }
.qty-stepper .qty-input { border: 1px solid #b8c2cc; border-radius: 4px; font-weight: 800; height: 30px; padding: 2px 3px; text-align: right; width: 58px; }
.qty-step-button { align-items: center; background: #eef2f5; border: 1px solid #c6ced6; border-radius: 4px; color: #32485b; display: inline-flex; font-size: .62rem; height: 30px; justify-content: center; padding: 0; width: 22px; }
.qty-step-button:hover { background: #dce6ed; }
.item-detail-link { color: #095fa7; font-weight: 750; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.product-row.row-key td:first-child { box-shadow: inset 4px 0 #641329; }
.product-row.row-core td:first-child { box-shadow: inset 4px 0 #38bd3a; }
.product-row.row-new td:first-child { box-shadow: inset 4px 0 #17b8a7; }
.product-row.row-inactive { opacity: .65; }
.product-row.row-removeatactivation td { background: #fff8df; }
.activation-warning { border-left: 4px solid #d79800; }

/* Shared portal pages over the existing BUCKONLINE content. */
.portal-heading { align-items: end; display: flex; justify-content: space-between; margin: .4rem 0 1.1rem; }
.portal-heading h1 { margin: 0; }
.portal-heading p:last-child { color: var(--er-muted); margin: .25rem 0 0; }
.portal-refresh { align-items: center; color: var(--er-muted); display: flex; font-size: .75rem; gap: .65rem; }
.portal-loading { background: white; border: 1px solid var(--er-border); border-radius: 12px; padding: 2rem; }
.portal-dashboard { align-items: start; display: grid; gap: 1rem; grid-template-columns: minmax(0, 2.1fr) minmax(285px, .9fr); }
.portal-main-column, .portal-side-column { display: grid; gap: 1rem; min-width: 0; }
.portal-panel { background: white; border: 1px solid var(--er-border); border-radius: 10px; overflow: hidden; }
.panel-title { align-items: center; background: var(--er-navy); color: white; display: flex; font-size: .8rem; font-weight: 800; justify-content: space-between; min-height: 38px; padding: .55rem .75rem; text-transform: uppercase; }
.panel-title a { color: white; text-decoration: none; }
.panel-title small { color: #d8e1e8; font-size: .67rem; font-weight: 600; }
.panel-title .form-select { font-size: .72rem; max-width: 115px; padding: .18rem 1.8rem .18rem .4rem; }
.portal-feature-content { align-items: start; display: grid; gap: 1.2rem; grid-template-columns: minmax(180px, 32%) 1fr; padding: 1rem; }
.portal-feature-content.without-image { grid-template-columns: 1fr; }
.portal-feature-content img { max-height: 240px; object-fit: contain; width: 100%; }
.portal-feature-content h2 { color: #0b4db4; font-size: 1.25rem; }
.announcement-body { display: flow-root; padding: 1rem; }
.announcement-body > a { float: left; margin: 0 1rem .65rem 0; max-width: 260px; }
.announcement-body img { max-height: 210px; max-width: 260px; object-fit: contain; }
.legacy-rich-text { color: #303b45; font-size: .9rem; overflow-wrap: anywhere; }
.legacy-rich-text img { max-width: 100%; }
.attachment-list { align-items: center; background: #f5f7f9; border-top: 1px solid var(--er-border); display: flex; flex-wrap: wrap; font-size: .78rem; gap: .6rem; padding: .65rem 1rem; }
.announcement-list, .forum-activity { display: grid; }
.announcement-list a, .forum-activity a { align-items: start; border-top: 1px solid #edf0f2; color: inherit; display: flex; font-size: .76rem; gap: .65rem; justify-content: space-between; padding: .56rem .7rem; text-decoration: none; }
.announcement-list a:first-child, .forum-activity a:first-child { border-top: 0; }
.announcement-list time, .forum-activity small { color: var(--er-muted); font-size: .65rem; white-space: nowrap; }
.forum-activity a { flex-direction: column; gap: .18rem; }
.tip-copy, .panel-message { color: #485865; font-size: .8rem; margin: 0; padding: .8rem; }
.panel-action { display: block; font-size: .72rem; font-weight: 750; padding: .2rem .8rem .8rem; text-decoration: none; }
.mini-calendar { display: grid; gap: 2px; grid-template-columns: repeat(7, 1fr); padding: .7rem; }
.mini-calendar strong, .mini-calendar span { align-items: center; aspect-ratio: 1; display: flex; font-size: .68rem; justify-content: center; }
.mini-calendar strong { aspect-ratio: auto; color: var(--er-muted); }
.mini-calendar span { background: #edf1f4; border-radius: 5px; font-weight: 750; }
.mini-calendar .ahead { background: #dff4e4; color: #176c2d; }.mini-calendar .behind { background: #fde5e7; color: #a51d2b; }.mini-calendar .no-data { color: #9aa5ae; }.mini-calendar .blank { background: transparent; }
.empty-panel { padding: 1.5rem; }.empty-panel h2 { font-size: 1rem; margin: 0; }

.portal-breadcrumb { align-items: center; color: var(--er-muted); display: flex; flex-wrap: wrap; font-size: .8rem; gap: .45rem; margin: -.5rem 0 1rem; }
.resource-list { background: white; border: 1px solid var(--er-border); border-radius: 10px; overflow: hidden; }
.resource-row { align-items: center; border-top: 1px solid var(--er-border); color: inherit; display: grid; gap: .8rem; grid-template-columns: 42px 1fr auto; min-height: 62px; padding: .65rem 1rem; text-decoration: none; }
.resource-row:first-child { border-top: 0; }.resource-row:hover { background: #f7f9fa; color: inherit; }
.resource-row small { color: var(--er-muted); }.resource-icon { align-items: center; background: #e8eef3; border-radius: 7px; color: #3c566c; display: flex; flex: 0 0 38px; font-size: .58rem; font-weight: 900; height: 38px; justify-content: center; position: relative; width: 38px; }
.folder-icon { background: #fff6d9; color: #d69a12; }
.folder-icon svg { fill: currentColor; height: 28px; width: 32px; }
.file-icon { background: transparent; border-radius: 0; color: #687987; }
.file-icon svg { height: 36px; width: 30px; }
.file-icon .file-sheet { fill: #f7f9fa; stroke: currentColor; stroke-width: 1.6; }
.file-icon .file-fold { fill: none; stroke: currentColor; stroke-linejoin: round; stroke-width: 1.6; }
.file-icon > span { bottom: 5px; color: currentColor; font-size: .43rem; left: 0; letter-spacing: -.02em; line-height: 1; position: absolute; right: 0; text-align: center; }
.file-pdf { color: #d3313f; }.file-word { color: #2867b2; }.file-sheet-type { color: #25834f; }.file-slides { color: #d7682c; }.file-image { color: #8a4eb2; }.file-archive { color: #6c757d; }
.empty-resource { color: var(--er-muted); margin: 0; padding: 1.5rem; }
.contact-grid, .portal-card-grid { display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contact-card { align-items: start; background: white; border: 1px solid var(--er-border); border-radius: 10px; display: flex; gap: .8rem; padding: 1rem; }
.contact-monogram { align-items: center; background: var(--er-navy); border-radius: 50%; color: white; display: flex; flex: 0 0 42px; font-size: .7rem; font-weight: 850; height: 42px; justify-content: center; }
.contact-card h2 { font-size: .95rem; margin: 0; }.contact-card p { color: var(--er-muted); font-size: .75rem; margin: .18rem 0 .55rem; }.contact-links { display: flex; flex-direction: column; font-size: .73rem; }
.portal-link-card { background: white; border: 1px solid var(--er-border); border-radius: 10px; color: inherit; padding: 1rem; text-decoration: none; }.portal-link-card span { color: var(--er-red-dark); font-size: .65rem; font-weight: 850; text-transform: uppercase; }.portal-link-card h2 { font-size: 1rem; margin: .35rem 0; }.portal-link-card p { color: var(--er-muted); font-size: .76rem; margin: 0; }
.forum-thread { display: grid; gap: .75rem; }.forum-post { background: white; border: 1px solid var(--er-border); border-radius: 9px; overflow: hidden; }.forum-post.reply { margin-left: 2rem; }.forum-post header { background: #edf1f4; display: flex; font-size: .75rem; justify-content: space-between; padding: .55rem .75rem; }.forum-post header time { color: var(--er-muted); }.forum-post > div { font-size: .86rem; padding: .85rem; }
.report-tree { background: white; border: 1px solid var(--er-border); border-radius: 10px; overflow: hidden; }
.report-folder + .report-folder { border-top: 1px solid var(--er-border); }
.report-folder summary { align-items: center; background: #edf1f4; cursor: pointer; display: flex; font-size: .86rem; font-weight: 800; gap: .55rem; list-style: none; padding: .72rem .9rem; }
.report-folder summary::-webkit-details-marker { display: none; }
.report-folder summary::before { color: #627486; content: "▸"; font-size: .72rem; transition: transform .12s ease; }
.report-folder[open] summary::before { transform: rotate(90deg); }
.report-folder-name::before { content: "📁"; font-size: .92rem; margin-right: .45rem; }
.report-folder-count { color: var(--er-muted); font-size: .7rem; font-weight: 700; margin-left: auto; }
.report-folder-children { border-top: 1px solid var(--er-border); margin-left: 1.35rem; position: relative; }
.report-folder-children::before { background: #d7dee4; bottom: .8rem; content: ""; left: .72rem; position: absolute; top: 0; width: 1px; }
.report-tree-row { align-items: center; border-bottom: 1px solid #edf0f2; color: inherit; display: grid; gap: .6rem; grid-template-columns: 20px minmax(0, 1fr) auto; min-height: 46px; padding: .5rem .8rem .5rem 1rem; position: relative; text-decoration: none; }
.report-tree-row:last-child { border-bottom: 0; }
.report-tree-row.runnable:hover { background: #f4f7fa; }
.report-document-icon { background: #fff; border: 1px solid #9aa9b5; border-radius: 2px; height: 15px; position: relative; width: 12px; z-index: 1; }
.report-document-icon::after { background: var(--er-red); bottom: 2px; content: ""; height: 3px; left: 2px; position: absolute; right: 2px; }
.report-tree-label { display: flex; flex-direction: column; min-width: 0; }
.report-tree-label strong { font-size: .79rem; }
.report-tree-label small { color: var(--er-muted); font-size: .65rem; }

.report-toolbar { align-items: end; background: white; border: 1px solid var(--er-border); border-radius: 10px; display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 1rem; padding: .75rem; }.report-toolbar label span { display: block; font-size: .65rem; font-weight: 850; margin-bottom: .2rem; text-transform: uppercase; }.report-toolbar label:first-child { min-width: 280px; }
.sales-budget-report { background: white; border: 1px solid var(--er-border); padding: 1rem; }.sales-budget-header { align-items: center; display: grid; grid-template-columns: 90px 1fr 180px; margin-bottom: 1rem; text-align: center; }.report-logo { align-items: center; background: var(--er-red); border-radius: 50%; color: white; display: flex; font-size: 1.1rem; font-weight: 900; height: 70px; justify-content: center; width: 88px; }.sales-budget-header h1 { font-size: 1.2rem; margin: 0; }.sales-budget-header p { margin: .2rem 0; }.report-printed { align-self: start; color: var(--er-muted); font-size: .65rem; text-align: right; }
.budget-calendar { border-left: 1px solid #cfd5da; border-top: 1px solid #cfd5da; display: grid; grid-template-columns: repeat(7,minmax(105px,1fr)) minmax(135px,.85fr); overflow-x: auto; }.budget-weekday { background: #edf1f4; border-bottom: 1px solid #cfd5da; border-right: 1px solid #cfd5da; font-size: .72rem; padding: .4rem; }.budget-day, .budget-totals { border-bottom: 1px solid #cfd5da; border-right: 1px solid #cfd5da; min-height: 125px; padding: .45rem; }.budget-day > strong { display: block; margin-bottom: 1rem; }.budget-day dl { font-size: .66rem; margin: 0 0 .65rem; }.budget-day dl div { display: flex; justify-content: space-between; }.budget-day dt { font-weight: 500; }.budget-day dd { margin: 0; }.variance { display: block; font-size: .65rem; }.positive { color: #16702f; }.negative { color: #cf2536; }.blank-day { background: #fafbfc; }.budget-totals { font-size: .63rem; }.budget-totals section { display: grid; margin-bottom: .65rem; }.budget-totals section strong { text-decoration: underline; }.sales-budget-report footer { color: var(--er-muted); font-size: .62rem; padding-top: .4rem; }

@media (max-width: 1000px) { .portal-dashboard { grid-template-columns: 1fr; }.portal-side-column { grid-template-columns: repeat(2,minmax(0,1fr)); }.contact-grid, .portal-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .portal-heading { align-items: start; flex-direction: column; gap: .7rem; }.portal-side-column, .contact-grid, .portal-card-grid { grid-template-columns: 1fr; }.portal-feature-content { grid-template-columns: 1fr; }.resource-row { grid-template-columns: 38px 1fr; }.resource-row small { grid-column: 2; }.report-tree-row { grid-template-columns: 20px minmax(0, 1fr); }.report-tree-row .status-pill { grid-column: 2; justify-self: start; }.report-toolbar { align-items: stretch; flex-direction: column; }.report-toolbar label:first-child { min-width: 0; }.forum-post.reply { margin-left: .75rem; } }
@media print { .sidebar, .top-row, .no-print, #blazor-error-ui { display: none !important; }.page, main { display: block; overflow: visible; width: 100%; }.content { padding: 0 !important; }.sales-budget-report { border: 0; padding: 0; }.budget-calendar { grid-template-columns: repeat(7,1fr) .9fr; }.budget-day,.budget-totals { min-height: 105px; }.sales-budget-header { margin-top: 0; } }

/* The PO grid is the primary workspace. Keep its supporting context visible without
   letting the header consume most of a desktop viewport. */
.po-editor-page {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 4.2rem);
    margin-top: -.55rem;
    min-height: 0;
    overflow: hidden;
}
.po-editor-overview {
    flex: 0 0 auto;
}
.po-editor-page .editor-heading {
    align-items: center;
    flex-wrap: nowrap;
    margin: .15rem 0 .45rem;
}
.po-editor-page .editor-heading h1 {
    font-size: 1.7rem;
    line-height: 1.05;
    margin: .1rem 0;
}
.po-editor-page .editor-heading .eyebrow {
    font-size: .66rem;
    margin-bottom: .18rem;
}
.po-editor-page .back-link {
    font-size: .76rem;
    margin-bottom: .3rem;
}
.po-editor-page .editor-actions .btn {
    padding: .38rem .7rem;
}
.po-editor-page .demo-data-note {
    font-size: .73rem;
    margin-bottom: .35rem;
}
.po-editor-page .compact-alert {
    font-size: .78rem;
    margin-bottom: .35rem;
    padding: .35rem .65rem;
}
.po-editor-page .po-workbench {
    gap: .5rem;
    grid-template-columns: 360px 210px minmax(320px, 1fr);
    margin-bottom: .4rem;
}
.po-editor-page .po-dates-card {
    gap: .3rem .45rem;
    padding: .45rem .55rem;
}
.po-editor-page .po-dates-card input {
    height: 29px;
    padding: .2rem .35rem;
}
.po-editor-page .po-comments-label textarea {
    height: 42px;
    margin-top: .15rem;
    min-height: 42px;
    padding: .3rem .45rem;
    resize: none;
}
.po-editor-page .po-totals-card {
    padding: .4rem .65rem;
}
.po-editor-page .totals-heading {
    padding-bottom: .22rem;
}
.po-editor-page .po-totals-card dl {
    margin-top: .18rem;
}
.po-editor-page .po-totals-card dl div {
    font-size: .72rem;
    line-height: 1.15;
    padding: .08rem 0;
}
.po-editor-page .supplier-tabs {
    flex-wrap: nowrap;
}
.po-editor-page .supplier-tabs button {
    font-size: .62rem;
    padding: .36rem .42rem .3rem;
}
.po-editor-page .supplier-tab-content {
    height: 70px;
    padding: .4rem .6rem;
}
.po-editor-page .supplier-tab-content pre {
    font-size: .7rem;
    line-height: 1.25;
}
.po-editor-page .grid-toolbar {
    flex: 0 0 auto;
    font-size: .82rem;
    margin-bottom: .3rem;
    padding: .35rem .65rem;
}
.po-editor-page .status-legend button {
    font-size: .62rem;
    padding: .17rem .38rem;
}
.po-editor-page .po-grid {
    border-radius: 8px;
    flex: 1 1 0;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
}
.po-editor-page .po-grid .rz-data-grid-data {
    overflow: auto;
}

@media (min-width: 1600px) {
    .po-editor-overview {
        align-items: stretch;
        display: grid;
        gap: .6rem;
        grid-template-columns: 320px minmax(0, 1fr);
        margin-bottom: .4rem;
    }
    .po-editor-intro {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
    .po-editor-page .editor-heading {
        align-items: flex-start;
        flex: 1 1 auto;
        flex-direction: column;
        gap: .35rem;
        justify-content: space-between;
        margin: 0;
    }
    .po-editor-page .editor-actions {
        gap: .35rem;
    }
    .po-editor-page .editor-actions .btn {
        font-size: .75rem;
        padding: .3rem .5rem;
    }
    .po-editor-page .demo-data-note {
        line-height: 1.2;
        margin: .3rem 0 0;
    }
    .po-editor-page .po-workbench {
        grid-template-columns: 340px 195px minmax(300px, 1fr);
        height: 100%;
        margin-bottom: 0;
    }
    .po-editor-page .supplier-context-card {
        display: flex;
        flex-direction: column;
    }
    .po-editor-page .supplier-tab-content {
        flex: 1 1 auto;
        height: auto;
    }
}

.item-detail-heading { align-items: flex-start; display: flex; gap: 1.5rem; justify-content: space-between; margin: .15rem 0 .65rem; }
.item-detail-heading h1 { margin-bottom: .25rem; }
.item-summary-header { align-items: stretch; background: white; border: 1px solid var(--er-border); border-radius: 10px; display: grid; gap: 1rem; grid-template-columns: 190px minmax(380px, 1fr) minmax(260px, 360px); margin: .75rem 0 1rem; padding: 1rem; }
.item-summary-image { align-items: center; background: #f8fafb; border: 1px solid #e1e6ea; border-radius: 8px; display: flex; justify-content: center; min-height: 150px; overflow: hidden; padding: .4rem; }
.item-summary-image object, .item-summary-image img { display: block; height: 145px; max-width: 100%; object-fit: contain; pointer-events: none; width: 100%; }
.item-summary-details h2 { border-bottom: 2px solid var(--er-red); font-size: 1rem; margin: 0 0 .45rem; padding-bottom: .45rem; }
.item-summary-details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.item-summary-details dl div { border-bottom: 1px solid #edf0f2; min-width: 0; padding: .38rem .45rem; }
.item-summary-details dt { color: var(--er-muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.item-summary-details dd { font-size: .77rem; margin: .1rem 0 0; overflow-wrap: anywhere; }
.numeric-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-summary-barcode { align-items: center; border-left: 1px solid #e5e9ec; display: flex; justify-content: center; min-width: 0; padding-left: 1rem; }
.code128-barcode { display: block; height: auto; max-height: 92px; max-width: 100%; width: 100%; }
.code128-barcode text { fill: #18242e; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; letter-spacing: 1px; }
.barcode-unavailable { color: var(--er-muted); font-size: .75rem; }
.item-view-tabs { border-bottom: 1px solid var(--er-border); display: flex; gap: .25rem; margin: .75rem 0 1rem; }
.item-view-tabs a { border-bottom: 3px solid transparent; color: var(--er-muted); font-size: .78rem; font-weight: 800; padding: .6rem .9rem; text-decoration: none; }
.item-view-tabs a:hover { color: var(--er-navy); }.item-view-tabs a.active { border-bottom-color: var(--er-red); color: var(--er-navy); }
.item-report-summary { align-items: stretch; display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: 1rem; max-width: 980px; }
.item-report-summary.with-image { gap: 1rem; grid-template-columns: 280px minmax(0, 1fr); }
.item-report-image, .item-report-card { background: white; border: 1px solid var(--er-border); border-radius: 10px; }
.item-report-image { align-items: center; display: flex; justify-content: center; min-height: 280px; padding: 1rem; }
.item-report-image img { max-height: 260px; max-width: 100%; object-fit: contain; }
.item-report-card { padding: 1rem; }.item-report-card h2 { border-bottom: 2px solid var(--er-red); font-size: 1rem; margin: 0 0 .5rem; padding-bottom: .5rem; }
.item-report-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.item-report-card dl div { align-items: baseline; border-bottom: 1px solid #edf0f2; display: flex; gap: 1rem; justify-content: space-between; padding: .45rem .5rem; }
.item-report-card dt { color: var(--er-muted); font-size: .68rem; text-transform: uppercase; }.item-report-card dd { font-size: .78rem; margin: 0; text-align: right; }
.item-editor-actions { align-items: flex-end; display: flex; flex-direction: column; gap: .65rem; }
.item-image-link { flex: 0 0 auto; }
.item-detail-image { display: block; height: 190px; max-width: 100%; object-fit: contain; width: 100%; }
.item-description { color: var(--er-muted); font-size: 1.08rem; margin: 0; }
.item-statuses { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.item-detail-overview { align-items: start; display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(210px, 1fr)); margin-top: .65rem; }
.item-detail-overview.with-image { grid-template-columns: minmax(180px, 240px) repeat(3, minmax(210px, 1fr)); }
.item-detail-card { background: white; border: 1px solid var(--er-border); border-radius: 10px; padding: 1.2rem; }
.item-detail-card h2 { font-size: 1rem; margin-bottom: 1rem; }
.item-detail-card dl { margin: 0; }
.item-detail-card dl div { align-items: baseline; border-top: 1px solid #edf0f2; display: flex; gap: 1rem; justify-content: space-between; padding: .55rem 0; }
.item-detail-card dt { color: var(--er-muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.item-detail-card dd { font-size: .88rem; margin: 0; text-align: right; }
.item-comments { margin-top: 1rem; }
.item-comments p { margin-bottom: 0; white-space: pre-wrap; }
.item-image-card { align-items: center; display: flex; flex-direction: column; justify-content: center; padding: .65rem; }
.item-image-card .item-image-link { display: block; max-width: 100%; width: 100%; }
.item-image-card small { color: var(--er-muted); font-size: .67rem; margin-top: .4rem; }
.item-editor-card { min-width: 0; padding: .75rem .9rem .9rem; }
.item-editor-card legend { border-bottom: 2px solid var(--er-red); float: none; font-size: .9rem; font-weight: 750; margin: 0 0 .55rem; padding: 0 0 .38rem; }
.identification-card { margin-top: .65rem; }
.item-editor-fields { display: grid; gap: .42rem .55rem; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.item-editor-fields label { min-width: 0; }
.item-editor-fields label > span {
    color: var(--er-muted); display: block; font-size: .62rem; font-weight: 800; margin-bottom: .16rem; text-transform: uppercase;
}
.item-editor-fields .form-control, .item-editor-fields .form-select { font-size: .75rem; min-height: 29px; padding: .22rem .36rem; }
.item-editor-fields textarea.form-control { min-height: 60px; resize: vertical; }
.item-editor-fields .wide-field { grid-column: span 2; }
.item-editor-fields .description-field { grid-column: span 3; }
.item-editor-fields .full-field { grid-column: 1 / -1; }
.item-editor-fields .check-field { align-items: center; display: flex; font-size: .72rem; gap: .32rem; padding-top: 1.05rem; }
.item-editor-checks { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-bottom: .5rem; }
.item-editor-checks label { align-items: center; display: flex; font-size: .7rem; gap: .28rem; white-space: nowrap; }
.compact-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pricing-fields { grid-template-columns: 1fr; }
.classification-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item-editor-overview .item-image-card { align-self: start; }

@media (max-width: 1200px) {
    .item-summary-header { grid-template-columns: 170px minmax(0, 1fr); }
    .item-summary-barcode { border-left: 0; border-top: 1px solid #e5e9ec; grid-column: 1 / -1; padding: .75rem 0 0; }
    .code128-barcode { max-width: 520px; }
    .item-detail-overview, .item-detail-overview.with-image { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-editor-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pricing-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-editor-fields .description-field { grid-column: span 2; }
}

@media (max-width: 900px) {
    .item-summary-header { grid-template-columns: 150px minmax(0, 1fr); }
    .item-summary-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-summary-details .item-summary-wide { grid-column: 1 / -1; }
    .item-detail-overview, .item-detail-overview.with-image { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sales-history-heading { align-items: stretch; flex-direction: column; }
    .sales-date-filter { flex-wrap: wrap; }
}

@media (max-width: 640px) {
    .item-summary-header { grid-template-columns: 1fr; }
    .item-summary-image { min-height: 130px; }
    .item-summary-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .item-summary-barcode { grid-column: auto; }
    .item-detail-overview, .item-detail-overview.with-image { grid-template-columns: 1fr; }
    .item-report-summary.with-image { grid-template-columns: 1fr; }.item-report-card dl { grid-template-columns: 1fr; }
    .item-detail-image { height: 160px; }
    .item-editor-fields, .compact-fields, .pricing-fields, .classification-fields { grid-template-columns: 1fr; }
    .item-editor-fields .wide-field, .item-editor-fields .description-field, .item-editor-fields .full-field { grid-column: auto; }
    .item-editor-actions { align-items: flex-start; }
}
.sales-history-section { background: white; border: 1px solid var(--er-border); border-radius: 10px; margin-top: 1rem; padding: 1.2rem; }
.sales-history-heading { align-items: flex-end; display: flex; gap: 1.5rem; justify-content: space-between; }
.sales-history-heading h2 { font-size: 1.25rem; margin-bottom: .2rem; }
.sales-history-heading p:last-child { color: var(--er-muted); font-size: .82rem; margin: 0; }
.sales-date-filter { align-items: flex-end; display: flex; gap: .55rem; }
.sales-date-filter label { color: var(--er-muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.sales-date-filter input { font-size: .78rem; margin-top: .25rem; min-width: 135px; }
.sales-summary-strip { background: #f3f6f8; border-radius: 8px; display: grid; grid-template-columns: repeat(4, 1fr); margin: 1rem 0; padding: .75rem; }
.sales-summary-strip span { display: flex; flex-direction: column; padding: 0 .8rem; }
.sales-summary-strip span + span { border-left: 1px solid var(--er-border); }
.sales-summary-strip small { color: var(--er-muted); font-size: .68rem; text-transform: uppercase; }
.sales-summary-strip strong { font-size: 1rem; }
.sales-table-wrap { max-width: 100%; overflow-x: auto; }
.sales-history-table { border-collapse: collapse; font-size: .75rem; width: 100%; }
.sales-history-table th { background: #edf1f4; color: #435568; font-size: .66rem; text-transform: uppercase; }
.sales-history-table th, .sales-history-table td { border: 1px solid #dce2e7; padding: .42rem .5rem; text-align: right; white-space: nowrap; }
.sales-history-table th:first-child, .sales-history-table td:first-child { left: 0; min-width: 210px; position: sticky; text-align: left; }
.sales-history-table td:first-child { background: white; }
.masked-store-row td:first-child { color: var(--er-muted); font-style: italic; }
.portal-pager { align-items: center; display: flex; gap: .75rem; justify-content: center; margin: 1rem 0; }
.portal-pager span { color: var(--er-muted); font-size: .78rem; font-weight: 700; }
.report-row.runnable { color: inherit; text-decoration: none; }
.report-row.runnable:hover { background: #f4f7fa; }
.report-runner-filter-card { background: white; border: 1px solid var(--er-border); border-radius: 10px; margin-bottom: 1rem; padding: 1rem; }
.report-filter-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.report-filter-grid label { color: var(--er-muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.report-filter-grid .form-control, .report-filter-grid .form-select { font-size: .8rem; margin-top: .25rem; text-transform: none; }
.report-runner-actions { align-items: center; display: flex; gap: .8rem; margin-top: 1rem; }
.report-runner-actions span { color: var(--er-muted); font-size: .75rem; }
.report-output { background: white; border: 1px solid var(--er-border); border-radius: 10px; overflow: hidden; }
.report-output > header { align-items: center; border-bottom: 1px solid var(--er-border); display: flex; justify-content: space-between; padding: 1rem; }
.report-output > header h2 { font-size: 1.15rem; margin: 0; }
.report-output > header p { color: var(--er-muted); margin: .2rem 0 0; }
.report-output > header > div:last-child { display: flex; flex-direction: column; text-align: right; }
.report-output > header span { color: var(--er-muted); font-size: .72rem; }
.report-result-scroll { max-height: calc(100vh - 280px); overflow: auto; }
.report-result-table { border-collapse: separate; border-spacing: 0; font-size: .72rem; min-width: 100%; width: max-content; }
.report-result-table th { background: #edf1f4; color: #435568; position: sticky; text-transform: uppercase; top: 0; z-index: 1; }
.report-result-table th, .report-result-table td { border-bottom: 1px solid #e0e5e9; border-right: 1px solid #e0e5e9; padding: .42rem .55rem; text-align: left; white-space: nowrap; }
.report-result-table tbody tr:nth-child(even) { background: #fafbfc; }

.placeholder-page { margin: .75rem auto; max-width: 1100px; padding: 2rem; }
.placeholder-page > p { color: var(--er-muted); }
.placeholder-grid { margin: 1.5rem 0; }
.placeholder-grid section { background: #f5f7f9; border-radius: 8px; padding: 1rem; }
.placeholder-grid h2 { font-size: 1rem; }
.placeholder-grid p { color: var(--er-muted); font-size: .88rem; margin-bottom: 0; }

.login-shell { align-items: center; display: flex; justify-content: center; min-height: calc(100vh - 8rem); }
.login-card { background: white; border: 1px solid var(--er-border); border-radius: 16px; box-shadow: 0 18px 50px rgba(24, 40, 55, .12); max-width: 460px; padding: 2rem; width: 100%; }
.login-card h1 { font-size: 1.75rem; }
.brand-mark { align-items: center; background: var(--er-red); border-radius: 50%; color: white; display: flex; font-size: 1rem; font-weight: 900; height: 50px; justify-content: center; margin-bottom: 1rem; width: 50px; }
.development-credentials { background: #f3f6f8; border-radius: 8px; display: flex; flex-direction: column; font-size: .78rem; gap: .35rem; padding: .8rem; }
.development-credentials strong { margin-bottom: .2rem; }

@media (max-width: 1000px) {
    .dashboard-grid, .placeholder-grid, .item-detail-grid, .legacy-group-grid, .maintenance-toolbar { grid-template-columns: 1fr; }
    .po-summary-grid { grid-template-columns: 1fr 1fr; }
    .totals-card { grid-column: 1 / -1; }
    .po-workbench { grid-template-columns: 1fr 1fr; }
    .supplier-context-card { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .page-heading, .editor-heading, .context-toolbar, .item-detail-heading, .maintenance-detail-heading { align-items: stretch; flex-direction: column; gap: .75rem; }
    .po-summary-grid { grid-template-columns: 1fr; }
    .totals-card { grid-column: auto; }
    .po-workbench { grid-template-columns: 1fr; }
    .supplier-context-card { grid-column: auto; }
    .sales-history-heading, .sales-date-filter { align-items: stretch; flex-direction: column; }
    .sales-summary-strip { grid-template-columns: 1fr 1fr; row-gap: .8rem; }
}
