/* Accepted selective V2 integration: one screen typography vocabulary.
   app.css remains the ERP style owner; the root rem context and print profiles stay stable. */
@font-face { font-family: Inter; src: url('fonts/InterVariable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@media screen {
 :root {
    --erp-font: "Segoe UI", Arial, sans-serif;
    --erp-weight-regular: 400;
    --erp-weight-medium: 500;
    --erp-weight-emphasis: 600;
    --erp-shell-accent: #145aff;
    --erp-shell-accent-soft: #edf2ff;
    --erp-shell-surface: #fff;
    --erp-shell-hover: #f4f6fa;
    --erp-shell-text: #4b566d;
    --erp-shell-dark: #10162f;
    --erp-shell-muted: #737d90;
    --erp-shell-border: #e4e8f0;
    --erp-type-title: 24px; --erp-leading-title: 30px; --erp-weight-title: 600; --erp-tracking-title: -.025em;
    --erp-type-welcome: 30px; --erp-leading-welcome: 38px; --erp-tracking-welcome: -.04em;
    --erp-type-section: 16px; --erp-leading-section: 22px; --erp-weight-section: 600; --erp-tracking-section: -.015em;
    --erp-type-subsection: 13px; --erp-leading-subsection: 18px; --erp-weight-subsection: 600; --erp-tracking-subsection: 0;
    --erp-type-body: 14px; --erp-leading-body: 20px; --erp-weight-body: 400; --erp-tracking-body: 0;
    --erp-type-value: 13px; --erp-leading-value: 19px; --erp-weight-value: 400; --erp-tracking-value: 0;
    --erp-type-label: 12px; --erp-leading-label: 18px; --erp-weight-label: 500; --erp-tracking-label: 0;
    --erp-type-action: 13px; --erp-leading-action: 18px; --erp-weight-action: 500; --erp-tracking-action: 0;
    --erp-type-action-sm: 12px; --erp-leading-action-sm: 16px; --erp-weight-action-sm: 500; --erp-tracking-action-sm: 0;
    --erp-type-tab: 13px; --erp-leading-tab: 18px; --erp-weight-tab: 500; --erp-tracking-tab: 0;
    --erp-type-meta: 12px; --erp-leading-meta: 17px; --erp-weight-meta: 400; --erp-tracking-meta: 0;
    --erp-type-caption: 11px; --erp-leading-caption: 15px; --erp-weight-caption: 400; --erp-tracking-caption: 0;
    --erp-type-badge: 11px; --erp-leading-badge: 15px; --erp-weight-badge: 500; --erp-tracking-badge: 0;
    --erp-type-table: 13px; --erp-leading-table: 18px; --erp-weight-table: 400; --erp-tracking-table: 0;
    --erp-type-table-compact: 12px; --erp-leading-table-compact: 17px; --erp-weight-table-compact: 400; --erp-tracking-table-compact: 0;
    --erp-type-table-heading: 11px; --erp-leading-table-heading: 15px; --erp-weight-table-heading: 500; --erp-tracking-table-heading: 0;
    --erp-type-kpi: 32px; --erp-leading-kpi: 40px; --erp-weight-kpi: 600; --erp-tracking-kpi: -.03em;
    --erp-type-summary: 22px; --erp-leading-summary: 28px; --erp-weight-summary: 600; --erp-tracking-summary: -.025em;
    --erp-type-total: 16px; --erp-leading-total: 22px; --erp-weight-total: 600; --erp-tracking-total: -.015em;
    --erp-type-nav: 12.5px; --erp-leading-nav: 17px; --erp-weight-nav: 500; --erp-tracking-nav: 0;
    --erp-type-nav-child: 12px; --erp-leading-nav-child: 16px; --erp-weight-nav-child: 500; --erp-tracking-nav-child: 0;
 }
}
html { scrollbar-gutter: stable; }
:root {
    --erp-bg: #f5f6f8;
    --erp-surface: #ffffff;
    --erp-surface-soft: #f8fafc;
    --erp-border: #e3e7ed;
    --erp-border-strong: #d4d9e1;
    --erp-text: #172033;
    --erp-muted: #687386;
    --erp-dark: #172033;
    --erp-blue: #315c9a;
    --erp-green: #24704a;
    --erp-amber: #9a6418;
    --erp-red: #a23b3b;
    --erp-radius: 9px;
    --erp-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    --erp-control-height: 38px;
    --erp-control-height-sm: 32px;
    --erp-control-height-inline: 28px;
    --erp-table-header-height: 40px;
    --erp-table-header-height-dense: 36px;
    --erp-table-header-bg: #f1f5f9;
    --erp-table-header-text: #374151;
    --erp-table-header-border: #e2e8f0;
    --erp-checkbox-size: 19px;
    --erp-checkbox-size-compact: 17px;
    --erp-checkbox-target: 28px;
    --erp-checkbox-border: #8894a4;
    --erp-checkbox-accent: var(--erp-shell-accent, #145aff);
    --erp-account-indent: 18px;
    --erp-focus-ring: 0 0 0 3px rgba(49, 92, 154, .14);
}

html, body {
    background: var(--erp-bg);
    color: var(--erp-text);
    font-family: var(--erp-font, "Segoe UI", Arial, sans-serif);
    font-size: 16px;
    min-height: 100%;
}

body { margin: 0; }
a, .btn-link { color: var(--erp-blue); }
h1:focus { outline: none; }

.content {
    box-sizing: border-box;
    margin: 0;
    max-width: none;
    padding: 14px 24px 40px;
    width: 100%;
}

/* Shared control sizing: one height/padding/radius family for every button and field. */
.btn {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: var(--erp-type-action, .9rem);
    font-weight: var(--erp-weight-action, 600);
    gap: .35rem;
    justify-content: center;
    line-height: var(--erp-leading-action, 1.3);
    min-height: var(--erp-control-height);
    padding: .4rem .9rem;
    transition: background-color 110ms ease, border-color 110ms ease, color 110ms ease, box-shadow 110ms ease;
}

.btn-sm {
    border-radius: 6px;
    font-size: var(--erp-type-action-sm, .82rem);
    min-height: var(--erp-control-height-sm);
    padding: .28rem .65rem;
}

.btn:focus-visible { box-shadow: var(--erp-focus-ring); outline: 0; }
.btn:disabled, .btn.disabled { cursor: not-allowed; opacity: .5; }
.btn-outline-secondary { background: #fff; border-color: #cbd2dc; color: #4b5666; }
.btn-outline-secondary:hover:not(:disabled), .btn-outline-secondary:focus-visible { background: #f1f4f7; border-color: #aeb8c5; color: #26364c; }

.btn-dark, .btn-primary {
    background: var(--erp-dark);
    border-color: var(--erp-dark);
}

.btn-dark:hover, .btn-primary:hover {
    background: #273247;
    border-color: #273247;
}

.btn-outline-dark {
    border-color: #b8c0cc;
    color: #2e394c;
}

.btn-outline-dark:hover {
    background: #eef1f5;
    border-color: #98a2b1;
    color: #172033;
}

.btn-outline-danger {
    border-color: #d6aaaa;
    color: #9a3434;
}

.form-control, .form-select {
    border-color: var(--erp-border-strong);
    border-radius: 7px;
    color: var(--erp-text);
    font-size: var(--erp-type-value, .9rem);
    min-height: var(--erp-control-height);
    padding: .36rem .65rem;
}

.form-control-sm, .form-select-sm {
    border-radius: 6px;
    font-size: var(--erp-type-value, .82rem);
    min-height: var(--erp-control-height-sm);
    padding: .22rem .5rem;
}

textarea.form-control { min-height: 76px; }
.form-control.read-only, .read-only-value {
    align-items: center;
    background: #f3f5f7;
    color: #3f4b5c;
    display: flex;
    min-height: var(--erp-control-height);
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: #7c94b5;
    box-shadow: var(--erp-focus-ring);
}

.form-check-input { cursor: pointer; }

.form-control:disabled, .form-control[readonly] {
    background: #f1f3f6;
    color: #586376;
}

.valid.modified:not([type=checkbox]) { outline: 1px solid #4b8c68; }
.invalid { outline: 1px solid #bb4e4e; }
.validation-message { color: #a23b3b; font-size: var(--erp-type-value, .88rem); margin-top: .25rem; }

/* Page headers stay compact: the topbar already carries the page title and Back. */
.page-header {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 12px;
    min-width: 0;
}

.page-header h1 {
    color: #172033;
    font-size: var(--erp-type-title, 1.35rem);
    font-weight: var(--erp-weight-title, 720);
    letter-spacing: var(--erp-tracking-title, -.01em);
    line-height: var(--erp-leading-title, 1.25);
    margin: 0;
}

.page-header p, .panel-header p, .section-heading p, .mode-heading p {
    color: var(--erp-muted);
    font-size: var(--erp-type-meta, .86rem);
    margin: 3px 0 0;
}

.eyebrow {
    color: #6e7888;
    font-size: var(--erp-type-meta, .66rem);
    font-weight: var(--erp-weight-emphasis, 750);
    letter-spacing: var(--erp-tracking-meta, .1em);
    text-transform: uppercase;
}

.panel {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
    padding: 16px;
}

.panel-header, .section-heading, .mode-heading, .list-toolbar {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.panel-header h2, .section-heading h3, .mode-heading h2, .list-toolbar h2 {
    color: var(--erp-text);
    font-size: var(--erp-type-section, 1.05rem);
    font-weight: var(--erp-weight-section, 720);
    margin: 0;
}

.erp-loading, .product-detail-loading {
    align-items: center;
    color: var(--erp-muted);
    display: flex;
    font-size: var(--erp-type-body, .9rem);
    min-height: 88px;
}

.rkb-link-button, .po-add-note, .po-add-product-inline {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #235f9b;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.3;
    padding: .15rem .3rem;
}
.rkb-link-button:hover, .po-add-note:hover, .po-add-product-inline:hover { background: #eef4fa; text-decoration: none; }

.muted-small {
    color: var(--erp-muted);
    font-size: var(--erp-type-meta, .875rem);
}

.text-link {
    color: #425c83;
    font-size: var(--erp-type-action, .82rem);
    font-weight: var(--erp-weight-emphasis, 650);
    text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

.alert {
    border-radius: 7px;
    font-size: var(--erp-type-body, .88rem);
    margin-bottom: 10px;
    padding: .55rem .8rem;
}
.alert.compact-alert, .compact-alert { font-size: var(--erp-type-body, .82rem); margin: 0 0 10px; padding: .45rem .7rem; }
.product-detail-v2 .alert, .erp-detail-page .alert { margin: 0; }

.form-label,
.form-section label,
.detail-panel label,
.inline-editor label {
    font-size: var(--erp-type-label, .9rem);
}

/* Dashboard */
.dashboard-date {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
}

.dashboard-date span {
    color: var(--erp-muted);
    font-size: var(--erp-type-value, .72rem);
    font-weight: var(--erp-weight-emphasis, 700);
    text-transform: uppercase;
}

.dashboard-date strong { font-size: var(--erp-type-value, .9rem); margin-top: 3px; }

.dashboard-metric-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.dashboard-metric-card {
    align-items: center;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
    display: flex;
    gap: 14px;
    min-height: 104px;
    padding: 17px;
}

.metric-icon {
    align-items: center;
    background: #eef1f5;
    border-radius: 9px;
    color: #4d586a;
    display: flex;
    flex: 0 0 38px;
    font-size: .9rem;
    font-weight: 800;
    height: 38px;
    justify-content: center;
}

.metric-icon.blue { background: #e9f0f9; color: #315c9a; }
.metric-icon.green { background: #e9f4ee; color: #24704a; }
.metric-icon.amber { background: #f8f1e5; color: #9a6418; }
.metric-icon.red { background: #f8ebeb; color: #a23b3b; }

.metric-copy { display: grid; min-width: 0; }
.metric-copy span { color: var(--erp-muted); font-size: var(--erp-type-value, .78rem); font-weight: var(--erp-weight-emphasis, 650); }
.metric-copy strong { font-size: var(--erp-type-kpi, 1.48rem); font-weight: var(--erp-weight-kpi, 750); line-height: var(--erp-leading-kpi, 1.25); margin-top: 2px; }
.metric-copy small { color: #87909e; font-size: var(--erp-type-meta, .73rem); margin-top: 2px; }

.dashboard-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
    margin-top: 16px;
}

.dashboard-panel { min-height: 220px; }
.dashboard-panel.module-overview { grid-column: 1 / 2; }
.dashboard-activity { min-height: 310px; }

.activity-list { margin-top: 13px; }
.activity-item {
    align-items: center;
    border-top: 1px solid #edf0f4;
    display: grid;
    gap: 12px;
    grid-template-columns: 9px 1fr auto;
    padding: 13px 2px;
}

.activity-item:first-child { border-top: 0; }
.activity-item p { color: var(--erp-muted); font-size: var(--erp-type-meta, .8rem); margin: 2px 0 0; }
.activity-item time { color: #808999; font-size: var(--erp-type-meta, .76rem); }

/* Finance foundation */
.finance-shell-grid,
.finance-choice-grid,
.petty-wallet-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.finance-module-card {
    display: grid;
    gap: 6px;
    color: var(--erp-text);
    text-decoration: none;
}

.finance-module-card:hover { border-color: var(--erp-border-strong); color: var(--erp-text); }
.finance-module-card span { color: var(--erp-muted); }
.finance-module-card.muted { background: #f8f9fb; }

.finance-step-shell { display: grid; gap: 16px; }
.finance-steps {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.finance-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: #fff;
    color: var(--erp-muted);
    font-size: var(--erp-type-action, .82rem);
}

.finance-steps li span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #edf0f4;
    font-weight: var(--erp-weight-emphasis, 750);
}

.finance-steps li.active { border-color: #7c94b5; color: var(--erp-text); font-weight: var(--erp-weight-emphasis, 700); }
.finance-steps li.active span { background: var(--erp-dark); color: #fff; }
.finance-steps li.done span { background: #dfeee6; color: var(--erp-green); }

.bill-context-card {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 16px;
}

.bill-context-card div { display: grid; gap: 3px; }
.bill-context-card span { color: var(--erp-muted); font-size: var(--erp-type-value, .75rem); }

.finance-choice-card {
    display: grid;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--erp-border);
    border-radius: 9px;
    background: #fff;
    color: var(--erp-text);
    text-align: left;
    cursor: pointer;
}

.finance-choice-card:hover { border-color: #8ca0bc; background: #fafcff; }
.finance-choice-card span,.finance-choice-card small { color: var(--erp-muted); }
.finance-guided-card { display: grid; gap: 18px; }
.finance-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.finance-form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.finance-form-grid label { display: grid; gap: 6px; font-size: var(--erp-type-label, .88rem); font-weight: var(--erp-weight-label, 650); }
.finance-span-2 { grid-column: span 2; }
.finance-span-3 { grid-column: span 3; }

.choice-row { display: flex !important; align-items: center; gap: 8px; font-weight: var(--erp-weight-medium, 500) !important; }
.upload-box {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px dashed #bdc5d0;
    border-radius: 8px;
    background: #fafbfc;
}
.upload-box small,.upload-box span { color: var(--erp-muted); font-size: var(--erp-type-meta, .8rem); }
.proof-dropzone { border: 2px dashed #b7c7bb; background: #f8fbf8; gap: .55rem; }
.proof-dropzone.drag-active { border-color: #39764a; background: #edf7ef; box-shadow: 0 0 0 3px rgba(57,118,74,.12); }
.validation-checklist { background: #f7faf7; border: 1px solid #dce7de; border-radius: 8px; display: grid; gap: .55rem; padding: .9rem 1rem; }
.validation-checklist > strong { margin-bottom: .1rem; }
.validation-checklist label { align-items: center; display: flex; gap: .55rem; }
.expense-timeline { border-top: 1px solid var(--erp-border); display: grid; gap: .65rem; margin-top: 1rem; padding-top: 1rem; }
.expense-timeline h3 { margin: 0 0 .2rem; }
.expense-timeline > div { display: grid; gap: .6rem; grid-template-columns: 10px 1fr; }
.expense-timeline p { display: grid; gap: .15rem; margin: 0; }
.expense-timeline small { color: var(--erp-muted); }
.timeline-dot { background: #5b8767; border-radius: 50%; height: 8px; margin-top: .4rem; width: 8px; }
.accounting-workspace { min-height: 420px; }
.accounting-editor { border-left: 4px solid #466d50; margin-top: 1rem; }
.coa-table .coa-group { background: #f4f7f5; }
.coa-table .coa-group td { font-weight: var(--erp-weight-emphasis, 600); }
.coa-table .coa-posting .coa-name { font-weight: var(--erp-weight-medium, 500); }
.coa-name { display: inline-block; min-width: 220px; }
.coa-code { display: inline-block; min-width: 115px; }
.tree-mark { color: #7d9082; margin-right: .35rem; }
.row-actions { display: flex; gap: .35rem; white-space: nowrap; }
.check-filter { align-items: center; display: flex !important; flex-direction: row !important; gap: .5rem; padding-top: 1.45rem; }
.accounting-preview { background: #f7faf7; border: 1px solid #d6e4d9; border-left: 4px solid #4e7b59; border-radius: 8px; display: grid; gap: .75rem; margin: 1rem 0; padding: 1rem; }
.accounting-preview > div:first-child { display: grid; gap: .15rem; }
.accounting-preview-lines { display: grid; gap: .45rem; }
.accounting-preview-lines > div { align-items: center; background: white; border: 1px solid #e1e8e2; border-radius: 6px; display: grid; gap: .75rem; grid-template-columns: 70px 1fr auto; padding: .65rem .8rem; }
.accounting-preview-lines span { color: var(--erp-muted); font-size: var(--erp-type-value, .78rem); font-weight: var(--erp-weight-emphasis, 700); text-transform: uppercase; }
.journal-staging-panel { align-items: center; background: #f7f9fb; border: 1px solid #dfe5eb; border-radius: 8px; display: flex; justify-content: space-between; margin: 1rem 0; padding: 1rem; }
.journal-staging-panel > div:first-child { display: grid; gap: .25rem; }
.proof-file-input { padding: .6rem; background: #fff; }
.proof-pending,.proof-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.proof-pending { padding-top: .5rem; border-top: 1px solid var(--erp-border); }
.proof-list { margin-top: 1rem; display: grid; gap: .65rem; }
.proof-list h3 { margin: 0; }
.proof-row { padding: .75rem; border: 1px solid var(--erp-border); border-radius: .65rem; background: #fff; }
.proof-row div:first-child { display: grid; gap: .2rem; }
.proof-row small { color: var(--erp-muted); }
.guided-hints { margin: 1rem 0; padding: .8rem 1rem; border: 1px solid var(--erp-border); border-radius: .65rem; }
.guided-hints summary { cursor: pointer; font-weight: var(--erp-weight-emphasis, 700); }
.guided-hints[open] summary { margin-bottom: .8rem; }
@media (max-width: 720px) { .proof-pending,.proof-row { align-items: stretch; flex-direction: column; } }
.expense-date-group { margin-top: 1rem; border: 1px solid var(--erp-border); border-radius: .7rem; overflow: hidden; }
.expense-date-group > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; background: #f7f9f7; border-bottom: 1px solid var(--erp-border); }
.expense-date-group > header div { display: grid; gap: .15rem; }
.expense-date-group > header small { color: var(--erp-muted); }
.expense-date-group > header > span { font-weight: var(--erp-weight-emphasis, 800); }
.expense-date-group .table { margin-bottom: 0; }
.detail-actions { justify-content: flex-end; margin-bottom: .75rem; }

.finance-document-list { display: grid; gap: 8px; }
.finance-document-list h3 { margin: 0; font-size: var(--erp-type-subsection, 1rem); }
.finance-document-list a {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 12px;
    border: 1px solid var(--erp-border);
    border-radius: 7px;
    color: var(--erp-text);
    text-decoration: none;
}
.finance-document-list a span { color: var(--erp-muted); }

.crosscheck-grid,.finance-review-list {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
}
.crosscheck-grid div,.finance-review-list div {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--erp-border);
    border-radius: 7px;
    background: #fafbfc;
}
.crosscheck-grid span,.finance-review-list dt { color: var(--erp-muted); font-size: var(--erp-type-label, .78rem); }
.finance-review-list { margin: 0; }
.finance-review-list dd { margin: 0; font-weight: var(--erp-weight-emphasis, 650); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.petty-wallet-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    background: #fff;
}
.petty-wallet-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.petty-wallet-card header div { display: grid; }
.petty-wallet-card header span { color: var(--erp-muted); font-size: var(--erp-type-value, .82rem); }
.petty-wallet-card dl { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 0; }
.petty-wallet-card dl div { display: grid; gap: 2px; }
.petty-wallet-card dt { color: var(--erp-muted); font-size: var(--erp-type-label, .75rem); }
.petty-wallet-card dd { margin: 0; font-weight: var(--erp-weight-total, 700); }
.petty-progress { height: 9px; overflow: hidden; border-radius: 99px; background: #e9edf2; }
.petty-progress span { display: block; height: 100%; border-radius: inherit; background: #5479aa; }
.petty-wallet-card > small { color: var(--erp-muted); }
.month-picker { display: grid; gap: 4px; font-size: var(--erp-type-value, .78rem); color: var(--erp-muted); min-width: 170px; }
.request-card-list { display: grid; gap: 14px; }
.request-wide-card { display: grid; gap: 18px; padding: 20px; border: 1px solid var(--erp-border); border-radius: 12px; background: #fff; cursor: pointer; }
.request-wide-card:hover { border-color: var(--erp-border-strong); }
.request-wide-card header,.request-wide-card footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.request-wide-card header div { display: grid; }
.request-wide-card header span,.request-wide-card footer span { color: var(--erp-muted); }
.request-progress { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.request-step { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 3px 8px; color: var(--erp-muted); }
.request-step b { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #edf0f4; }
.request-step span { font-size: var(--erp-type-action, .82rem); font-weight: var(--erp-weight-emphasis, 650); }
.request-step small { font-size: var(--erp-type-meta, .72rem); }
.request-step.done b { background: #dfeee6; color: var(--erp-green); }
.activity-list { display: grid; gap: 8px; }
.activity-list > div { display: grid; grid-template-columns: minmax(160px,1fr) minmax(200px,1fr); gap: 4px 14px; padding: 10px 12px; border-left: 3px solid #d9e1eb; background: #f8fafc; }
.activity-list small { grid-column: 1 / -1; color: var(--erp-muted); }
.journal-placeholder { padding: 12px 14px; border: 1px dashed var(--erp-border-strong); border-radius: 8px; color: var(--erp-muted); background: #fafbfc; }
.finance-review-box { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--erp-border); border-radius: 10px; background: #fafbfc; }
.amount-compact { min-width: 125px; }
.item-total-preview { padding: 10px 12px; border-radius: 8px; background: #f5f7fa; color: var(--erp-muted); }
.fixed-detail-table { table-layout: fixed; min-width: 980px; width: 100%; }
.fixed-detail-table th:nth-child(2),.fixed-detail-table td:nth-child(2) { width: 260px; }
.fixed-detail-table th:nth-child(6),.fixed-detail-table td:nth-child(6) { width: 180px; }
.clamped-description { display: -webkit-box; overflow: hidden; max-width: 100%; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: anywhere; }
.inline-detail summary,.category-items summary { color: #315f91; cursor: pointer; font-size: var(--erp-type-value, .76rem); font-weight: var(--erp-weight-emphasis, 650); }
.inline-detail p { margin: 6px 0 0; padding: 8px; border-radius: 6px; background: #f6f8fa; overflow-wrap: anywhere; white-space: pre-wrap; }
.category-summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 10px; }
.category-summary-grid article { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--erp-border); border-radius: 8px; background: #fafbfc; }
.category-summary-grid span { color: var(--erp-muted); font-size: var(--erp-type-value, .78rem); }
.review-category-table { min-width: 1180px; table-layout: fixed; }
.review-category-table th:first-child,.review-category-table td:first-child { width: 260px; }
.owner-review-text { min-width: 180px; resize: vertical; }
.category-items { max-width: 235px; margin-top: 5px; }
.category-item-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; align-items: start; margin-top: 7px; padding: 9px; border: 1px solid var(--erp-border); border-radius: 7px; background: #fff; overflow-wrap: anywhere; }
.category-item-row div { display: grid; min-width: 0; }
.category-item-row small { color: var(--erp-muted); white-space: pre-wrap; }
.petty-request-grouped-table { width: 100%; min-width: 1180px; table-layout: fixed; }
.petty-request-grouped-table th:nth-child(1) { width: 150px; }
.petty-request-grouped-table th:nth-child(2) { width: 46px; }
.petty-request-grouped-table th:nth-child(3) { width: 260px; }
.petty-request-grouped-table th:nth-child(4) { width: 95px; }
.petty-request-grouped-table th:nth-child(5),.petty-request-grouped-table th:nth-child(6) { width: 135px; }
.petty-request-grouped-table th:nth-child(7) { width: 210px; }
.petty-request-grouped-table td { vertical-align: top; overflow-wrap: anywhere; }
.petty-category-heading th { padding: 12px 14px; background: #edf3f9; border-top: 2px solid #b9cbe0; color: #254d78; }
.petty-category-heading strong,.petty-category-heading span,.petty-category-heading small { margin-right: 12px; }
.petty-category-heading small { color: var(--erp-muted); font-weight: var(--erp-weight-medium, 500); }
.petty-category-cell { color: var(--erp-muted); font-size: var(--erp-type-value, .78rem); }
.petty-category-total td { background: #f7f9fc; border-bottom: 2px solid #cbd6e3; }
.petty-grand-total td { background: #e8f0f8; color: #173d66; font-size: var(--erp-type-total, 1rem); }
.grouped-text-input { min-width: 0; resize: vertical; }
.grouped-category-select { min-width: 150px; }
.petty-request-grouped-table.owner-review { min-width: 980px; }
.petty-request-grouped-table.owner-review th:nth-child(3) { width: 220px; }
.petty-request-grouped-table.owner-review th:nth-child(7) { width: 160px; }
.category-approval-editor { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.category-approval-editor label { display: grid; gap: 4px; color: var(--erp-muted); font-size: var(--erp-type-label, .76rem); }
.category-approval-editor label { width: 145px; }
.petty-review-modal { width: min(620px,calc(100vw - 32px)); display: grid; gap: 14px; }
.review-amount-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.review-amount-summary div { display: grid; gap: 3px; padding: 10px; border-radius: 8px; background: #f5f7fa; }
.review-amount-summary span { color: var(--erp-muted); font-size: var(--erp-type-value, .76rem); }
.carryover-panel { display: grid; gap: 12px; padding: 16px; border: 1px solid #cfd9e7; border-radius: 10px; background: #f7faff; }
.carryover-panel h3,.finance-review-box h3 { margin: 0; font-size: var(--erp-type-subsection, 1rem); }
.carryover-values { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.carryover-values > div,.carryover-values > label { display: grid; gap: 4px; align-content: start; padding: 10px; border-radius: 7px; background: #fff; }
.carryover-values span,.carryover-values label { color: var(--erp-muted); font-size: var(--erp-type-label, .76rem); }

@media (max-width: 900px) {
    .carryover-values { grid-template-columns: 1fr 1fr; }
}

@media(max-width:900px) {
    .finance-steps { grid-template-columns: 1fr; }
    .bill-context-card,.finance-form-grid.three,.crosscheck-grid,.finance-review-list { grid-template-columns: 1fr 1fr; }
    .finance-span-3 { grid-column: span 2; }
}

@media(max-width:620px) {
    .bill-context-card,.finance-form-grid,.finance-form-grid.three,.crosscheck-grid,.finance-review-list { grid-template-columns: 1fr; }
    .finance-span-2,.finance-span-3 { grid-column: auto; }
}
.activity-dot { background: #8093ad; border-radius: 50%; height: 7px; width: 7px; }

.status-summary-list { margin-top: 12px; }
.status-summary-list > div {
    align-items: center;
    border-top: 1px solid #edf0f4;
    display: flex;
    justify-content: space-between;
    padding: 15px 1px;
}
.status-summary-list > div:first-child { border-top: 0; }
.status-summary-list span { color: var(--erp-muted); }
.status-summary-list strong { font-size: var(--erp-type-summary, 1.2rem); }

.module-status-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.module-status {
    background: #fafbfc;
    border: 1px solid #e8ebef;
    border-radius: 8px;
    color: var(--erp-text);
    display: grid;
    padding: 14px;
    text-decoration: none;
}

.module-status.ready:hover { border-color: #b8c5d6; }
.module-status span { color: #7b8492; font-size: var(--erp-type-badge, .68rem); font-weight: var(--erp-weight-emphasis, 750); text-transform: uppercase; }
.module-status strong { margin-top: 3px; }
.module-status small { color: var(--erp-muted); margin-top: 4px; }

.operational-note {
    align-items: flex-start;
    background: #f7f9fb;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    display: flex;
    gap: 11px;
    margin-top: 12px;
    padding: 13px;
}

.operational-note.warning { background: #fbf8f1; border-color: #eee1c8; }
.operational-note p { color: var(--erp-muted); font-size: var(--erp-type-meta, .8rem); margin: 3px 0 0; }
.note-icon {
    align-items: center;
    background: #e6ebf1;
    border-radius: 50%;
    display: flex;
    flex: 0 0 24px;
    font-size: .75rem;
    font-weight: 800;
    height: 24px;
    justify-content: center;
}

/* Tables, badges, filters */
.erp-table { font-size: var(--erp-table-value-size, .93rem); margin-bottom: 0; width: 100%; }
.erp-table th {
    background: var(--erp-table-header-bg);
    border-bottom: 1px solid var(--erp-table-header-border);
    color: var(--erp-table-header-text);
    font-size: var(--erp-type-table-heading, .78rem);
    font-weight: var(--erp-weight-emphasis, 750);
    letter-spacing: var(--erp-tracking-table-heading, .045em);
    padding: .78rem .85rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.erp-table td {
    border-color: #edf0f3;
    color: #303b4d;
    padding: .78rem .85rem;
    vertical-align: middle;
}

.erp-table tbody tr:hover { background: #fafbfc; }
.erp-table.compact { font-size: var(--erp-table-value-size, .9rem); }
.erp-table td small { color: var(--erp-muted); display: block; font-size: var(--erp-type-meta, .82rem); margin-top: 2px; }

.universal-table-wrap { max-height: none; overflow-x: auto; overflow-y: hidden; width: 100%; }
.universal-table { table-layout: auto; width: max-content; }
.petty-cash-wallet-table { min-width: 1290px; }
.petty-cash-request-table { min-width: 1550px; }
.universal-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    min-width: 96px;
}
.universal-table th[data-column] { position: sticky; }
.universal-table th,.universal-table td { box-sizing: border-box; white-space: nowrap; }
.universal-table .numeric-cell { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.universal-table .date-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
.universal-table .action-cell { text-align: right; white-space: nowrap; }
.universal-table .table-group-row td {
    background: #f2f5f8;
    border-bottom-color: #dfe4e9;
    color: #4d596b;
    font-size: var(--erp-type-value, .8rem);
    font-weight: var(--erp-weight-emphasis, 750);
    letter-spacing: var(--erp-tracking-value, .025em);
    padding-block: .58rem;
}

/* RKB table behavior should follow docs/RKB_UNIVERSAL_DATA_TABLE_UX_STANDARD_V1.md.
   Do not create one-off table resize/reorder/sticky behavior unless unavoidable. */
.rkb-table-shell,
.rkb-table-wrap { box-sizing: border-box; max-width: 100%; min-width: 0; width: 100%; }
.rkb-table-wrap { overflow-x: auto !important; overscroll-behavior-inline: contain; }
.rkb-table-wrap,
.universal-table-wrap,
.product-table-wrap { position: relative; }
.rkb-column-chooser { display: inline-flex; flex: 0 0 auto; position: relative; z-index: 20; }
#rkb-overlay-root { inset: 0; overflow: visible; pointer-events: none; position: fixed; z-index: 1040; }
#rkb-overlay-root > *, .rkb-anchored-overlay { pointer-events: auto; }
.rkb-anchored-overlay { box-sizing: border-box; max-width: calc(100vw - 16px); overflow-x: hidden; overflow-y: auto; z-index: 1040 !important; }
.rkb-column-chooser-button { align-items: center; background: rgba(255,255,255,.94); border: 1px solid #cbd5df; border-radius: 5px; color: #40566a; display: inline-flex; height: 27px; justify-content: center; padding: 0; width: 29px; }
.rkb-column-chooser-button:hover,.rkb-column-chooser-button:focus-visible { background: #edf4fa; border-color: #7fa6c7; color: #255d91; outline: none; }
.rkb-column-chooser-button svg { fill: currentColor; height: 16px; width: 16px; }
.rkb-column-chooser-popover { background: #fff; border: 1px solid #cbd5df; border-radius: 7px; box-shadow: 0 8px 22px rgba(25,45,65,.16); display: grid; gap: 3px; max-height: min(360px,calc(100vh - 16px)); min-width: 220px; overflow-y: auto; padding: 9px; position: fixed; z-index: 1040; }
.rkb-column-chooser-popover[hidden] { display: none; }
.rkb-column-chooser-popover > strong { border-bottom: 1px solid #e2e8ee; font-size: var(--erp-type-subsection, .79rem); margin-bottom: 3px; padding: 1px 3px 6px; }
.rkb-column-chooser-popover label { align-items: center; cursor: pointer; display: flex; font-size: var(--erp-type-label, .78rem); gap: 7px; min-height: 27px; padding: 3px; }
.rkb-column-chooser-popover label:hover { background: #f3f6f8; }
.rkb-column-chooser-popover label:has(input:disabled) { cursor: default; color: #71808e; }
.rkb-column-chooser-lock { color: #71808e; font-size: var(--erp-type-value, .66rem); margin-left: auto; text-transform: uppercase; }
.rkb-column-chooser-control-row { align-items: center; display: flex; justify-content: flex-end; min-height: 34px; padding-top: 6px; }
.rkb-column-chooser-anchor { align-items: center; display: inline-flex; flex: 0 0 auto; }
.rkb-column-chooser-slot { display:inline-flex; align-items:center; justify-content:center; width:32px; min-width:32px; flex:0 0 32px; min-height:var(--erp-control-height-sm,28px); }
/* Only the real local-preference read gates managed content; catch paths render defaults. */
table[data-rkb-preferences-ready="false"] { visibility:hidden; }
.po-status-filter-field { color: #586477; display: grid; font-size: var(--erp-type-value, .78rem); font-weight: var(--erp-weight-emphasis, 650); gap: 5px; position: relative; }
.po-status-multiselect { max-width: 18rem; position: relative; width: 100%; }
.po-status-multiselect > summary { align-items: center; cursor: pointer; display: flex; font-weight: var(--erp-weight-regular, 400); justify-content: space-between; list-style: none; min-height: 31px; }
.po-status-multiselect > summary::-webkit-details-marker { display: none; }
.po-status-options { background: #fff; border: 1px solid #cfd6de; border-radius: 6px; box-shadow: 0 8px 20px rgba(28,40,55,.14); display: grid; gap: 2px; left: 0; max-width: min(22rem,calc(100vw - 32px)); min-width: 0; padding: 6px; position: absolute; top: calc(100% + 3px); width: 220px; z-index: 1040; }
.po-status-options .rkb-checklist-option { align-items: center; appearance: none; background: transparent; border: 0; border-radius: 4px; color: #34465a; cursor: pointer; display: flex; font: inherit; font-size: var(--erp-type-value, .8rem); font-weight: var(--erp-weight-regular, 400); gap: 8px; margin: 0; min-height: 28px; padding: 3px 5px; text-align: left; white-space: nowrap; width: 100%; }
.po-status-options .rkb-checklist-option:hover,
.po-status-options .rkb-checklist-option:focus-visible { background: #f1f5f8; outline: 2px solid #89add1; outline-offset: -2px; }
.po-status-options .rkb-checklist-option input[type="checkbox"] { flex: 0 0 16px; height: 16px; margin: 0; pointer-events: none; width: 16px; }
.po-status-options .rkb-checklist-option span { min-width: 0; }
.rkb-table-foundation th[hidden],.rkb-table-foundation td[hidden] { display: none !important; }
.rkb-table-toolbar { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.rkb-data-table { box-sizing: border-box; max-width: none; }
/* Product/Supplier main lists retain their proven specialized balanced adapter.
   Every other shared foundation table uses fixed layout after JS assigns the
   current auto/manual widths so header and body columns cannot drift. */
.rkb-table-foundation:not(.product-master-v2-table) { min-width: 0; table-layout: fixed; width: max-content; }
/* Text containment is unconditional. Auto mode and Reset Kolom must be just as
   safe as manual mode: no cell may paint into its neighbour while canonical
   widths are being applied. */
.rkb-table-foundation th,
.rkb-table-foundation td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rkb-table-foundation th > *,
.rkb-table-foundation td > * { max-width: 100%; min-width: 0; }
/* Inline search/editor popups intentionally escape their cell while active;
   their controls remain width-bound and ordinary read-only cells stay clipped. */
.rkb-table-foundation .po-inline-editor-row > td { overflow: visible; }
.rkb-table-foundation .po-inline-editor-row > td.read-only { overflow: hidden; }
.rkb-table-compact th,
.rkb-table-compact td { padding-block: .46rem; }
.rkb-table-sticky thead th { position: sticky; top: 0; z-index: 2; }
.rkb-table-resizable thead th[data-column] { position: sticky; }
/* Advanced operational lists (Product, Supplier, Lokasi, PO) share one header/checkbox/row language.
   Their frozen header is the fixed clone host, so the in-table header stays in normal flow. */
.rkb-table-advanced thead th,
.rkb-table-advanced th[data-column] { background: #eef2f6; color: #26364c; cursor: grab; font-size: var(--erp-type-table-heading, .9rem); letter-spacing: 0; position: relative; text-transform: none; top: auto; z-index: 12; }
.rkb-table-advanced thead th:active { cursor: grabbing; }
.rkb-table-advanced .product-select-column { cursor: default !important; }
.rkb-table-advanced input[type="checkbox"],
.product-master-sticky-header-host input[type="checkbox"] { cursor: pointer; height: 19px; margin: 0; min-height: 19px; min-width: 19px; vertical-align: middle; width: 19px; }
.rkb-table-advanced .table-column-resizer::after { background: transparent; bottom: 4px; content: ""; position: absolute; right: 6px; top: 4px; transition: background-color 120ms ease, width 120ms ease; width: 1px; }
.rkb-table-advanced thead th:hover .table-column-resizer::after,
.rkb-table-advanced .table-column-resizer:hover::after { background: #4777aa; width: 3px; }
.rkb-table-advanced tbody td { font-size: var(--erp-table-value-size, .9rem); }
.rkb-data-table .table-column-resizer::after { background: transparent; transition: background-color 120ms ease, width 120ms ease; }
.rkb-data-table thead th:hover > .table-column-resizer::after,
.rkb-data-table thead th.rkb-column-hover > .table-column-resizer::after,
.rkb-data-table .table-column-resizer:hover::after,
.rkb-data-table.column-resizing .table-column-resizer::after { background: #4777aa; width: 3px; }
.table-sort-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    font: inherit;
    gap: .35rem;
    letter-spacing: inherit;
    padding: 0 12px 0 0;
    text-align: left;
    text-transform: inherit;
    width: 100%;
}
.table-sort-button:hover { color: var(--erp-table-header-text); }
.text-end > .table-sort-button { justify-content: flex-end; text-align: right; }
.sort-indicator { color: var(--erp-shell-accent); font-size: .72rem; min-width: .7rem; }
.table-column-resizer {
    bottom: 0;
    cursor: col-resize;
    position: absolute;
    right: -6px;
    top: 0;
    touch-action: none;
    width: 13px;
    z-index: 4;
}
.table-column-resizer::after {
    background: transparent;
    bottom: 20%;
    content: "";
    position: absolute;
    right: 6px;
    top: 20%;
    width: 1px;
}
.table-column-resizer:hover::after,
.column-resizing .table-column-resizer::after { background: #7895b5; }
.rkb-table-reorderable th:has(> .rkb-column-grip) { position: relative; padding-right: 30px; }
.rkb-column-grip { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); width: 16px; height: 20px; display: grid; place-items: center; cursor: grab; color: #65758a; opacity: .55; }
.rkb-column-grip svg { display: block; width: 8px; height: 14px; pointer-events: none; }
.rkb-column-grip:is(:hover,:focus-visible) { color: var(--erp-shell-accent); opacity: 1; }
.rkb-column-grip:active { cursor: grabbing; }
.column-resizing { cursor: col-resize; user-select: none; }
.table-toolbar { align-items: end; display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.table-toolbar label { color: var(--erp-muted); display: grid; font-size: var(--erp-type-label, .78rem); font-weight: var(--erp-weight-label, 700); gap: 5px; }
.table-primary { color: #26364c; display: block; font-weight: var(--erp-weight-emphasis, 750); }
.table-secondary { color: var(--erp-muted); display: block; font-size: var(--erp-type-value, .8rem); margin-top: 2px; }
.erp-table td.table-cell-warning {
    background: #fff4cf;
    box-shadow: inset 3px 0 0 #d8a72d;
    color: #644b0b;
    font-weight: var(--erp-weight-emphasis, 700);
}
.erp-table td.table-cell-danger {
    background: #fde4e2;
    box-shadow: inset 3px 0 0 #cf5b54;
    color: #7a2925;
    font-weight: var(--erp-weight-emphasis, 700);
}
.coa-filter-grid,.coa-editor-grid { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.coa-filter-grid { grid-template-columns: repeat(5,minmax(150px,1fr)); margin-bottom: 12px; }
.coa-filter-grid label,.coa-editor-grid label,.parent-search-box label { color: var(--erp-muted); display: grid; font-size: var(--erp-type-label, .8rem); font-weight: var(--erp-weight-label, 700); gap: 5px; }
.coa-tag-filters { margin-bottom: 12px; }
.coa-table-wrap { max-height: none; }
.coa-simple-filters { align-items: end; display: grid; gap: 14px; grid-template-columns: minmax(260px,2fr) minmax(210px,1fr) auto; margin-bottom: 14px; }
.coa-simple-filters > label:not(.check-filter) { color: var(--erp-muted); display: grid; font-size: var(--erp-type-label, .8rem); font-weight: var(--erp-weight-label, 700); gap: 5px; }
.coa-master-table { min-width: 980px; }
.coa-parent-row { background: #f8fafc; }
.coa-tree-value { display: inline-flex; gap: 6px; min-width: 100%; }
.coa-parent-value { color: #28384c; font-weight: var(--erp-weight-emphasis, 750); }
.coa-row-action { align-items: center; display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.account-type-badge { background: #edf3f8; border: 1px solid #d8e3ed; border-radius: 6px; color: #36536f; display: inline-flex; font-size: var(--erp-type-badge, .78rem); font-weight: var(--erp-weight-badge, 750); padding: .25rem .48rem; }
.coa-balance-note { border-top: 1px solid var(--erp-border); color: var(--erp-muted); font-size: var(--erp-type-meta, .84rem); margin: 16px 0 0; padding-top: 12px; }
.coa-editor-page { display: grid; gap: 22px; max-width: 1100px; }
.coa-span-2 { grid-column: span 2; }
.coa-form-section { border-top: 1px solid var(--erp-border); display: grid; gap: 14px; padding-top: 20px; }
.coa-form-section h2 { font-size: var(--erp-type-section, 1rem); margin: 0 0 3px; }
.coa-form-section p { color: var(--erp-muted); margin: 0; }
.coa-option-grid { align-items: center; display: flex; flex-wrap: wrap; gap: 18px; }
.coa-option-grid > label:not(.check-filter) { color: var(--erp-muted); display: grid; font-size: var(--erp-type-label, .8rem); font-weight: var(--erp-weight-label, 700); gap: 5px; min-width: 170px; }
.parent-search-box { display: grid; gap: 10px; max-width: 760px; }
.parent-search-results { background: #fff; border: 1px solid var(--erp-border); border-radius: 9px; display: grid; max-height: 330px; overflow-y: auto; }
.parent-search-results > button { background: #fff; border: 0; border-bottom: 1px solid #edf0f3; color: #303b4d; display: grid; gap: 2px; padding: .72rem .85rem; text-align: left; }
.parent-search-results > button:hover { background: #f5f8fb; }
.parent-search-results > button span,.parent-search-results > button small { color: var(--erp-muted); font-size: var(--erp-type-meta, .8rem); }
.selected-parent { align-items: center; background: #f4f7fa; border: 1px solid #dce4eb; border-radius: 9px; display: grid; gap: 3px; grid-template-columns: 1fr auto; padding: .75rem .85rem; }
.selected-parent span { color: var(--erp-muted); font-size: var(--erp-type-value, .76rem); grid-column: 1; }
.selected-parent strong { grid-column: 1; }
.selected-parent button { grid-column: 2; grid-row: 1 / span 2; }
.coa-active-toggle { align-content: center; }
.coa-active-toggle small { color: var(--erp-muted); display: block; font-weight: var(--erp-weight-regular, 400); margin-left: 24px; }
.coa-access-grid { display: grid; gap: 18px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.coa-access-grid > div > label { color: var(--erp-muted); display: grid; font-size: var(--erp-type-label, .8rem); font-weight: var(--erp-weight-label, 700); gap: 5px; }
.coa-access-options { border: 1px solid var(--erp-border); border-radius: 8px; display: grid; margin-top: 8px; max-height: 250px; overflow-y: auto; }
.coa-access-options > label { align-items: start; border-bottom: 1px solid #edf0f3; cursor: pointer; display: grid; gap: 8px; grid-template-columns: auto 1fr; padding: 9px 10px; }
.coa-access-options > label:last-child { border-bottom: 0; }
.coa-access-options > label:hover { background: #f7f9fb; }
.coa-access-options strong,.coa-access-options small { display: block; }
.coa-access-options small { color: var(--erp-muted); font-size: var(--erp-type-meta, .74rem); margin-top: 2px; }
@media(max-width:900px){.coa-filter-grid,.coa-simple-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.coa-editor-grid,.coa-access-grid{grid-template-columns:1fr}.coa-span-2{grid-column:auto}}

/* Kas & Bank */
.cash-bank-workspace,.cash-bank-editor { display: grid; gap: 18px; }
.cash-bank-filter-row { align-items: end; display: grid; gap: 12px; grid-template-columns: 180px 190px minmax(280px,1fr); }
.cash-bank-filter-row label,.cash-bank-editor-grid label { color: var(--erp-muted); display: grid; font-size: var(--erp-type-label, .8rem); font-weight: var(--erp-weight-label, 700); gap: 5px; }
.cash-bank-table { min-width: 1260px; }
.cash-bank-editor { max-width: 1180px; }
.cash-bank-editor-grid { display: grid; gap: 14px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.cash-bank-span-2 { grid-column: span 2; }
.cash-bank-form-section { border-top: 1px solid var(--erp-border); display: grid; gap: 12px; padding-top: 18px; }
.cash-bank-form-section h3 { font-size: var(--erp-type-subsection, 1rem); margin: 0 0 3px; }
.cash-bank-form-section p { color: var(--erp-muted); margin: 0; }
.cash-bank-search-results { border: 1px solid var(--erp-border); border-radius: 8px; display: grid; max-height: 280px; overflow-y: auto; }
.cash-bank-search-results button { background: #fff; border: 0; border-bottom: 1px solid #edf0f3; color: #303b4d; display: grid; gap: 2px; padding: 10px 12px; text-align: left; }
.cash-bank-search-results button:last-child { border-bottom: 0; }
.cash-bank-search-results button:hover,.cash-bank-search-results button:focus { background: #f4f7fa; outline: 0; }
.cash-bank-search-results small { color: var(--erp-muted); }
.cash-bank-lines { min-width: 850px; }
.cash-bank-lines td:nth-child(2) { min-width: 180px; }
@media(max-width:900px){.cash-bank-filter-row,.cash-bank-editor-grid{grid-template-columns:1fr}.cash-bank-span-2{grid-column:auto}}

.status-badge, .warning-badge, .urgency-badge {
    border: 1px solid transparent;
    border-radius: 4px;
    display: inline-flex;
    font-size: var(--erp-type-badge, .72rem);
    font-weight: var(--erp-weight-badge, 700);
    line-height: var(--erp-leading-badge, 1.3);
    padding: .23rem .56rem;
    white-space: nowrap;
}

.status-draft, .neutral { background: #f0f2f5; border-color: #e0e4e9; color: #596476; }
.status-submitted { background: #ebf1f9; border-color: #d7e2f0; color: #315c9a; }
.status-financeprocessing { background: #f8f1e5; border-color: #eedfbe; color: #8b5d19; }
.status-revisionrequested { background: #faf0e9; border-color: #efd9c8; color: #9a572a; }
.status-ownerreview { background: #f0edf8; border-color: #dfd7ee; color: #69518d; }
.status-approved, .status-approvedwithreduction, .status-active, .status-bdclimitupdated { background: #eaf4ee; border-color: #d3e7db; color: #24704a; }
.status-rejected { background: #f8ebeb; border-color: #edd2d2; color: #a23b3b; }
.status-closed { background: #e9ecf0; border-color: #d9dde3; color: #3c4656; }
.status-badge.blue { background: #ebf1f9; border-color: #d7e2f0; color: #315c9a; }
.status-badge.green { background: #eaf4ee; border-color: #d3e7db; color: #24704a; }
.status-badge.amber { background: #f8f1e5; border-color: #eedfbe; color: #8b5d19; }
.status-badge.red { background: #f8ebeb; border-color: #edd2d2; color: #a23b3b; }

.urgency-badge { background: #f1f3f6; border-color: #e1e5ea; color: #626d7e; }
.urgency-badge.urgent { background: #f8ebeb; border-color: #edd2d2; color: #a23b3b; }

.warning-count {
    align-items: center;
    background: #f1f3f6;
    border: 1px solid #e1e5ea;
    border-radius: 999px;
    color: #566173;
    display: inline-flex;
    font-size: var(--erp-type-badge, .74rem);
    font-weight: var(--erp-weight-emphasis, 700);
    justify-content: center;
    min-width: 28px;
    padding: .2rem .45rem;
}

.tab-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.tab-button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #667184;
    font-size: var(--erp-type-tab, .8rem);
    font-weight: var(--erp-weight-emphasis, 650);
    min-height: var(--erp-control-height-sm);
    padding: .3rem .65rem;
}
.tab-button:hover { background: #f0f2f5; }
.tab-button.active { background: #e9edf2; color: #1e293b; }

.empty-state {
    border: 1px dashed #ccd2db;
    border-radius: 8px;
    color: var(--erp-muted);
    font-size: var(--erp-type-body, .88rem);
    padding: 24px;
    text-align: center;
}
.compact-empty { display: grid; gap: 3px; margin: 12px; padding: 20px; }

/* Petty cash */
.compact-metrics { margin-bottom: 16px; }
.request-list-panel { padding: 0; overflow: hidden; }
.list-toolbar { border-bottom: 1px solid var(--erp-border); padding: 18px 20px; }
.list-toolbar p { color: var(--erp-muted); font-size: var(--erp-type-meta, .8rem); margin: 3px 0 0; }
.request-table { min-width: 1040px; }
.request-table .amount-cell { font-weight: var(--erp-weight-emphasis, 700); white-space: nowrap; }

.mode-page { display: grid; gap: 14px; }
.mode-heading { margin-bottom: 2px; }
.mode-heading h2 { font-size: var(--erp-type-section, 1.45rem); margin-top: 6px; }
.mode-heading-actions { align-items: center; display: flex; gap: 9px; }
.back-link {
    background: transparent;
    border: 0;
    color: #647084;
    font-size: var(--erp-type-action, .8rem);
    font-weight: var(--erp-weight-emphasis, 650);
    padding: 0;
}
.back-link:hover { color: #263246; text-decoration: underline; }

.form-section, .detail-section, .progress-panel { padding: 16px; }
.section-heading { align-items: flex-start; justify-content: flex-start; margin-bottom: 17px; }
.section-heading > span {
    align-items: center;
    background: #eef1f5;
    border-radius: 7px;
    color: #677386;
    display: flex;
    flex: 0 0 30px;
    font-size: var(--erp-type-value, .68rem);
    font-weight: var(--erp-weight-emphasis, 750);
    height: 30px;
    justify-content: center;
}
.section-heading.with-action { display: grid; grid-template-columns: 30px 1fr auto; }

.form-grid {
    display: grid;
    gap: 12px 14px;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}
.two-column-form, .form-panel-narrow .form-grid { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
.rkb-form-panels-align-start { align-items: start; }
@media (max-width: 980px) {
    .rkb-operational-ui .rkb-procurement-cost-workspace .rkb-form-panels-align-start,
    .rkb-operational-ui .rkb-procurement-cost-workspace .rkb-form-panels-align-start .form-grid.two-column-form {
        grid-template-columns: minmax(0, 1fr);
    }
}
.form-grid > label, .form-grid > .form-field,
.form-section label, .detail-panel label, .inline-editor label {
    color: #586477;
    display: grid;
    font-size: var(--erp-type-label, .8rem);
    font-weight: var(--erp-weight-label, 650);
    gap: 5px;
    min-width: 0;
}
.form-grid > label > .form-control, .form-grid > label > .form-select, .form-grid > label > input, .form-grid > label > textarea, .form-grid > label > .rkb-search-select { color: var(--erp-text); font-weight: var(--erp-weight-value, 400); }

.line-editor {
    align-items: end;
    background: #fafbfc;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1.1fr .75fr .85fr 1.25fr .55fr auto;
    margin-bottom: 9px;
    padding: 12px;
}

.check-row { align-items: center !important; display: flex !important; gap: 7px !important; min-height: 40px; }
.total-strip {
    background: #f5f7f9;
    border: 1px solid #e3e7ed;
    border-radius: 8px;
    display: flex;
    gap: 36px;
    justify-content: flex-end;
    margin-top: 12px;
    padding: 12px 15px;
}
.total-strip > div { display: grid; text-align: right; }
.total-strip span { color: var(--erp-muted); font-size: var(--erp-type-value, .72rem); }
.total-strip strong { font-size: var(--erp-type-total, .98rem); }

.attachment-placeholder {
    background: #f8f9fb;
    border: 1px dashed #c8ced7;
    border-radius: 8px;
    color: #586477;
    padding: 14px;
}
.attachment-placeholder p { color: var(--erp-muted); margin: 3px 0 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding-top: 3px; }

.detail-layout { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    margin: 0;
}
.detail-list dt, .detail-list dd { border-bottom: 1px solid #edf0f3; margin: 0; padding: 9px 2px; }
.detail-list dt { color: var(--erp-muted); font-weight: var(--erp-weight-medium, 500); }
.detail-list dd { color: #2d394b; font-weight: var(--erp-weight-emphasis, 600); }

.lock-note {
    border-radius: 8px;
    font-size: var(--erp-type-meta, .8rem);
    margin-top: 14px;
    padding: 10px 12px;
}
.lock-note.editable { background: #edf6f1; border: 1px solid #d5e9dc; color: #286746; }
.lock-note.locked { background: #f4f5f7; border: 1px solid #e2e5e9; color: #5b6678; }

.warning-line {
    align-items: flex-start;
    border: 1px solid;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    margin-top: 9px;
    padding: 11px 12px;
}
.warning-line strong { font-size: var(--erp-type-value, .73rem); text-transform: uppercase; }
.warning-line span { color: #4e5a6c; }
.warning-line.low { background: #edf4f8; border-color: #d7e5ec; }
.warning-line.medium { background: #faf5ea; border-color: #eee1c5; }
.warning-line.high { background: #faeeee; border-color: #eed2d2; }

.action-row, .action-row > div { display: flex; flex-wrap: wrap; gap: 7px; }

.progress-steps {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(6, 1fr);
    margin-top: 5px;
}
.progress-step { color: #8b94a3; position: relative; text-align: center; }
.progress-step::before {
    background: #e2e6eb;
    content: "";
    height: 2px;
    left: -50%;
    position: absolute;
    right: 50%;
    top: 15px;
}
.progress-step:first-child::before { display: none; }
.progress-step span {
    align-items: center;
    background: #edf0f3;
    border: 3px solid white;
    border-radius: 50%;
    display: inline-flex;
    font-size: var(--erp-type-action, .68rem);
    font-weight: var(--erp-weight-emphasis, 750);
    height: 31px;
    justify-content: center;
    position: relative;
    width: 31px;
    z-index: 1;
}
.progress-step small { display: block; font-size: var(--erp-type-meta, .68rem); margin-top: 5px; }
.progress-step.done span, .progress-step.current span { background: #39475b; color: white; }
.progress-step.done::before, .progress-step.current::before { background: #8390a1; }

.timeline { display: grid; margin-top: 3px; }
.timeline-item {
    display: grid;
    gap: 12px;
    grid-template-columns: 14px 1fr;
    padding-bottom: 16px;
    position: relative;
}
.timeline-item::before {
    background: #dde2e8;
    bottom: 0;
    content: "";
    left: 5px;
    position: absolute;
    top: 10px;
    width: 1px;
}
.timeline-item:last-child::before { display: none; }
.timeline-marker {
    background: #77869a;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #b9c1cc;
    height: 11px;
    margin-top: 3px;
    position: relative;
    width: 11px;
    z-index: 1;
}
.timeline-item strong { display: block; }
.timeline-item div > span { color: var(--erp-muted); display: block; font-size: var(--erp-type-meta, .77rem); margin-top: 2px; }
.timeline-item p { color: #4f5a6b; margin: 5px 0 0; }

/* Product Master alignment */
.product-filter-panel { padding: 17px; }
.product-filter-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(260px, 2fr) repeat(4, minmax(125px, 1fr)) auto;
}
.product-filter-grid label, .inline-editor label {
    color: #657083;
    display: grid;
    font-size: var(--erp-type-label, .7rem);
    font-weight: var(--erp-weight-label, 700);
    gap: 4px;
    text-transform: uppercase;
}
.product-table { min-width: 1050px; }
.pager { align-items: center; display: flex; gap: 12px; justify-content: flex-end; margin-top: 14px; }
.form-panel-narrow { max-width: 940px; }
.product-detail-grid { display: grid; grid-template-columns: 170px minmax(220px, 1fr) 170px minmax(220px, 1fr); margin: 12px 0 0; }
.product-detail-grid dt, .product-detail-grid dd { border-bottom: 1px solid #edf0f3; margin: 0; padding: 9px 7px; }
.product-detail-grid dt { color: #6e7889; font-size: var(--erp-type-label, .72rem); text-transform: uppercase; }
.activation-row { align-items: center; display: flex; gap: 9px; margin-top: 14px; max-width: 760px; }
.inline-editor {
    align-items: end;
    background: #f8f9fb;
    border: 1px solid #e3e7ed;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 2fr 1fr 2fr auto auto;
    margin: 14px 0;
    padding: 13px;
}
.band-editor { grid-template-columns: repeat(6, minmax(105px, 1fr)) auto auto; }
.audit-value { max-width: 260px; overflow-wrap: anywhere; }

/* Login */
.login-shell { display: grid; min-height: 72vh; place-items: center; }
.login-panel { max-width: 430px; padding: 28px; width: 100%; }
.login-panel h1 { font-size: var(--erp-type-title, 1.65rem); font-weight: var(--erp-weight-title, 750); margin: 5px 0; }
.signed-in-user { display: grid; line-height: var(--erp-leading-value, 1.15); padding-right: 3px; }
.signed-in-user span { color: #818a98; font-size: var(--erp-type-value, .65rem); font-weight: var(--erp-weight-emphasis, 700); text-transform: uppercase; }
.signed-in-user strong { font-size: var(--erp-type-value, .82rem); margin-top: 2px; }
.signed-in-user small { color: #697589; font-size: var(--erp-type-meta, .68rem); margin-top: 3px; }

/* Purchasing authority and request foundation */
.page-header-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prototype-label {
    background: #f4f6f8;
    border: 1px solid #dfe4ea;
    border-radius: 5px;
    color: #657083;
    display: inline-flex;
    font-size: var(--erp-type-badge, .63rem);
    font-weight: var(--erp-weight-badge, 800);
    letter-spacing: var(--erp-tracking-badge, .055em);
    padding: .3rem .52rem;
    text-transform: uppercase;
}

.login-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(360px, 430px) minmax(380px, 520px);
    justify-content: center;
    max-width: 980px;
    width: 100%;
}

.authority-login-shell { padding: 28px 16px; }
.authority-test-panel { padding: 24px; }
.authority-test-panel h2 { font-size: var(--erp-type-section, 1.05rem); margin: 10px 0 4px; }
.authority-test-panel > p { color: var(--erp-muted); font-size: var(--erp-type-meta, .79rem); line-height: var(--erp-leading-meta, 1.55); margin-bottom: 14px; }
.authority-account-list { display: grid; gap: 5px; }
.authority-account {
    align-items: center;
    border: 1px solid #e5e8ed;
    border-radius: 6px;
    color: #263247;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    text-decoration: none;
}
.authority-account:hover { background: #f7f9fb; border-color: #cfd7e2; color: #1f5d99; }
.authority-account strong, .authority-account small { display: block; }
.authority-account strong { font-size: var(--erp-type-value, .78rem); }
.authority-account small { color: var(--erp-muted); font-size: var(--erp-type-meta, .68rem); margin-top: 2px; }
.prototype-warning {
    background: #fff8e9;
    border: 1px solid #f0dfbb;
    border-radius: 6px;
    color: #7b5a20;
    font-size: var(--erp-type-value, .72rem);
    line-height: var(--erp-leading-value, 1.45);
    margin-top: 13px;
    padding: 9px 10px;
}

.purchasing-page-workspace {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    overflow: hidden;
    width: 100%;
}

.purchasing-editor-workspace,
.purchasing-request-list {
    width: 100%;
}

.purchasing-editor-workspace {
    display: grid;
    gap: 18px;
}

.purchasing-editor-toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
}

.purchasing-editor-toolbar > div,
.purchasing-editor-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.purchasing-request-list {
    padding: 20px;
}

.purchasing-request-list .panel-header {
    margin-bottom: 14px;
}

.purchasing-request-list .erp-table {
    min-width: 1320px;
}

.erp-work-section {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius);
    box-shadow: var(--erp-shadow);
    margin: 0;
    padding: 24px;
    width: 100%;
}

.read-only-indicator {
    color: var(--erp-muted);
    font-size: var(--erp-type-badge, .78rem);
    font-weight: var(--erp-weight-emphasis, 700);
}

.purchasing-context-panel { margin: 0; padding: 24px; }
.purchasing-context-grid {
    align-items: end;
    grid-template-columns: minmax(210px, 1fr) minmax(200px, .9fr) minmax(300px, 1.7fr) minmax(160px, .7fr);
}
.purchasing-context-grid label,
.demand-input-grid label,
.weight-grid label {
    color: #657083;
    display: grid;
    font-size: var(--erp-type-label, .92rem);
    font-weight: var(--erp-weight-label, 700);
    gap: 4px;
    text-transform: uppercase;
}
.purchasing-context-grid label small {
    color: #8a6270;
    font-size: var(--erp-type-meta, .8rem);
    font-weight: var(--erp-weight-meta, 500);
    text-transform: none;
}
.current-authority {
    background: #f6f8fa;
    border: 1px solid #e3e7ec;
    border-radius: 6px;
    display: grid;
    min-height: 58px;
    padding: 8px 11px;
}
.current-authority span { color: var(--erp-muted); font-size: var(--erp-type-badge, .63rem); font-weight: var(--erp-weight-emphasis, 750); text-transform: uppercase; }
.current-authority strong { font-size: var(--erp-type-value, .79rem); }
.current-authority small { color: #5e6b7e; font-size: var(--erp-type-meta, .68rem); }

.purchasing-workspace { display: grid; grid-template-columns:minmax(0,1fr); min-width:0; gap:18px; }
.product-entry-panel, .request-lines-panel, .demand-preview-panel, .weight-settings-panel, .purchasing-history-panel {
    padding: 24px;
}
.product-search-row {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(280px, 1fr) auto;
    margin-top: 16px;
    width: 100%;
}
.product-search-results {
    border: 1px solid #e0e5eb;
    border-radius: 7px;
    display: grid;
    margin-top: 9px;
    max-height: 330px;
    overflow-y: auto;
}
.product-result-row {
    align-items: center;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    color: #293548;
    display: grid;
    font-size: var(--erp-type-value, .78rem);
    gap: 12px;
    grid-template-columns: 160px 1fr auto;
    font-size: var(--erp-type-value, .92rem);
    padding: 12px 14px;
    text-align: left;
}
.product-result-row:last-child { border-bottom: 0; }
.product-result-row:hover, .product-result-row:focus { background: #f5f8fb; outline: 0; }
.product-result-row.keyboard-selected {
    background: #e8f1fb;
    box-shadow: inset 4px 0 0 #356ba8;
    color: #173f68;
}
.product-result-row strong, .product-result-row small { display: block; }
.product-result-row small { color: var(--erp-muted); font-size: var(--erp-type-meta, .68rem); margin-top: 2px; }
.product-result-row > span:last-child { color: #356ba8; font-size: var(--erp-type-value, .7rem); font-weight: var(--erp-weight-emphasis, 750); }
.request-empty { min-height: 145px; }
.purchasing-line-table {
    border: 1px solid #dfe4ea;
    border-collapse: collapse;
    min-width: 1120px;
    width: 100%;
}

.rkb-row-reorder-table tbody tr {
    cursor: pointer;
    transition: background-color 130ms ease, box-shadow 130ms ease, opacity 130ms ease, transform 130ms ease;
}
.rkb-row-reorder-table.live-reordering tbody tr:not(.dragging) {
    animation: purchasing-row-displace 140ms ease-out;
}
@keyframes purchasing-row-displace {
    from { transform: translateY(5px); }
    to { transform: translateY(0); }
}
.purchasing-line-table:focus {
    outline: 2px solid #8aa8c9;
    outline-offset: 2px;
}
.purchasing-line-table thead th {
    background: #f3f5f7;
    border: 1px solid #dfe4ea;
    padding: .72rem .7rem;
    position: sticky;
    top: 0;
    z-index: 1;
}
.purchasing-line-table td {
    border: 1px solid #e5e9ee;
    padding: .64rem .7rem;
}
.purchasing-line-table td .form-control {
    background: transparent;
    border-color: transparent;
    min-height: 36px;
    padding: .36rem .5rem;
}
.purchasing-line-table td .form-control:focus {
    background: #fff;
    border-color: #7da2ca;
}
.rkb-row-reorder-table tr.dragging {
    background: #edf4fb;
    opacity: .58;
    transform: scale(.995);
}

.rkb-row-reorder-table tr.drop-target {
    background: #f0f6fc;
}
.rkb-row-reorder-table tr.drop-target > td {
    box-shadow: inset 0 4px 0 #4c78ad;
}

.purchasing-line-table tr.selected-row {
    background: #e8f1fb;
    outline: 1px solid #8aa8c9;
    outline-offset: -1px;
}
.drag-column { width: 34px; }
.drag-handle {
    color: #7c8798;
    font-size: 1rem;
    text-align: center;
    user-select: none;
    width: 34px;
}
.drag-handle > span {
    cursor: grab;
    display: block;
    padding: .4rem;
}
.drag-handle > span:active { cursor: grabbing; }
.quantity-cell-button {
    background: transparent;
    border: 0;
    border-bottom: 1px dashed #8295aa;
    color: #244f7a;
    font-weight: var(--erp-weight-emphasis, 750);
    min-width: 62px;
    padding: 2px 4px;
    text-align: right;
}
.quantity-cell-button:hover { background: #edf4fb; }
.line-remove-button {
    background: transparent;
    border: 0;
    color: #a23b3b;
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px 8px;
}
.line-remove-button:hover { background: #faeeee; border-radius: 4px; }
.line-actions { white-space: nowrap; }
.purchasing-stable-scroll {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}
.purchasing-stable-table { min-width: 1040px; }
.supplier-candidate-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 16px;
}
.supplier-candidate-card {
    background: #fff;
    border: 1px solid #d9e0e8;
    border-radius: 7px;
    color: #26364a;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px;
    text-align: left;
}
.supplier-candidate-card:hover, .supplier-candidate-card:focus {
    background: #f2f7fc;
    border-color: #7da2ca;
    outline: 0;
}
.supplier-candidate-card small { color: #9a5b13; }
.po-qty-input { margin-left: auto; max-width: 110px; min-width: 90px; }
.po-source-panel, .po-cancel-panel {
    background: #f7f9fb;
    border: 1px solid #dfe5ec;
    border-radius: 7px;
    margin-top: 16px;
    padding: 16px;
}
.po-source-panel > div { border-top: 1px solid #e3e7ec; padding: 8px 0; }
.po-cancel-panel { display: flex; gap: 12px; align-items: end; }
.po-cancel-panel label { flex: 1; }
.icon-action {
    background: #fff;
    border: 1px solid #d6dce4;
    border-radius: 5px;
    color: #42516a;
    height: 29px;
    line-height: 1;
    width: 29px;
}
.icon-action:hover:not(:disabled) { background: #eef3f8; }
.icon-action:disabled { cursor: not-allowed; opacity: .35; }
.purchasing-form-actions {
    border-top: 1px solid #e7eaef;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
    padding-top: 14px;
}

/* Shared modal family. Do not combine with Bootstrap .modal-backdrop (its opacity fades the dialog itself). */
.rkb-modal-backdrop, .purchasing-modal-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, .5);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 1050;
}
.rkb-modal, .quantity-modal, .po-header-modal, .petty-review-modal {
    background: #fff;
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
    display: grid;
    gap: 14px;
    max-height: 88vh;
    overflow: auto;
    padding: 18px;
    width: min(720px, calc(100vw - 32px));
}
.rkb-modal.narrow, .quantity-modal { width: min(460px, calc(100vw - 32px)); }
.rkb-modal.medium, .petty-review-modal { width: min(620px, calc(100vw - 32px)); }
.rkb-modal[aria-labelledby="po-cancel-modal-title"] { width: min(460px, calc(100vw - 32px)); }
.rkb-modal[aria-labelledby="po-cancel-modal-title"] .form-grid { gap: 14px; }
.rkb-modal[aria-labelledby="po-cancel-modal-title"] .form-control,
.rkb-modal[aria-labelledby="po-cancel-modal-title"] .form-select,
.rkb-modal[aria-labelledby="po-cancel-modal-title"] .rkb-search-select { width: 100%; }
.rkb-modal[aria-labelledby="po-cancel-modal-title"] textarea { min-height: 60px; resize: vertical; }
.rkb-modal-header, .modal-heading { align-items: center; border-bottom: 1px solid #e1e6eb; display: flex; gap: 12px; justify-content: space-between; padding-bottom: 8px; }
.rkb-modal-header h2, .modal-heading h2 { font-size: var(--erp-type-section, 1.05rem); font-weight: var(--erp-weight-section, 720); margin: 0; }
.rkb-modal-header p, .modal-heading p { color: var(--erp-muted); font-size: var(--erp-type-meta, .84rem); margin: 3px 0 0; }
.modal-close {
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #4e5965;
    font-size: 1.3rem;
    line-height: 1;
    padding: .1rem .4rem;
}
.modal-close:hover { background: #f0f2f5; color: #172033; }
.selected-product-summary {
    background: #f5f7f9;
    border: 1px solid #e3e7ec;
    border-radius: 6px;
    display: grid;
    margin: 16px 0;
    padding: 10px 11px;
}
.selected-product-summary strong { font-size: var(--erp-type-value, .87rem); }
.selected-product-summary span { color: var(--erp-muted); font-size: var(--erp-type-value, .72rem); margin-top: 3px; }
.quantity-input { font-size: var(--erp-type-value, 1.15rem); font-weight: var(--erp-weight-emphasis, 700); }
.field-error { color: #a23b3b; font-size: var(--erp-type-value, .75rem); margin-top: 7px; }
.modal-actions, .rkb-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.rkb-modal .form-actions { margin: 0; }

.demand-input-grid, .weight-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
}
.weight-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)) auto; }
.demand-result-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    margin-top: 16px;
}
.demand-result-grid > div {
    background: #f7f9fb;
    border: 1px solid #e3e7ed;
    border-radius: 7px;
    display: grid;
    padding: 11px 12px;
}
.demand-result-grid span { color: var(--erp-muted); font-size: var(--erp-type-value, .67rem); font-weight: var(--erp-weight-emphasis, 750); text-transform: uppercase; }
.demand-result-grid strong { color: #263247; font-size: var(--erp-type-total, 1.08rem); margin-top: 4px; }
.demand-result-grid small { color: var(--erp-muted); font-size: var(--erp-type-meta, .68rem); }
.demand-result-grid .primary-result { background: #edf4fb; border-color: #d2e1f0; }
.calculation-note { color: var(--erp-muted); font-size: var(--erp-type-meta, .72rem); margin: 11px 0 0; }
.weight-settings-panel, .purchasing-history-panel, .demand-preview-panel { margin-top: 0; }

/* Settings share the detail tab-card family; sections inside a tab are toolbar + table blocks. */
.settings-section + .settings-section { border-top: 1px solid var(--erp-border); margin-top: 16px; padding-top: 14px; }
.settings-section .form-grid { margin-bottom: 4px; }
.settings-weight-table .weight-input { display: inline-block; max-width: 130px; text-align: right; }
.settings-note { color: var(--erp-muted); display: block; font-size: var(--erp-type-meta, .78rem); margin-top: 8px; }
.settings-placeholder-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 14px; }
.settings-placeholder-grid .product-placeholder-section { margin-top: 0; }
@media (max-width: 900px) { .settings-placeholder-grid { grid-template-columns: 1fr; } }
.future-stage-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}
.future-stage {
    background: #f7f9fb;
    border: 1px solid #e1e6ec;
    border-radius: 7px;
    display: grid;
    gap: 12px;
    grid-template-columns: 34px 1fr;
    padding: 15px;
}
.future-stage > span {
    align-items: center;
    background: #e7edf4;
    border-radius: 50%;
    color: #43546a;
    display: flex;
    font-size: var(--erp-type-action, .7rem);
    font-weight: var(--erp-weight-emphasis, 800);
    height: 31px;
    justify-content: center;
    width: 31px;
}
.future-stage strong { font-size: var(--erp-type-action, .88rem); }
.future-stage p { color: var(--erp-muted); font-size: var(--erp-type-meta, .75rem); line-height: var(--erp-leading-meta, 1.5); margin: 4px 0 0; }

.blazor-error-boundary {
    background: #a23b3b;
    color: white;
    padding: 1rem;
}

/* Product Master list/search/filter/grouping V1 */
.page main article.content.product-master-content { padding-top: 0; }
.page main article.content:has(.product-master-page) { padding-top: 0; }
.product-master-page { align-items: stretch; display: flex; flex-direction: column; max-width: 100%; min-width: 0; overflow-x: hidden; overflow-x: clip; width: 100%; }
.product-list-sticky-tools { align-self: stretch; background: var(--erp-bg); box-sizing: border-box; flex: 0 0 auto; max-width: 100%; min-width: 0; padding: 10px 0 6px; position: sticky; top: var(--erp-live-topbar-height, 62px); width: 100%; z-index: 18; }
.product-list-sticky-tools .product-filter-panel { box-shadow: 0 5px 18px rgba(30, 42, 55, .07); }
.product-search-heading, .product-selection-bar, .product-group-heading { align-items: center; display: flex; justify-content: space-between; }
.product-filter-panel-compact { padding: 8px 12px; position: relative; }
/* Anchored filter popover: shared by every operational list. It floats over the table and never pushes content. */
.rkb-filter-popover { background: #fff; border: 1px solid var(--erp-border); border-radius: 9px; box-shadow: 0 14px 34px rgba(28,40,55,.18); max-height: min(72vh,620px); overflow: auto; padding: 12px 14px; position: absolute; right: 12px; top: calc(100% - 4px); width: min(760px,calc(100vw - 48px)); z-index: 40; }
.rkb-filter-popover-header,.rkb-filter-popover-actions { align-items: center; display: flex; justify-content: space-between; }
.rkb-filter-popover-header { border-bottom: 1px solid var(--erp-border); margin-bottom: 10px; padding-bottom: 8px; }
.rkb-filter-popover-header strong { font-size: var(--erp-type-subsection, .9rem); }
.rkb-filter-popover-header button,.rkb-modal-header button { background: transparent; border: 0; border-radius: 5px; color: #4e5965; font-size: 1.3rem; line-height: 1; padding: .1rem .4rem; }
.rkb-filter-popover-header button:hover,.rkb-modal-header button:hover { background: #f0f2f5; color: #172033; }
.rkb-filter-popover-actions { border-top: 1px solid var(--erp-border); gap: 8px; justify-content: flex-end; margin-top: 12px; padding-top: 10px; }
.rkb-filter-popover .product-advanced-filter-grid { border-top: 0; grid-template-columns: repeat(3, minmax(170px, 1fr)); margin-top: 0; padding-top: 0; }
.rkb-filter-popover .product-advanced-filter-grid > label,
.rkb-filter-popover .product-advanced-filter-grid .price-filter > label { color: #586477; font-size: var(--erp-type-label, .78rem); font-weight: var(--erp-weight-label, 650); }
.rkb-filter-popover .product-advanced-filter-grid .form-control,
.rkb-filter-popover .product-advanced-filter-grid .form-select,
.rkb-filter-popover .product-advanced-filter-grid input { font-weight: var(--erp-weight-regular, 400); }
.rkb-filter-checkbox-group { border: 0; display: grid; gap: 5px; margin: 0; min-width: 150px; padding: 0; }
.rkb-filter-checkbox-group legend { color: #586477; font-size: var(--erp-type-label, .78rem); font-weight: var(--erp-weight-emphasis, 650); margin-bottom: 4px; }
.rkb-filter-checkbox-group label { align-items: center; display: flex; font-size: var(--erp-type-label, .86rem); gap: 7px; }
.rkb-filter-checkbox-group input[type="checkbox"] { height: 16px; width: 16px; }
.rkb-filter-checkbox-group small { color: var(--erp-muted); font-size: var(--erp-type-meta, .74rem); }
.rkb-filter-inline-action { justify-self: start; margin-top: 2px; }
.product-search-main-row { align-items: center; display: flex; gap: 8px; }
.product-search-main-row .product-chip-input { flex: 1 1 auto; min-width: 260px; }
.product-search-heading { gap: 12px; margin-bottom: 7px; }
.product-search-heading > div:first-child { display: grid; }
.product-search-heading small { color: var(--erp-muted); }
.product-search-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.rkb-toolbar-label { position: relative; align-items: center; display: inline-flex; gap: 5px; white-space: nowrap; }
.rkb-document-signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 16px; break-inside: avoid; }
.rkb-document-signatures span { display: block; border-top: 1px solid #555; margin-top: 60px; padding-top: 6px; }
.rkb-toolbar-label svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.rkb-toolbar-count { border-radius: 8px; background: #e5edf7; color: #174777; font-size: var(--erp-type-badge, .75rem); min-width: 18px; padding: 0 4px; text-align: center; }
.rkb-compact-search .product-search-actions .btn { min-height: 32px; padding: 5px 8px; }
.rkb-compact-search .product-search-actions .btn:has(.has-active-filters) { border-color: #315c9a; background: #edf4fb; }
.rkb-compact-search .product-search-actions .btn:focus-visible { outline: 2px solid #315c9a; outline-offset: 2px; }
.product-search-main-row.rkb-compact-search { flex-direction: row; flex-wrap: wrap; }
.product-search-main-row.rkb-compact-search .product-chip-input { flex: 1 1 320px; max-width: 100%; min-width: 0; }
.rkb-compact-search .product-search-actions { display: flex; flex: 0 1 auto; justify-content: flex-start; width: auto; }
@media (max-width: 640px) {
    .product-filter-panel:has(> .rkb-compact-search) .product-filter-footer { grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
    .product-filter-panel:has(> .rkb-compact-search) .product-selection-slot:empty { display: none; }
    .product-filter-panel:has(> .rkb-compact-search) .product-selection-slot:not(:empty) { grid-column: 1 / -1; order: 3; }
    .product-filter-panel:has(> .rkb-compact-search) .product-pager { justify-self: end; }
}
.product-chip-input { align-items: center; background: #fff; border: 1px solid #cfd6de; border-radius: 7px; cursor: text; display: flex; flex-wrap: wrap; gap: 6px; min-height: var(--erp-control-height); padding: 3px 8px; }
.product-chip-input:focus-within { border-color: #607b96; box-shadow: var(--erp-focus-ring); }
.product-chip-input > input { border: 0; flex: 1 1 240px; font-size: var(--erp-type-value, .9rem); height: 28px; min-width: 180px; outline: 0; padding: 4px; }
.active-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.filter-chip { align-items: center; background: #eef2f6; border: 1px solid #d8e0e8; border-radius: 999px; color: #33465a; display: inline-flex; font-size: var(--erp-type-badge, .76rem); font-weight: var(--erp-weight-emphasis, 650); gap: 6px; padding: 4px 8px 4px 10px; }
.filter-chip.search-chip { background: #e8f0f8; border-color: #cbdbea; }
.filter-chip button { background: none; border: 0; color: #647386; font-size: 1rem; line-height: 1; padding: 0; }
.product-advanced-filter-grid { align-items: end; border-top: 1px solid #e5e9ee; display: grid; gap: 12px; grid-template-columns: repeat(4,minmax(180px,1fr)); margin-top: 14px; padding-top: 14px; }
.product-advanced-filter-grid label, .price-filter { display: grid; gap: 5px; }
.rkb-filter-popover .product-advanced-filter-grid .rkb-filter-checkbox-group label { align-items: center; display: flex; flex-flow: row nowrap; gap: 7px; }
.rkb-filter-popover .product-advanced-filter-grid .rkb-filter-checkbox-group input[type="checkbox"] { flex: 0 0 16px; margin: 0; }
.supplier-filter { position: relative; }
.product-supplier-results { background: #fff; border: 1px solid #d8dee6; border-radius: 7px; box-shadow: 0 8px 24px rgba(34,45,58,.12); display: grid; left: 0; max-height: 240px; overflow-y: auto; position: absolute; right: 0; top: 100%; z-index: 30; }
.product-supplier-results button { background: #fff; border: 0; border-bottom: 1px solid #edf0f3; display: grid; padding: 9px 11px; text-align: left; }
.product-supplier-results button:hover { background: #f4f7fa; }
.product-supplier-results button.highlighted { background: #e8f2ff; box-shadow: inset 3px 0 #315c9a; }
.product-supplier-results small, .filter-unavailable span { color: var(--erp-muted); font-size: var(--erp-type-meta, .72rem); }
.filter-unavailable { align-self: stretch; background: #f6f7f8; border: 1px dashed #ccd3da; border-radius: 7px; display: grid; padding: 8px 10px; }
.product-selection-bar { background: #edf4fb; border: 1px solid #caddec; border-radius: 8px; gap: 12px; margin-bottom: 8px; padding: 9px 12px; }
.product-selection-bar > span { color: var(--erp-muted); flex: 1; font-size: var(--erp-type-value, .75rem); }
.selection-clear { background: none; border: 0; color: #526275; font-size: 1.25rem; }
.product-selection-bar details { position: relative; }
.product-selection-bar summary { list-style: none; }
.product-action-menu { background: #fff; border: 1px solid #d7dde5; border-radius: 7px; box-shadow: 0 8px 24px rgba(34,45,58,.12); display: grid; min-width: 270px; padding: 10px; position: absolute; right: 0; top: calc(100% + 5px); z-index: 35; }
.product-action-menu button { border: 0; padding: 8px; text-align: left; }
.product-action-menu small { color: var(--erp-muted); padding: 7px; }
.product-list-panel { align-self: stretch; clear: both; flex: 0 0 auto; margin-top: 0; max-width: 100%; min-width: 0; overflow-x: hidden; overflow-x: clip; overflow-y: visible; width: 100%; }
.product-list-panel-compact { padding: 0; }
.product-master-sticky-header-host { background: #eef2f6; border-bottom: 1px solid #d9e0e7; box-shadow: 0 3px 8px rgba(31,45,61,.08); box-sizing: border-box; overflow: hidden; position: fixed; z-index: 17; }
.product-master-sticky-header-host[hidden] { display: none; }
.product-master-sticky-clone-table { margin: 0 !important; table-layout: fixed !important; }
.product-master-sticky-clone-table thead th,
.product-master-sticky-clone-table th[data-column] { position: relative !important; top: auto !important; }
.product-table-wrap { clear: both; display: block; max-height: none; max-width: 100%; min-height: 0; min-width: 0; overflow-x: auto !important; overflow-y: visible !important; overscroll-behavior-x: contain; width: 100%; }
.product-master-v2-table { max-width: none; min-width: 1078px; width: max-content; }
.product-master-v2-table thead th,
.product-master-v2-table th[data-column] { background: #eef2f6; cursor: grab; font-size: var(--erp-type-table-heading, .9rem); position: relative; text-transform: none; top: auto; z-index: 12; }
.product-master-v2-table thead th:active { cursor: grabbing; }
.product-column-heading { align-items: center; background: none; border: 0; color: inherit; display: flex; font: inherit; font-weight: var(--erp-weight-emphasis, 700); gap: 8px; justify-content: space-between; min-width: 0; padding: 0 18px 0 0; text-align: inherit; width: 100%; }
.product-column-heading.rkb-column-heading-static { padding-right:0; }
.product-column-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-sort-indicator { align-items: center; align-self: center; color: #255d91; display: inline-flex; flex: 0 0 18px; height: 18px; justify-content: center; line-height: 1; width: 18px; }
.product-sort-indicator svg { display: block; fill: none; height: 18px; overflow: visible; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 18px; }
.product-sort-indicator.none { color: #8090a2; }
/* The selector is a real independently resizable column. Its declared 52px
   auto width comes from data-min-width; CSS only provides the practical floor. */
.product-select-column { cursor: default !important; min-width: 42px; text-align: center; }
.product-master-v2-table input[type="checkbox"] { cursor: pointer; height: 19px; margin: 0; min-height: 19px; min-width: 19px; vertical-align: middle; width: 19px; }
.product-clickable-row { cursor: pointer; }
.product-clickable-row:hover td, .product-clickable-row:focus td { background: #f3f7fb; }
.product-clickable-row.selected td { background: #f2f8fe; }
.product-clickable-row.selected:hover td, .product-clickable-row.selected:focus td { background: #edf6fd; }
.product-clickable-row.selected td:first-child { box-shadow: inset 3px 0 #9fc7ea; }
.product-clickable-row td.product-select-column { text-align: center; }
.product-clickable-row:focus { outline: 2px solid #6e8dab; outline-offset: -2px; }
.rkb-table-foundation td[data-rkb-truncated="true"]:focus { box-shadow: inset 0 0 0 2px #7ea4c8; outline: none; }
.po-merge-status-detail { align-items: center; display: inline-flex; gap: 6px; white-space: nowrap; }
.po-merge-info { align-items: center; background: #eef5fb; border: 1px solid #aac5df; border-radius: 999px; color: #255d91; display: inline-flex; height: 22px; justify-content: center; padding: 0; width: 22px; }
.po-merge-info:hover,.po-merge-info:focus-visible { background: #dfeefa; border-color: #6f9fc7; }
.po-merge-info svg { fill: none; height: 15px; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; width: 15px; }
.po-merge-popup-main { align-items: center; background: #f3f6f9; border-radius: 6px; display: flex; gap: 8px; margin-top: 8px; padding: 8px 10px; }
.po-merge-popup-main span { color: var(--erp-muted); font-size: var(--erp-type-value, .8rem); }
.po-merge-popup-members { display: grid; gap: 7px; margin-top: 8px; }
.po-merge-popup-member { align-items: center; background: #f8fafc; border: 1px solid #d9e1e9; border-radius: 6px; color: inherit; display: flex; justify-content: space-between; padding: 9px 11px; text-align: left; }
.po-merge-popup-member:hover,.po-merge-popup-member:focus-visible { background: #eef5fb; border-color: #9bbbd8; }
.po-merge-popup-member span { color: var(--erp-muted); font-size: var(--erp-type-value, .8rem); }
.reconciliation-source-list article.merge-main-selected { background: #eef6fd; border-color: #8eb7da; }
.reconciliation-source-list article > div { align-items: center; gap: 7px; }
.merge-main-badge { background: #255d91; border-radius: 999px; color: #fff; font-size: var(--erp-type-badge, .72rem); font-weight: var(--erp-weight-badge, 700); padding: 2px 7px; }
.merge-source-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.merge-source-chip { align-items: center; background: #eef3f7; border: 1px solid #ccd8e2; border-left: 4px solid #7895b5; border-radius: 5px; display: inline-flex; gap: 6px; padding: 3px 7px; }
.merge-source-chip span { color: #526174; font-size: var(--erp-type-value, .76rem); }
.merge-source-2 { background: #f7f2e8; border-color: #d9c9aa; border-left-color: #b28a4a; }
.merge-source-3 { background: #edf6f0; border-color: #bad8c4; border-left-color: #5f9c72; }
.merge-source-4 { background: #f4eff8; border-color: #cfbfdb; border-left-color: #8d6ba5; }
.merge-source-5 { background: #f8eeee; border-color: #dec1c1; border-left-color: #ae6969; }
.merge-source-6 { background: #eef5f5; border-color: #bdd4d4; border-left-color: #5d9494; }
.split-quantity-input { margin-inline: auto; max-width: 120px; min-width: 78px; }
.product-code-text, .product-name-text { color: var(--erp-text); text-decoration: none; }
.barcode-compact { white-space: nowrap; }
.barcode-extra-count { background: #fff3cd; border: 1px solid #f1dda0; border-radius: 999px; color: #8a5b00; display: inline-block; font-size: var(--erp-type-badge, .72rem); font-weight: var(--erp-weight-emphasis, 750); line-height: var(--erp-leading-badge, 1.25); margin-left: 4px; padding: 1px 5px; }
.product-master-v2-table .table-column-resizer::after { background: transparent; bottom: 4px; content: ""; position: absolute; right: 6px; top: 4px; transition: background-color 120ms ease, width 120ms ease; width: 1px; }
.product-master-v2-table thead th:hover .table-column-resizer::after,
.product-master-v2-table .table-column-resizer:hover::after { background: #4777aa; width: 3px; }
.product-group-heading { gap: 12px; }
.product-group-heading .group-toggle { align-items: center; background: none; border: 0; display: flex; flex: 1; gap: 9px; text-align: left; }
.product-group-heading small { color: var(--erp-muted); font-weight: var(--erp-weight-regular, 400); }
.product-master-v2-table .table-group-row td { background: #f2f3f4; border-bottom-color: #d9dde1; color: #354250; }
.product-master-v2-table .table-group-row:hover td { background: #e9ebed; }
.product-master-v2-table .table-group-row .group-toggle { color: #2f3d4b; }
.product-filter-footer { align-items: center; border-top: 1px solid #e7ebef; color: var(--erp-muted); display: grid; font-size: var(--erp-type-value, .8rem); gap: 10px; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); margin-top: 8px; padding-top: 7px; }
.product-result-range { align-items: center; background: transparent; border: 0; display: inline-flex; font-size: var(--erp-type-meta, .88rem); min-height: 36px; padding: 0; justify-self: start; }
.product-selection-slot { align-items: center; display: flex; justify-content: center; min-height: 36px; }
.product-selection-compact { align-items: center; background: #edf4fb; border: 1px solid #caddec; border-radius: 7px; box-sizing: border-box; color: #33465a; display: flex; font-size: var(--erp-type-value, .84rem); gap: 7px; height: 36px; padding: 2px 4px 2px 9px; white-space: nowrap; }
.product-selection-count { align-items: baseline; display: inline-flex; gap: 5px; line-height: 1; }
.product-selection-compact strong { font-size: var(--erp-type-value, .9rem); font-weight: var(--erp-weight-emphasis, 800); }
.product-selection-compact .selection-clear { align-items: center; align-self: center; display: inline-flex; font-size: 1.1rem; height: 28px; justify-content: center; line-height: 1; padding: 0 4px; width: 28px; }
.product-selection-compact details { align-items: center; display: flex; height: 30px; position: relative; }
.product-selection-compact summary { align-items: center; display: inline-flex; gap: 4px; justify-content: center; list-style: none; }
.product-selection-compact .btn-sm { font-size: var(--erp-type-action-sm, .84rem); font-weight: var(--erp-weight-action-sm, 500); line-height: 1; min-height: 30px; padding: 3px 8px; }
.product-selection-compact .product-action-menu { left: 50%; right: auto; transform: translateX(-50%); }
.product-pager { align-items: center; background: transparent; border: 0; box-shadow: none; gap: 7px; justify-content: flex-end; margin: 0; min-height: 36px; padding: 0; }
.product-filter-footer .product-pager { justify-self: end; }
.product-pager > span { font-size: var(--erp-type-action, .88rem); }
.product-page-arrow { font-size: 1rem; min-height: 30px; min-width: 34px; padding: 2px 8px; }
.product-page-number { background: transparent; border: 0; border-bottom: 1px dashed #8b98a7; color: #26364c; font: inherit; font-weight: var(--erp-weight-emphasis, 750); line-height: var(--erp-leading-action, 1.25); min-width: 24px; padding: 1px 3px; }
.product-page-number:hover, .product-page-number:focus-visible { background: #e8eef5; border-bottom-color: #486b90; border-radius: 4px; outline: 0; }
.product-page-input { border: 1px solid #8aa0b7; border-radius: 4px; color: #26364c; font-size: var(--erp-type-action, .78rem); font-weight: var(--erp-weight-emphasis, 700); height: 27px; min-height: 0; padding: 2px 4px; text-align: center; width: 72px; }
.product-page-input:focus { border-color: #486b90; box-shadow: 0 0 0 2px rgba(72,107,144,.14); outline: 0; }
.product-bottom-pager { border-top: 1px solid #e7ebef; padding: 9px 12px; }
.group-loading-row td, .group-load-more-row td { color: var(--erp-muted); padding: 11px 16px !important; }
.group-load-more-row td { align-items: center; display: flex; gap: 10px; }

/* Product Master detail UX V1 */
/* Detail/form page shell shared by Product, Supplier, Lokasi, Purchase Order, Settings and create/edit forms. */
.product-detail-v2, .erp-detail-page { display: grid; gap: 10px; max-width: 100%; min-width: 0; overflow-x: hidden; }
.product-identity-header { align-items: center; display: flex; gap: 16px; justify-content: space-between; min-width: 0; padding: 0 2px; }
.product-identity-copy { min-width: 0; }
.product-identity-copy h1 { align-items: center; color: #172033; display: flex; flex-wrap: wrap; font-size: var(--erp-type-title, 1.35rem); font-weight: var(--erp-weight-title, 740); gap: 8px; line-height: var(--erp-leading-title, 1.28); margin: 0; overflow-wrap: anywhere; }
.product-identity-copy h1 .status-badge { font-size: var(--erp-type-badge, .72rem); }
.product-primary-barcode, .product-identity-meta { color: #536174; font-size: var(--erp-type-value, .86rem); font-weight: var(--erp-weight-emphasis, 600); margin-top: 2px; }
.product-detail-header-actions, .product-adjacent-buttons { align-items: center; display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; }
.product-adjacent-buttons .btn { font-size: 1rem; min-width: 34px; padding-inline: 8px; }
.product-detail-message { margin: 0; }
.transient-message { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; margin: 0; padding: .65rem .75rem; }
.transient-message-success { box-shadow: 0 10px 28px rgba(20,45,70,.2); left: 50%; max-width: min(34rem,calc(100vw - 32px)); position: fixed; top: 1rem; transform: translateX(-50%); width: max-content; z-index: 2500; }
.transient-message > span { min-width: 0; }
.transient-message-close { align-items: center; background: transparent; border: 0; border-radius: 4px; color: inherit; display: inline-flex; flex: 0 0 28px; font-size: 1.2rem; height: 28px; justify-content: center; line-height: 1; margin: -.25rem -.3rem -.25rem 0; opacity: .72; padding: 0; }
.transient-message-close:hover, .transient-message-close:focus-visible { background: rgba(0,0,0,.08); opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
.product-detail-tab-card { min-width: 0; overflow: hidden; padding: 0; }
.product-detail-tabs { align-items: stretch; border-bottom: 1px solid #dfe4e9; display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; scrollbar-width: thin; }
.product-detail-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: #5b6777; cursor: pointer; flex: 0 0 auto; font-size: var(--erp-type-tab, .86rem); font-weight: var(--erp-weight-tab, 620); min-height: 42px; padding: 9px 12px 7px; }
.product-detail-tabs button:hover { background: #f5f7f9; color: #26364a; }
.product-detail-tabs button.active { border-bottom-color: #315c9a; color: #1f4f82; font-weight: var(--erp-weight-tab, 750); }
.product-detail-tab-content { min-height: 200px; min-width: 0; overflow: hidden; padding: 14px 16px 16px; }
.product-general-grid { display: grid; gap: 12px; grid-template-columns: repeat(2,minmax(240px,1fr)); }
.product-field { display: grid; gap: 5px; margin: 0; min-width: 0; }
.product-field > span:first-child { color: #596678; font-size: var(--erp-type-label, .76rem); font-weight: var(--erp-weight-emphasis, 720); }
.product-field.read-only > div, .product-check-value { align-items: center; background: #f3f5f7; border: 1px solid #e0e4e9; border-radius: 7px; color: #263446; display: flex; flex-wrap: wrap; font-size: var(--erp-type-value, .9rem); gap: 6px; min-height: var(--erp-control-height); padding: 6px 10px; }
.product-field.read-only small, .product-cost-value small { color: var(--erp-muted); display: block; font-size: var(--erp-type-summary, .7rem); font-weight: var(--erp-weight-summary, 400); margin-left: 7px; }
.product-field.editable .form-control, .product-field.editable .form-select, .product-field.editable input { transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease; }
.product-field.editable:hover .form-control:not(:disabled), .product-field.editable:hover input:not(:disabled) { border-color: #91a7bf; }
.product-field.editable:focus-within .form-control:not(:disabled), .product-field.editable:focus-within input:not(:disabled) { background: #fff; border-color: #607f9f; box-shadow: 0 0 0 3px rgba(49,92,154,.1); }
.product-check-value { background: #fff; gap: 8px; }
.product-check-value input { height: 18px; width: 18px; }
.product-cost-value { font-size: var(--erp-type-summary, 1rem) !important; font-weight: var(--erp-weight-summary, 740); }
.product-cost-value small { margin-left: auto; }
.product-tags-placeholder, .product-placeholder-section { background: #f7f8fa; border: 1px dashed #d4dae1; border-radius: 8px; display: grid; gap: 5px; margin-top: 14px; padding: 11px 12px; }
.product-tags-placeholder strong, .product-placeholder-section strong { font-size: var(--erp-type-value, .86rem); }
.product-tags-placeholder span, .product-placeholder-section span { color: var(--erp-muted); font-size: var(--erp-type-value, .78rem); }
.product-general-save-row { align-items: end; border-top: 1px solid #e4e8ec; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 12px; }
.product-general-save-row > div:first-child { align-items: center; display: flex; flex: 1 1 auto; gap: 8px; }
.product-general-save-row label { display: grid; flex: 1 1 340px; font-size: var(--erp-type-label, .78rem); gap: 5px; max-width: 520px; }
.product-tab-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; margin-bottom: 10px; min-height: var(--erp-control-height-sm); }
.product-tab-toolbar > div { display: grid; gap: 2px; }
.product-tab-toolbar > div > strong { font-size: var(--erp-type-subsection, .95rem); }
.product-tab-toolbar > div > span { color: var(--erp-muted); font-size: var(--erp-type-value, .76rem); }
.product-tab-toolbar > .product-detail-table-actions { align-items: center; display: flex; flex: 0 0 auto; gap: 7px; margin-left: auto; }
.product-detail-count { color: #647184; font-size: var(--erp-type-badge, .78rem); font-variant-numeric: tabular-nums; font-weight: var(--erp-weight-emphasis, 650); white-space: nowrap; }
.product-inline-editor { background: #f8fafb; border: 1px solid #e0e5ea; border-radius: 8px; margin-bottom: 12px; padding: 10px; }
.product-detail-table-wrap { max-width: 100%; min-width: 0; overflow-x: auto !important; overscroll-behavior-inline: contain; }
.rkb-detail-paged-table-wrap { max-height: none !important; overflow-x: auto !important; overflow-y: hidden !important; }
.product-detail-table { margin-bottom: 0; max-width: none; min-width: 0; }
.product-detail-table thead th { background: #eef2f6; color: #435166; cursor: grab; font-size: var(--erp-type-table-heading, .74rem); letter-spacing: var(--erp-tracking-table-heading, .015em); padding-block: .48rem; position: sticky; top: 0; z-index: 2; }
.product-detail-table thead th:active { cursor: grabbing; }
.product-detail-table thead th.column-dragging { opacity: .55; }
.product-detail-table thead th.column-drop-target { background: #dce7f3; box-shadow: inset 3px 0 0 #6384a8; }
.product-detail-table td { font-size: var(--erp-table-value-size, .82rem); padding-block: .46rem; vertical-align: middle; }
.product-detail-table tbody tr:hover > td { background: #f7f9fb; }
.product-detail-table .product-column-heading { color: inherit; font-size: inherit; min-width: 0; }
.product-detail-table .product-sort-indicator { color: #315f91; font-size: .66rem; }
.product-detail-empty-table { min-width: 0; }
.product-detail-info-cell { align-items: center; display: flex; gap: 7px; min-width: 0; }
.product-detail-info-cell > span:not(.product-row-actions):not(.status-badge) { color: #5f6d80; overflow: hidden; text-overflow: ellipsis; }
.product-row-actions { align-items: center; display: inline-flex; flex: 0 0 auto; gap: 5px; margin-left: auto; }
.product-row-actions .btn { font-size: var(--erp-type-action-sm, .72rem); padding: 3px 7px; }
.product-primary-marker { color: #315f91; font-size: 1rem !important; font-weight: 800; text-align: center; }
.product-detail-placeholder-table + .product-detail-placeholder-table { margin-top: 18px; }
.product-related-files { grid-column: 1/-1; min-width: 0; }
.product-info-dot { align-items: center; background: #eef2f6; border: 1px solid #cdd6df; border-radius: 50%; color: #40556d; display: inline-flex; font-size: .7rem; font-weight: 800; height: 20px; justify-content: center; margin-left: 6px; padding: 0; width: 20px; }
.product-tab-empty { color: var(--erp-muted); font-size: var(--erp-type-value, .88rem); padding: 18px 12px; text-align: center; }
.rkb-detail-table-pager { align-items: center; color: #536174; display: flex; font-size: var(--erp-type-action, .82rem); gap: 12px; justify-content: space-between; min-height: 36px; padding-top: 7px; }
.rkb-detail-table-page-controls { align-items: center; display: inline-flex; gap: 7px; white-space: nowrap; }
.rkb-detail-table-page-controls .btn { align-items: center; display: inline-flex; height: 29px; justify-content: center; min-width: 31px; padding: 2px 7px; }
.rkb-detail-table-range { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Detail pages scroll as documents. Only the table header is frozen and its
   offset is the persistent application topbar--never a dynamic detail stack. */
.rkb-detail-sticky-header-host { background: #eef2f6; border-bottom: 1px solid #d9e0e7; box-shadow: 0 3px 8px rgba(31,45,61,.08); box-sizing: border-box; overflow: hidden; pointer-events: none; position: fixed; z-index: 24; }
.rkb-detail-sticky-header-host[hidden] { display: none; }
.rkb-detail-sticky-clone-table { margin: 0 !important; table-layout: fixed !important; }
.rkb-detail-sticky-clone-table thead th,
.rkb-detail-sticky-clone-table th[data-column] { background: #eef2f6 !important; position: relative !important; top: auto !important; z-index: 1 !important; }
.rkb-detail-paged-table-wrap tbody tr { scroll-margin-top: calc(var(--rkb-shell-sticky-top, 62px) + 64px); }

/* One viewport-bottom proxy supplements (and never replaces) the native table
   scrollbar. JS aligns it with the currently relevant overflowing wrapper. */
.rkb-floating-table-scrollbar { background: #f7f9fb; border: 1px solid #c9d2dc; border-radius: 5px; bottom: 6px; box-shadow: 0 3px 12px rgba(25,38,53,.18); height: 17px; overflow-x: auto; overflow-y: hidden; position: fixed; scrollbar-color: #78889a #e5eaf0; scrollbar-width: auto; z-index: 1200; }
.rkb-floating-table-scrollbar[hidden] { display: none; }
.rkb-floating-table-scrollbar-track { height: 1px; pointer-events: none; }
html.rkb-floating-table-scroll-active { scroll-padding-bottom: 26px; }
@media (max-width: 700px) { .rkb-detail-table-pager { align-items: flex-end; flex-direction: column; gap: 3px; } }

/* Supplier Master reuses the operational Product Master shell and the shared detail-table foundation. */
.supplier-master-page, .supplier-detail-page { max-width: 100%; min-width: 0; }
.supplier-filter { position: relative; }
.supplier-form-panel .form-grid, .supplier-inline-editor .form-grid { align-items: start; }
.form-span-2, .supplier-field-wide { grid-column: 1 / -1; }
.supplier-notes { min-height: 82px; resize: vertical; white-space: pre-wrap; }
.supplier-notes.large { min-height: 128px; }
.supplier-general-grid { align-items: start; }
.supplier-tags { border-top: 1px solid #e3e7ec; display: grid; gap: 9px; margin-top: 14px; padding-top: 14px; }
.supplier-tag-list, .supplier-tag-add { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.supplier-tag-add .form-control { flex: 1 1 220px; max-width: 420px; }
.supplier-inline-editor { background: #f7f9fb; border: 1px solid #dfe5eb; border-radius: 7px; display: grid; gap: 10px; margin: 0 0 12px; padding: 12px; }
.supplier-inline-editor > strong { font-size: var(--erp-type-subsection, .9rem); }
.supplier-inline-editor > p { color: var(--erp-muted); font-size: var(--erp-type-meta, .84rem); margin: 0; }
.supplier-inline-editor .form-actions { margin-top: 2px; }
.supplier-document-placeholder { background: #f7f8fa; border: 1px dashed #cfd6de; color: var(--erp-muted); margin: 16px 0; padding: 12px; text-align: center; }
.supplier-wrap-cell { max-width: 520px; overflow-wrap: anywhere; white-space: normal; }
.product-placeholder-large { align-content: start; margin-top: 0; min-height: 220px; }
.product-placeholder-columns { background: #fff; border: 1px solid #e1e5ea; border-radius: 6px; color: #657286; font-family: ui-monospace,Consolas,monospace; font-size: var(--erp-type-value, .75rem); margin-top: 7px; overflow-x: auto; padding: 9px; white-space: nowrap; }
.product-placeholder-section .btn { justify-self: start; margin-top: 8px; }
.product-other-grid { display: grid; gap: 12px; grid-template-columns: repeat(2,minmax(220px,1fr)); }
.product-other-grid .product-placeholder-section { margin-top: 0; min-height: 90px; }
.product-audit-section { display: grid; gap: 9px; grid-column: 1/-1; margin-top: 4px; min-width: 0; }
.product-audit-section > strong { font-size: var(--erp-type-subsection, .9rem); }

@media (max-width: 1180px) {
    .product-advanced-filter-grid { grid-template-columns: repeat(2,minmax(180px,1fr)); }
}

@media (max-width: 1080px) {
    .product-search-main-row { align-items: stretch; flex-wrap: wrap; }
    .product-search-main-row .product-chip-input { flex: 1 1 100%; min-width: 0; width: 100%; }
    .product-search-actions { flex: 1 1 100%; justify-content: flex-start; min-width: 0; }
    .product-table-wrap { overflow-x: auto !important; overflow-y: visible !important; }
    .product-master-v2-table thead th,
    .product-master-v2-table th[data-column] { position: relative; top: auto; }
}

@media (max-width: 640px) {
    .product-list-sticky-tools { position: sticky; }
    .product-advanced-filter-grid { grid-template-columns: 1fr; }
    .product-selection-bar, .product-search-heading, .product-search-main-row { align-items: stretch; flex-direction: column; }
    .product-search-actions { align-items: stretch; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
    .product-search-actions .btn { justify-content: center; min-width: 0; white-space: normal; }
    .product-filter-footer { align-items: stretch; grid-template-columns: 1fr; }
    .product-filter-footer .product-result-range,
    .product-filter-footer .product-selection-slot,
    .product-filter-footer .product-pager { justify-self: start; }
    .product-selection-slot { justify-content: flex-start; }
    .product-master-v2-table thead th { top: 0; }
    .product-identity-header, .product-tab-toolbar, .product-general-save-row { align-items: stretch; flex-direction: column; }
    .product-tab-toolbar > .product-detail-table-actions { flex-wrap: wrap; }
    .product-detail-header-actions { justify-content: space-between; width: 100%; }
    .product-general-grid, .product-other-grid { grid-template-columns: 1fr; }
    .product-general-save-row label { flex-basis: auto; max-width: none; }
}

@media (max-width: 1180px) {
    .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
    .form-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .line-editor { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .product-filter-grid, .band-editor { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
    .product-detail-grid { grid-template-columns: 145px 1fr; }
    .inline-editor { grid-template-columns: 1fr 1fr; }
    .purchasing-context-grid { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
    .demand-input-grid, .weight-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
    .demand-result-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 900px) {
    .content { padding: 12px 14px 32px; }
    .page-header, .mode-heading, .list-toolbar, .panel-header { align-items: flex-start; flex-direction: column; }
    .dashboard-layout, .detail-layout { grid-template-columns: 1fr; }
    .dashboard-panel.module-overview { grid-column: auto; }
    .module-status-grid { grid-template-columns: 1fr; }
    .progress-steps { overflow-x: auto; }
    .progress-step { min-width: 105px; }
    .login-layout { grid-template-columns: minmax(320px, 540px); }
    .future-stage-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .dashboard-metric-grid, .form-grid, .two-column-form { grid-template-columns: 1fr; }
    .dashboard-date { align-items: flex-start; }
    .section-heading.with-action { grid-template-columns: 30px 1fr; }
    .section-heading.with-action .btn { grid-column: 2; justify-self: start; }
    .line-editor { grid-template-columns: 1fr; }
    .total-strip { flex-direction: column; gap: 10px; }
    .total-strip > div { text-align: left; }
    .detail-list { grid-template-columns: 1fr; }
    .detail-list dt { border-bottom: 0; padding-bottom: 0; }
    .detail-list dd { padding-top: 2px; }
    .purchasing-context-grid, .demand-input-grid, .weight-grid, .demand-result-grid { grid-template-columns: 1fr; }
    .product-search-row, .product-result-row { grid-template-columns: 1fr; }
    .purchasing-form-actions { align-items: stretch; flex-direction: column; }
}
.rkb-search-select{position:relative;min-width:0}.rkb-search-select.disabled{opacity:.72}.rkb-search-select-menu{position:absolute;z-index:1300;left:0;right:0;top:calc(100% + 3px);max-height:17rem;overflow:auto;background:#fff;border:1px solid #cfd6de;border-radius:.45rem;box-shadow:0 .55rem 1.4rem rgba(28,38,49,.16);padding:.25rem}.rkb-search-select-option{display:flex;width:100%;flex-direction:column;align-items:flex-start;border:0;background:transparent;border-radius:.3rem;padding:.45rem .55rem;text-align:left;color:#202830}.rkb-search-select-option span{font-size: var(--erp-type-value, .78rem);color:#68737e}.rkb-search-select-option:hover,.rkb-search-select-option.highlighted{background:#e8f2ff;color:#102d4a}.rkb-search-select-state{padding:.65rem;color:#69747e;font-size: var(--erp-type-value, .84rem)}.rkb-search-select-input:focus{border-color:#6d93bb;box-shadow:0 0 0 .15rem rgba(45,111,178,.13)}
.rkb-search-select-menu.floating{position:fixed;left:auto;right:auto;top:auto;z-index:1400}
.location-hierarchy-code { align-items: center; display: inline-flex; gap: .25rem; padding-left: calc(var(--location-depth, 0) * 1.15rem); }
.location-tree-branch { color: #8b96a1; font-weight: var(--erp-weight-medium, 500); }

/* Purchase Order (list, Draft entry, Estimasi, print). Consolidated from the former page-local style block. */
.po-general-summary { margin: 0; padding: 10px 14px; }
.po-general-summary-grid { display: grid; gap: 6px 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.po-general-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.po-general-field span { color: #6c7684; font-size: var(--erp-type-label, .68rem); letter-spacing: var(--erp-tracking-label, .035em); line-height: var(--erp-leading-label, 1.1); text-transform: uppercase; }
.po-general-field strong { font-size: var(--erp-type-value, .8rem); font-weight: var(--erp-weight-emphasis, 600); line-height: var(--erp-leading-value, 1.3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-general-field small { color: var(--erp-muted); font-size: var(--erp-type-meta, .7rem); line-height: var(--erp-leading-meta, 1.3); }
.po-replacement-link { color: #315f87; font-size: var(--erp-type-action, .78rem); font-weight: var(--erp-weight-emphasis, 600); text-decoration: none; }
.po-replacement-link:hover { text-decoration: underline; }
.po-general-note { border-top: 1px solid #e4e8ec; grid-column: 1 / -1; padding-top: 6px; }
.po-general-note strong { white-space: normal; }
.po-inline-item-table { min-width: 0 !important; }
.po-inline-item-table td, .po-inline-item-table th { vertical-align: middle; }
.po-row-control-column, .po-row-control-cell { text-align: center; white-space: nowrap; }
.po-row-control-column > span, .po-row-control-column > input, .po-row-control-cell > span, .po-row-control-cell > input { vertical-align: middle; }
.po-row-control-column > span, .po-row-control-cell > span { display: inline-block; margin-right: .35rem; }
.po-drag-handle { color: #8a949e; cursor: grab; }
.po-drag-handle.disabled { cursor: not-allowed; opacity: .45; }
.po-line-row { cursor: default; }
.po-line-row.selected td { background: #edf5ff; }
.po-line-row:focus { outline: 2px solid rgba(63, 120, 181, .28); outline-offset: -2px; }
.po-line-row.dragging { background: #edf4fb; opacity: .58; }
.po-estimate-mismatch { border-left:0; }
.po-line-note { color: #626d77; display: block; max-width: 18rem; white-space: normal; }
.po-add-note { font-size: 1rem !important; margin-left: .35rem; padding: .1rem .3rem; }
.po-add-product-row td { background: #fafbfd; }
.po-add-product-row button { font-size: var(--erp-type-action, .84rem); }
.po-inline-editor-row td, .po-existing-line-editor td { background: #edf5ff !important; }
.po-existing-line-editor { height: auto; }
.po-inline-editable, .po-inline-editable.form-control { background: transparent !important; border: 0 !important; border-bottom: 1px dotted #6c8eaf !important; border-radius: 0 !important; box-shadow: none !important; font-size: var(--erp-type-value, .88rem); min-height: 30px; min-width: 0; padding: .2rem .15rem !important; width: 100%; }
.po-inline-editable:focus { border-bottom: 1px solid #2f6ea5 !important; outline: 0; }
.po-inline-editor-row .rkb-search-select-input { min-height: 32px; }
.po-inline-row-actions { display: flex; gap: .25rem; }
.po-line-validation { display: block; line-height: var(--erp-leading-value, 1.2); margin-top: .3rem; white-space: normal; }
.po-line-hint { color: var(--erp-muted); display: block; font-size: var(--erp-type-meta, .74rem); line-height: var(--erp-leading-meta, 1.25); }
.po-estimate-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: space-between; margin-bottom: 8px; }
.po-estimate-dates { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; }
.po-estimate-dates label { align-items: center; color: #586477; display: flex; font-size: var(--erp-type-label, .78rem); font-weight: var(--erp-weight-label, 650); gap: .35rem; white-space: nowrap; }
.po-estimate-dates input { width: 145px; }
.rkb-date-input { align-items: stretch; display: flex; gap: .3rem; min-width: 0; }
.rkb-date-input > .form-control { min-width: 0; }
.rkb-date-calendar-trigger { align-items: center; background: #fff; border: 1px solid #c8d1dc; border-radius: 5px; color: #334155; display: inline-flex; flex: 0 0 34px; height: 32px; justify-content: center; overflow: hidden; position: relative; width: 34px; }
.rkb-date-calendar-trigger svg { fill: none; height: 17px; pointer-events: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 17px; }
.rkb-date-native-trigger { cursor: pointer; inset: 0; opacity: 0; position: absolute; width: 100%; }
.rkb-date-calendar-trigger:focus-within { border-color: #6f91b5; box-shadow: 0 0 0 2px rgba(68,112,158,.15); }
.po-estimate-dates small { color: var(--erp-muted); }
.po-estimate-table { min-width: 2400px; }
.po-estimate-table thead th { text-align: center; }
.po-estimate-table td input.form-control { min-width: 72px; }
.po-placeholder-cell { background: #f7f8fa; color: #8a949e; }
.po-estimate-add-table-row td { background: #fafbfd; padding: .45rem; }
.po-estimate-add-row { align-items: end; display: grid; gap: .5rem; grid-template-columns: minmax(18rem, 2fr) 7rem 10rem auto auto; margin: 0; }
.po-estimate-add-row small { color: #626d77; grid-column: 1 / -1; }
.supplier-picker { position: relative; }
.supplier-guided-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.po-print-toolbar { display: flex; gap: .7rem; justify-content: flex-end; margin-bottom: 1rem; }
.po-print-document { background: #fff; color: #111; font-family: Arial, sans-serif; margin: 0 auto; max-width: 1100px; padding: 2rem; }
.po-print-document header { border-bottom: 2px solid #111; text-align: center; }
.po-print-meta dl { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.po-print-meta dl div { display: grid; grid-template-columns: 7rem 1fr; }
.po-print-meta dd { margin: 0; }
.po-print-table { border-collapse: collapse; width: 100%; }
.po-print-table th, .po-print-table td { border: 1px solid #444; padding: .45rem; }
.po-print-summary { align-items: flex-end; display: flex; flex-direction: column; gap: .35rem; margin: 1rem 0; }
.po-print-document footer { border-top: 1px solid #777; margin-top: 2rem; padding-top: .7rem; }
.po-print-document{width:210mm;max-width:100%;margin:16px auto;padding:17mm;background:white;color:#26313c;font-size:12px}
.po-print-document>header{display:flex;justify-content:space-between;gap:24px;border-bottom:2px solid #26313c;padding-bottom:16px;margin-bottom:20px}
.po-print-document>header>div:last-child{text-align:right;font-size:14px}
.po-print-document h1{font-size:14px;margin:0 0 6px}.po-print-document h2{font-size:22px;margin:0}
.po-print-meta dl{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:22px}
.po-print-meta dl div{display:block}.po-print-meta dt{text-transform:uppercase;font-size:10px;color:#65747f;margin-bottom:5px}
.po-print-table th,.po-print-table td{padding:7px 6px;border-color:#d5dce1;font-size:11px;vertical-align:top}
.po-print-table th{background:#edf3f6}.po-print-table .numeric-cell{text-align:right;white-space:nowrap}
.po-print-table th:nth-child(2){width:36%}.po-print-document footer{border-color:#d5dce1;margin-top:20px;font-size:11px}
.read-only { background: #f3f5f7; }
@media (max-width: 1100px) { .po-general-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .po-estimate-add-row { grid-template-columns: 1fr 1fr; } .po-estimate-add-row .rkb-search-select { grid-column: 1 / -1; } }
@media (max-width: 700px) { .po-general-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .po-estimate-toolbar { align-items: flex-start; flex-direction: column; } }
@media print {
    body * { visibility: hidden !important; }
    .po-print-document, .po-print-document * { visibility: visible !important; }
    .po-print-document { inset: 0; max-width: none; padding: 0; position: absolute; }
    .no-print { display: none !important; }
}

/* Item Pesanan: Kode cell carries the note beneath the code; the note icon is the edit affordance. */
.po-code-cell { align-items: center; display: flex; gap: .15rem; min-width: 0; }
.po-code-cell strong { overflow: hidden; text-overflow: ellipsis; }
.po-code-cell .po-add-note { font-size: .9rem !important; line-height: 1; margin-left: .1rem; opacity: .55; padding: .05rem .25rem; }
.po-line-row:hover .po-code-cell .po-add-note, .po-code-cell .po-add-note:focus-visible { opacity: 1; }
.po-line-note { color: #5f6b78; display: block; font-size: var(--erp-type-meta, .76rem); line-height: var(--erp-leading-meta, 1.25); margin-top: 1px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-drag-handle[draggable="true"] { cursor: grab; }
.po-drag-handle[draggable="true"]:active { cursor: grabbing; }
.po-row-control-cell input[type="checkbox"] { cursor: pointer; height: 17px; width: 17px; }
.po-inline-editor-row .visually-hidden { position: absolute; }

/* Input Pembelian (receiving workspace) */
.po-invoice-panel { display: grid; gap: 10px; padding: 12px 14px; }
.po-invoice-panel .product-tab-toolbar { margin-bottom: 0; }
.po-invoice-grid { grid-template-columns: minmax(200px, 1.2fr) minmax(160px, .8fr) minmax(260px, 2fr); }
.po-invoice-grid .form-span-2 { grid-column: auto; }
.po-invoice-totals { align-items: center; border-top: 1px solid var(--erp-border); color: var(--erp-muted); display: flex; flex-wrap: wrap; font-size: var(--erp-type-value, .82rem); gap: 6px 18px; padding-top: 8px; }
.po-invoice-totals strong { color: var(--erp-text); }
.po-line-cancelled td { color: #9aa4b1; text-decoration: line-through; }
.po-line-cancelled td[data-column="ACTION"] { text-decoration: none; }
.po-receiving-flags { display: grid; gap: 3px; min-width: 200px; }
.po-receiving-flags label { align-items: center; display: flex; font-size: var(--erp-type-label, .78rem); gap: 5px; white-space: nowrap; }
.po-receiving-flags input[type="checkbox"] { height: 15px; width: 15px; }
.po-receiving-line-summary { align-items: center; display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 0 0 8px; min-height: 26px; }
.po-receiving-line-summary > span { color: var(--erp-muted); font-size: var(--erp-type-value, .78rem); white-space: nowrap; }
.po-receiving-line-summary > span strong { color: var(--erp-text); margin-left: 3px; }
.po-receiving-line-summary > span.warning strong { color: #8a5b08; }
.po-receiving-line-summary > span.danger strong { color: #a83434; }
.po-receiving-unresolved td { background-image:none; }
.po-inline-editor-row select.po-inline-editable { min-height: 30px; padding-right: 1.4rem !important; }
.po-confirm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.po-print-check { white-space: nowrap; }
@media (max-width: 900px) { .po-invoice-grid { grid-template-columns: 1fr; } }

/* Purchase Order detail workspace (adopted from the UI Lab "Detail Page" prototype):
   one compact panel = identity row + inline metadata + actions, then tabs and tab body. */
.po-workspace { display: grid; gap: 0; padding: 10px 14px 14px; }
.po-detail-header { padding: 0 0 10px; }
.po-detail-identity { display: grid; flex: 1 1 0; gap: 6px; min-width: 0; }
.po-detail-title-row { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.po-detail-title-row h1 { color: #172033; font-size: var(--erp-type-title, 1.3rem); font-weight: var(--erp-weight-title, 740); letter-spacing: var(--erp-tracking-title, -.01em); line-height: var(--erp-leading-title, 1.25); margin: 0; }
.po-detail-title-row .status-badge { font-size: var(--erp-type-badge, .72rem); }
.po-detail-subtle { color: var(--erp-muted); font-size: var(--erp-type-meta, .8rem); }
.po-detail-meta { display: grid; gap: 8px 18px; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); margin: 0; width: 100%; }
.po-detail-meta .po-general-field { gap: 1px; }
.po-detail-meta dt { color: var(--erp-muted); font-size: var(--erp-type-label, .66rem); font-weight: var(--erp-weight-emphasis, 700); letter-spacing: var(--erp-tracking-label, .05em); text-transform: uppercase; }
.po-detail-meta dd { font-size: var(--erp-type-value, .84rem); font-weight: var(--erp-weight-emphasis, 600); line-height: var(--erp-leading-value, 1.3); margin: 0; max-width: 34rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.po-detail-meta .po-meta-primary dd { font-size: var(--erp-type-value, .9rem); }
.po-detail-meta .po-meta-wide { grid-column: 1 / -1; }
.po-detail-meta .po-meta-wide dd { max-width: none; white-space: normal; }
.po-detail-meta dd.muted { color: #8d97a4; font-weight: var(--erp-weight-medium, 500); }
.po-detail-actions { align-items: center; display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; }
.po-workspace > .alert { margin: 0 0 8px; }
.po-detail-tabs { padding: 0; }
.po-detail-tabs button { min-height: 38px; padding: 8px 12px 6px; }
.tab-count { background: #e4e9ef; border-radius: 999px; color: #3a4657; font-size: var(--erp-type-badge, .68rem); font-weight: var(--erp-weight-emphasis, 700); margin-left: 5px; padding: 1px 6px; }
.product-detail-tabs button.active .tab-count { background: #dbe7f5; color: #1f4f82; }
.po-detail-tab-content { padding: 12px 0 0; }
.po-tab-toolbar { margin-bottom: 8px; }
.po-tab-toolbar .product-detail-table-actions { margin-left: auto; }
.po-total-cell strong { font-size: inherit; }
.po-inline-item-table tfoot td { background: #f8fafc; border-top: 1px solid var(--erp-border-strong); }
.po-line-row.selected td:first-child { box-shadow: inset 3px 0 #8fbbe6; }
.po-estimate-table thead th.po-estimate-group { background: #e8eef5; border-left: 2px solid #c9d4e0; }
.po-estimate-table thead th.total, .po-estimate-table td.total { background: #eef4ea; }
.po-estimate-table thead th.po-estimate-ph, .po-estimate-table td.po-placeholder-cell { color: #a7b0bb; }
.po-estimate-table thead th.po-estimate-ed { color: #2d5f9a; }
.po-estimate-table td.po-estimate-first, .po-estimate-table thead th.po-estimate-first { border-left: 2px solid #dfe6ee; }
.po-estimate-table td.po-estimate-name { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; }
.po-estimate-table td.po-placeholder-cell { background: #f9fafb; text-align: right; }
.po-estimate-table td.po-placeholder-cell.total { background: #eef4ea; }
.po-estimate-table .po-estimate-sticky { position: sticky; background: #fff; }
.po-estimate-table thead .po-estimate-sticky { z-index: 8; background: #f1f4f7; }
.po-estimate-table tbody .po-estimate-sticky { z-index: 3; }
.po-estimate-table .po-estimate-sticky-code { left: var(--po-estimate-code-left, 0); min-width: 130px; }
.po-estimate-table .po-estimate-sticky-barcode { left: var(--po-estimate-barcode-left, 130px); min-width: 140px; }
.po-estimate-table .po-estimate-sticky-name { left: var(--po-estimate-name-left, 270px); min-width: 240px; }
.po-estimate-table .po-estimate-sticky-name { box-shadow: 2px 0 0 #cbd5e1; }
.po-estimate-table tbody tr:hover .po-estimate-sticky { background: #f7fbff; }
.po-estimate-table tbody tr.selected .po-estimate-sticky,.po-estimate-table tbody tr.rkb-keyboard-selected .po-estimate-sticky { background: #eaf3ff; }
.po-estimate-plan-cell { min-width: 68px; }
.po-estimate-table td input.po-estimate-quantity-input { min-width: 54px; width: 64px; padding-inline: .35rem; text-align: right; }
.po-estimate-header-icon { align-items: center; display: inline-flex; justify-content: center; min-width: 20px; }
.po-estimate-header-icon svg { fill: none; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; width: 20px; }
@media (max-width: 1200px) { .po-detail-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } .po-detail-meta dd { max-width: none; } }
@media (max-width: 760px) { .po-detail-actions { justify-content: flex-start; } .po-detail-identity { width: 100%; } .po-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .po-detail-meta { grid-template-columns: minmax(0, 1fr); } }

/* Purchasing reconciliation, lineage, and receiving exceptions (098). */
.po-number-with-lineage { align-items: center; display: inline-flex; gap: 6px; white-space: nowrap; }
.po-number-with-lineage small { color: var(--erp-muted); font-size: var(--erp-type-meta, .7rem); font-weight: var(--erp-weight-medium, 500); }
.po-lineage-toggle { background: none; border: 0; color: #607086; cursor: pointer; font-size: var(--erp-type-value, .72rem); padding: 2px; }
.po-lineage-child-row { background: #f6f8fb; cursor: pointer; }
.po-lineage-child-row td[data-column="NUMBER"] { align-items: center; display: flex; gap: 9px; padding-left: 2.5rem; }
.po-lineage-child-row small, .po-lineage-branch { color: var(--erp-muted); }
.po-lineage-strip { align-items: center; background: #f6f8fb; border-left: 3px solid #91a8bf; display: flex; flex-wrap: wrap; gap: 7px 12px; padding: 6px 9px; }
.po-lineage-strip a { color: #245b91; font-weight: var(--erp-weight-emphasis, 650); }
.purchase-reconciliation-page { display: grid; gap: 12px; }
.reconciliation-workspace { display: grid; gap: 14px; padding: 16px; }
.reconciliation-header, .reconciliation-section-title { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.reconciliation-header h1 { font-size: var(--erp-type-title, 1.35rem); margin: 2px 0 3px; }
.reconciliation-header p, .reconciliation-section-title p { color: var(--erp-muted); margin: 0; }
.reconciliation-source-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); }
.reconciliation-source-list article { background: #f7f9fb; border: 1px solid var(--erp-border); border-radius: 7px; display: grid; gap: 3px; padding: 9px 11px; }
.reconciliation-source-list article.merge-main-option { cursor: pointer; outline: none; }
.reconciliation-source-list article.merge-main-option:hover { border-color: #9bb9d2; background: #f2f7fb; }
.reconciliation-source-list article.merge-main-option:focus-visible { box-shadow: 0 0 0 3px rgba(37,93,145,.18); border-color: #3976aa; }
.reconciliation-source-list article.merge-main-selected::after { color: #315f91; content: "Dipilih sebagai Main PO"; font-size: var(--erp-type-value, .72rem); font-weight: var(--erp-weight-emphasis, 650); }
.reconciliation-source-list article > div { align-items: center; display: flex; gap: 7px; }
.reconciliation-source-list small { color: var(--erp-muted); }
.reconciliation-section { border-top: 1px solid var(--erp-border); display: grid; gap: 12px; padding-top: 13px; }
.reconciliation-section h2 { font-size: var(--erp-type-section, 1rem); margin: 0; }
.reconciliation-reason { display: grid; font-size: var(--erp-type-value, .8rem); font-weight: var(--erp-weight-emphasis, 650); gap: 4px; max-width: 720px; }
.reconciliation-reason-grid { display: grid; gap: 10px; grid-template-columns: minmax(260px, .85fr) minmax(300px, 1.15fr); max-width: 920px; }
.reconciliation-reason-grid .reconciliation-reason { max-width: none; }
.split-allocation { align-items: center; display: flex; gap: 6px; margin: 0; }
.split-allocation input[type="number"] { border: 1px solid var(--erp-border); border-radius: 4px; max-width: 90px; padding: 4px 6px; }
.table-cell-success { background: #e9f6ed !important; color: #245f36; }
.receiving-workspace-card { display: grid; gap: 0; padding: 12px 14px 14px; }
.receiving-workspace-card > .product-identity-header { padding-bottom: 10px; }
.receiving-workspace-card > .po-general-summary, .receiving-workspace-card > .po-invoice-panel { border-top: 1px solid var(--erp-border); padding: 11px 0; }
.receiving-workspace-card > .product-detail-tab-card { border-top: 1px solid var(--erp-border); padding-top: 5px; }
.receiving-location-field .rkb-search-select { margin-top: 3px; }
.segmented-compact { align-items: center; background: #f1f4f7; border-radius: 6px; display: inline-flex; padding: 2px; }
.segmented-compact button { background: transparent; border: 0; border-radius: 4px; color: var(--erp-muted); font-size: var(--erp-type-action, .75rem); padding: 4px 8px; }
.segmented-compact button.active { background: #fff; box-shadow: 0 1px 2px rgba(30,42,56,.14); color: var(--erp-text); }
.po-line-cancelled td:not([data-column="ACTION"]) { text-decoration: line-through; }
.po-line-cancelled td[data-column="ACTION"] { display: grid; gap: 2px; }
.po-line-receiving-addition td[data-column="CODE"] { border-left:2px solid #5b9cb6; }
.receiving-issues-tab, .receiving-issue-list, .receiving-issue-main { display: grid; gap: 9px; }
.receiving-issue-editor, .receiving-issue-resolution { background: #f7f9fb; border: 1px solid var(--erp-border); border-radius: 7px; padding: 11px; }
.receiving-issue-card { align-items: flex-start; border: 1px solid var(--erp-border); border-left: 3px solid #dda92e; border-radius: 6px; display: flex; gap: 12px; justify-content: space-between; padding: 9px 11px; }
.receiving-issue-card.blocking { border-left-color: #c64a4a; }
.receiving-issue-main > div { align-items: center; display: flex; flex-wrap: wrap; gap: 7px; }
.receiving-issue-main p { margin: 0; }
.receiving-issue-main small { color: var(--erp-muted); display: block; }
@media (max-width: 760px) { .reconciliation-header, .reconciliation-section-title { flex-direction: column; } }
/* Universal keyboard discovery, close controls, and operational receiving. */
[data-rkb-shortcut]{position:relative}
.rkb-shortcut-discovery [data-rkb-shortcut-active=true]::after{content:"[" attr(data-rkb-shortcut) "]";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:rgba(17,24,39,.78);color:#fff;font-size: var(--erp-type-value, .78rem);font-weight: var(--erp-weight-emphasis, 700);letter-spacing: var(--erp-tracking-value, .04em);pointer-events:none;z-index:20}
/* One continuous selection band; validation text and warning fills retain meaning. */
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected){--rkb-selection-top:inset 0 1px #a6c5ee;--rkb-selection-bottom:inset 0 -1px #a6c5ee}
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected)+tr:is(.rkb-keyboard-selected,.selected){--rkb-selection-top:inset 0 0 transparent}
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected):has(+tr:is(.rkb-keyboard-selected,.selected)){--rkb-selection-bottom:inset 0 0 transparent}
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected)>td{background-image:linear-gradient(#528bd51a,#528bd51a);box-shadow:var(--rkb-selection-top),var(--rkb-selection-bottom)}
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected)>td:first-child{box-shadow:inset 1px 0 #a6c5ee,var(--rkb-selection-top),var(--rkb-selection-bottom)}
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected)>td:last-child{box-shadow:inset -1px 0 #a6c5ee,var(--rkb-selection-top),var(--rkb-selection-bottom)}
.rkb-table-foundation tbody tr:is(.rkb-keyboard-selected,.selected):has(+tr:is(.rkb-keyboard-selected,.selected))>td{border-bottom-color:#d8e4f3}
.rkb-table-foundation :is(.form-control,.po-inline-editable,.rkb-cell-input,select):focus{outline:1px solid #2864bb;outline-offset:-1px;box-shadow:none}
.rkb-detail-context-nav{display:flex;align-items:center;justify-content:flex-end;gap:.55rem;min-height:32px;margin:0 0 .65rem;color:#4b5563;font-size: var(--erp-type-action, .84rem);font-variant-numeric:tabular-nums}
.rkb-detail-context-nav.compact{display:inline-flex;margin:0 .35rem 0 0}
.rkb-detail-context-nav>span{min-width:54px;text-align:center;white-space:nowrap}
.rkb-entity-detail-header{display:grid;gap:.6rem;min-width:0}
.rkb-detail-identity-row{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;min-width:0}
.rkb-detail-identity-row h1{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin:0;color:#172033;font-size: var(--erp-type-title, 1.3rem);line-height: var(--erp-leading-title, 1.25)}
.rkb-detail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.65rem;min-width:0}
.rkb-detail-toolbar:has(>.rkb-stage-strip){flex-wrap:wrap}
.rkb-detail-toolbar:has(>.rkb-stage-strip)>.rkb-detail-toolbar-actions{margin-left:auto;max-width:100%}
.rkb-detail-toolbar-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.38rem;min-width:0}
.rkb-detail-navigator,.product-adjacent-buttons{display:inline-flex;align-items:center;gap:.38rem;flex:0 0 auto;color:#4b5563;font-size: var(--erp-type-action, .84rem);font-variant-numeric:tabular-nums}
.rkb-detail-navigator>span:not(.rkb-action-control),.rkb-detail-nav-count{min-width:58px;text-align:center;white-space:nowrap}
.rkb-detail-navigator .btn,.product-adjacent-buttons .btn{align-items:center;display:inline-flex;justify-content:center;min-width:2rem;padding-inline:.45rem}
.rkb-detail-header-info{border-top:1px solid var(--erp-border);padding-top:.65rem}
/* Shared metadata -> divider -> tabs rhythm, using the existing detail scale. */
.rkb-detail-tab-section { border-top: 1px solid var(--erp-border); margin-top: .65rem; padding-top: .65rem; }
/* Keep pagination separate from the table/action rows (existing 8px toolbar scale). */
.rkb-detail-table-pager { margin-block: 8px; }
.rkb-icon-button{align-items:center;display:inline-flex;justify-content:center;min-height:31px;min-width:32px;padding:.25rem .42rem}
.rkb-icon-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.rkb-icon-button:focus-visible,.rkb-detail-navigator .btn:focus-visible{outline:2px solid #2f6fa7;outline-offset:2px}
.receiving-detail-header{padding-bottom:.65rem}
.receiving-workspace-card>.receiving-detail-header+.alert{margin-top:0}
@media(max-width:760px){.rkb-detail-toolbar{align-items:flex-start;flex-direction:column}.rkb-detail-navigator{align-self:flex-start}}
.receiving-header-edit-page{overflow-x:hidden}
.receiving-header-edit-card{width:min(100%,780px);margin:0 auto}
.receiving-header-edit-card h1{margin:.15rem 0 .2rem;font-size: var(--erp-type-title, 1.35rem)}
.receiving-header-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1rem;margin-top:1rem}
.receiving-header-form label{display:grid;gap:.35rem;min-width:0;font-size: var(--erp-type-label, .84rem);font-weight: var(--erp-weight-label, 600);color:#374151}
.receiving-header-form-wide{grid-column:1/-1}
.receiving-header-form textarea{width:100%;max-width:100%;resize:vertical;overflow-wrap:anywhere}
@media(max-width:700px){.receiving-header-form{grid-template-columns:minmax(0,1fr)}.receiving-header-form-wide{grid-column:auto}.rkb-detail-context-nav{justify-content:flex-start}}
.rkb-close-button{display:inline-flex;align-items:center;justify-content:center;width:1.8rem;height:1.8rem;min-width:1.8rem;padding:0;border:0;border-radius:.35rem;background:transparent;color:#4b5563;font:inherit;font-size:1.25rem;line-height:1;cursor:pointer}
.rkb-close-button:hover,.rkb-close-button:focus-visible{background:#e5e7eb;color:#111827;outline:2px solid transparent}
.rkb-dismissible-message{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}
.rkb-dismissible-message>span{min-width:0}
.rkb-search-select-create{display:block;padding:.55rem .7rem;border-top:1px solid #e5e7eb;color:#1d4ed8;font-size: var(--erp-type-value, .82rem);font-weight: var(--erp-weight-emphasis, 600);text-decoration:none}
.rkb-search-select-create:hover,.rkb-search-select-create:focus{background:#eff6ff;color:#1e40af}
.receiving-tax-all-select{width:auto;max-width:12rem}
.receiving-discount-all-input{width:8.5rem}
.receiving-line-actions{display:grid;gap:.45rem;justify-items:end;margin-bottom:.55rem;min-height:36px}
.receiving-action-row{align-items:center;display:flex;flex-wrap:wrap;gap:.4rem;justify-content:flex-end;max-width:100%}
.receiving-action-row .rkb-column-chooser-anchor{display:inline-flex}
.receiving-remove-dialog{display:grid;gap:14px;width:min(700px,calc(100vw - 32px))!important}
.receiving-remove-dialog .product-field,.receiving-remove-dialog .form-control{width:100%}
.receiving-remove-dialog .rkb-filter-checkbox-group{margin:0}
.receiving-remove-dialog .rkb-modal-actions{margin-top:6px}
.receiving-table-summary{display:flex;justify-content:space-between;gap:1.25rem;padding:.7rem .85rem;border-top:1px solid #d8dee7;background:#f8fafc;font-size: var(--erp-type-value, .82rem)}
.receiving-table-summary>div{display:grid;gap:.2rem;min-width:0}.receiving-table-summary>div span{color:#64748b}.receiving-table-summary>div strong{font-weight: var(--erp-weight-emphasis, 600);overflow-wrap:anywhere}
.receiving-table-summary dl{display:grid;grid-template-columns:auto auto;gap:.22rem 1rem;margin:0;min-width:15rem}.receiving-table-summary dl>div{display:contents}.receiving-table-summary dt{font-weight: var(--erp-weight-medium, 500);color:#475569}.receiving-table-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}.receiving-table-summary .grand dt,.receiving-table-summary .grand dd{font-weight: var(--erp-weight-emphasis, 700);color:#111827}
.po-add-product-row td{background:#f7fbff}.po-add-product-row .rkb-search-select{min-width:0;width:100%}
@media(max-width:760px){.receiving-line-actions{justify-items:stretch}.receiving-action-row{justify-content:flex-start}.receiving-table-summary{flex-direction:column}.receiving-table-summary dl{min-width:0}}

/* Shared opt-in workspaces: available page width owns siblings; columns own only table width. */
.rkb-operational-list { gap: 10px; overflow: visible; }
.rkb-operational-list > *, .rkb-width-isolated-workspace > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.rkb-operational-list .product-list-sticky-tools { padding-bottom: 0; }
.rkb-table-toolbar-divided { border-top:1px solid var(--erp-border); margin-top:8px; padding-top:8px; }
.rkb-account-guidance { font-size:var(--erp-type-value); line-height:var(--erp-leading-value); margin-block:12px; }
.rkb-account-guidance summary { cursor:pointer; font-weight:var(--erp-weight-medium); }
.rkb-account-guidance dl { margin:12px 0 0; }
.rkb-account-guidance dd { margin-bottom:8px; }
.rkb-operational-list .product-master-sticky-header-host { margin: 0; }
.rkb-operational-list .rkb-table-wrap > table thead th,
.rkb-width-isolated-workspace table[data-rkb-page-sticky-header] thead th { position: relative; top: auto; }
.rkb-operational-list .table-column-resizer,
.rkb-width-isolated-workspace .table-column-resizer { right: 0; width: 10px; }
.rkb-operational-list .table-column-resizer::after,
.rkb-width-isolated-workspace .table-column-resizer::after { right: 1px; }
.rkb-operational-list .product-search-main-row { flex-wrap: wrap; }
.rkb-operational-list .product-chip-input { min-width: min(260px,100%); }
.rkb-operational-list .rkb-detail-table-pager { margin-bottom: 0; }
.rkb-width-isolated-workspace { grid-template-columns: minmax(0,1fr); width: 100%; overflow: visible; }
.rkb-width-isolated-workspace .product-detail-tab-content { min-width: 0; max-width: 100%; overflow: visible; }
.rkb-width-isolated-workspace .product-detail-tab-content > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.rkb-width-isolated-workspace .rkb-detail-identity-row { overflow-wrap: anywhere; }
.rkb-width-isolated-workspace .form-grid { min-width: 0; }
.rkb-operational-workspace {
 --rkb-operational-row-height: 36px; --rkb-operational-header-height: 40px;
 min-height: calc(var(--rkb-page-capacity,25) * var(--rkb-operational-row-height) + var(--rkb-operational-header-height));
 background: #fff; align-self: stretch;
}
.rkb-operational-workspace > table { height: auto; margin-bottom: 0; }
.rkb-table-wrap.rkb-table-natural-height { min-height: 0; height: auto; }
/* Bounded operational registers keep their headings visible while their own
   rows scroll. The same wrapper retains local horizontal scrolling and saved
   column widths; it does not alter compact row geometry. */
.rkb-table-wrap.rkb-register-scroll { max-height: min(72dvh, 760px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.rkb-register-scroll > table thead th,
.rkb-register-scroll > table.rkb-table-advanced thead th,
.rkb-register-scroll > table.rkb-table-advanced th[data-column] {
 position: sticky; top: 0; z-index: 3; background: var(--erp-table-header-bg, #eef2f6);
}
.rkb-table-wrap.rkb-register-scroll > table thead th {
 position: sticky !important; top: 0; z-index: 3;
}
.rkb-page-capacity-control { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--erp-type-action, .875rem); }
.rkb-page-capacity-control select { border: 0; background: transparent; font: inherit; }
.rkb-summary-action-toolbar { display: flex; width: 100%; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.rkb-summary-action-toolbar > .product-detail-table-actions { display:flex; align-items:center; gap:7px; margin-left:auto; flex:0 0 auto; }
.rkb-receiving-summary { display: flex; flex: 1 1 360px; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: var(--erp-type-value, 14px); line-height: var(--erp-leading-value, 1.6); }
.rkb-receiving-summary span { white-space: nowrap; }
.rkb-receiving-summary strong { font-size: var(--erp-type-value, 16px); font-weight: var(--erp-weight-emphasis, 600); font-variant-numeric: tabular-nums; }
.rkb-summary-action-toolbar .receiving-action-row { margin-left: auto; flex: 0 1 auto; }
/* Top-layer popovers keep their Blazor DOM owner and never borrow table/card height. */
.rkb-popover-control { display: inline-flex; align-items: center; }
.rkb-shared-popover { margin: 0; inset: auto; box-sizing: border-box; width: min(420px,calc(100vw - 16px)); max-width: calc(100vw - 16px); padding: 12px 14px; border: 1px solid var(--erp-border); border-radius: 9px; background: #fff; color: var(--erp-text,#172033); box-shadow: 0 14px 34px rgba(28,40,55,.18); overflow: auto; overflow-wrap: anywhere; overscroll-behavior: contain; font-size: var(--erp-type-body, .9rem); }
.rkb-shared-popover.rkb-popover-fallback { display: block; z-index: 1050; }
.rkb-shared-popover label { display: block; margin-top: 8px; }
.rkb-shared-popover { white-space: normal; text-align: left; font-weight: var(--erp-weight-regular, 400); line-height: var(--erp-leading-body, 1.5); }
.rkb-shared-popover.rkb-account-popover.rkb-information-table-popover { width:min(680px,calc(100vw - 24px)); max-width:calc(100vw - 24px); max-height:min(70vh,560px); overflow:auto; }
.rkb-information-table-popover .rkb-table-wrap { max-width:100%; overflow-x:auto; }
.rkb-information-table-popover table { min-width:560px; }
.rkb-information-table-popover :is(th,td):not(:last-child) { white-space:nowrap; }
.rkb-shared-popover .rkb-filter-popover-header { gap: 12px; }
.rkb-shared-popover .rkb-filter-popover-header button { min-width: 28px; min-height: 28px; }
.rkb-shared-popover h3 { font-size: var(--erp-type-subsection, .82rem); margin: 10px 0 6px; }
.rkb-shared-popover ul { padding-left: 20px; margin: 6px 0; }
.rkb-shared-popover li { margin: 6px 0; }
.rkb-popover-document { padding: 8px 0; border-bottom: 1px solid var(--erp-border); }
.rkb-popover-document p { margin: 6px 0; }
.rkb-popover-document a { display: block; margin-top: 6px; }

/* Shared master workspace: constrained form widths, grouped filters and stable pagers. */
.rkb-breadcrumbs { display:flex; flex-wrap:wrap; align-items:center; gap:0; font-size: var(--erp-type-value, .78rem); color:var(--erp-muted); }
.rkb-breadcrumbs > * + *::before { content:'/'; margin:0 .45rem; color:#9aa4b1; }
.rkb-breadcrumbs a { color:#48617c; text-decoration:none; }
.rkb-breadcrumbs a:hover { text-decoration:underline; }
.rkb-breadcrumbs [aria-current=page] { color:#445365; }
.nav-section-title a { color:inherit; text-decoration:none; }
.rkb-master-directory { max-width:800px; }
.rkb-master-directory > a { display:block; padding:18px 0; border-top:1px solid var(--erp-border); font-weight: var(--erp-weight-emphasis, 650); }
.rkb-master-directory > a span { display:block; color:var(--erp-muted); font-size: var(--erp-type-value, .85rem); font-weight: var(--erp-weight-regular, 400); }
.rkb-page-position { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.rkb-page-position > strong { min-width:4ch; text-align:left; }
.rkb-page-position .product-page-number, .rkb-page-position .product-page-input { box-sizing:border-box; width:6ch; min-width:6ch; height:27px; margin:0; padding:2px 4px; text-align:center; font-size:inherit; }
.rkb-filter-sections { display:grid; gap:16px; }
.rkb-filter-section { min-width:0; margin:0; padding:0; border:0; }
.rkb-filter-section + .rkb-filter-section { border-top:1px solid var(--erp-border); padding-top:12px; }
.rkb-filter-section legend { float:none; width:auto; margin:0 0 8px; font-size: var(--erp-type-label, .83rem); font-weight: var(--erp-weight-emphasis, 700); color:#26364c; }
.rkb-filter-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 16px; }
.rkb-filter-fields label { display:grid; gap:4px; min-width:0; color:#586477; font-size: var(--erp-type-label, .78rem); font-weight: var(--erp-weight-label, 600); }
.rkb-filter-fields .form-control, .rkb-filter-fields .form-select { font-weight: var(--erp-weight-regular, 400); }
.rkb-master-form { max-width:1000px; }
.rkb-master-form .product-general-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 24px; }
.rkb-master-form .rkb-master-identity-grid { grid-template-columns:minmax(150px,1fr) minmax(0,3fr); }
.rkb-form-heading { font-size: var(--erp-type-subsection, .88rem); font-weight: var(--erp-weight-emphasis, 700); margin:20px 0 12px; }
.rkb-form-heading:first-child { margin-top:0; }
.rkb-master-form .product-field.read-only { background:transparent; }
.rkb-master-form .product-field.read-only > div { background:transparent; border:0; padding:6px 0; }
.rkb-master-form .product-field.read-only small { margin-left:0; }
.rkb-master-status-row, .rkb-master-facts { display:flex; flex-wrap:wrap; gap:12px 32px; margin:16px 0; font-size: var(--erp-type-value, .85rem); }
.rkb-master-status-row label { display:flex; align-items:center; gap:8px; }
.rkb-master-status-row input { width:17px; height:17px; }
.rkb-master-facts > span { display:grid; gap:4px; color:var(--erp-muted); }
.rkb-master-facts strong { color:#26364c; }
.rkb-field-help { color:var(--erp-muted); font-size: var(--erp-type-meta, .8rem); margin:8px 0; }
.rkb-change-reason { display:grid; align-content:start; align-items:stretch; gap:5px; flex:0 1 auto; min-width:min(180px,100%); max-width:100%; }
.product-general-save-row > .rkb-change-reason:first-child { flex:0 1 340px; }
.rkb-change-reason label, .product-general-save-row .rkb-change-reason label { font-size: var(--erp-type-label, .78rem); flex:initial; margin:0; }
.rkb-table-add-row button { border:0; background:transparent; color:#315c9a; text-align:left; width:100%; padding:10px 4px; font:inherit; }
.rkb-table-compact .rkb-table-add-row button { padding-block:4px; min-height:28px; }
.rkb-table-add-row button:hover, .rkb-table-add-row button:focus-visible { background:#eef3f9; outline:2px solid #b9cce0; outline-offset:-2px; }
@media(max-width:640px) {
 .rkb-master-form .product-general-grid, .rkb-master-form .rkb-master-identity-grid { grid-template-columns:1fr; }
 .rkb-filter-fields { grid-template-columns:1fr; }
 .rkb-master-status-row, .rkb-master-facts { gap:12px 20px; }
}

/* Record workspace composition: opt-in shared pattern for master/detail screens. */
.rkb-record-workspace { --rkb-accent:#087da8; --rkb-accent-soft:#edf8fc; }
.rkb-record-workspace:not(.rkb-modal):not(dialog) { width:100%; max-width:100%; min-width:0; margin-inline:0; }
.rkb-record-workspace .btn-dark { background:var(--rkb-accent); border-color:var(--rkb-accent); }
.rkb-record-workspace .btn-dark:hover:not(:disabled) { background:#066385; border-color:#066385; }
.rkb-record-workspace .btn:focus-visible, .rkb-record-workspace input:focus-visible { outline:2px solid var(--rkb-accent); outline-offset:2px; }
.rkb-record-summary { background:var(--erp-surface); border:1px solid var(--erp-border); border-radius:10px; padding:12px 16px; gap:12px; margin-bottom:0; }
.rkb-record-symbol { display:grid; place-items:center; width:52px; height:52px; border-radius:12px; background:var(--rkb-accent-soft); color:var(--rkb-accent); flex:0 0 52px; }
.rkb-record-symbol svg { width:27px; height:27px; }
.rkb-record-summary .product-identity-copy { flex:1; min-width:0; }
.rkb-record-summary .product-identity-copy h1 { font-size: var(--erp-type-title, 1.25rem); line-height: var(--erp-leading-title, 1.35); margin:5px 0 8px; overflow-wrap:anywhere; }
.rkb-record-eyebrow { display:flex; align-items:center; gap:12px; color:var(--erp-muted); font-size: var(--erp-type-meta, .68rem); font-weight: var(--erp-weight-emphasis, 650); letter-spacing: var(--erp-tracking-meta, .08em); }
.rkb-record-eyebrow .status-badge { letter-spacing:0; font-size: var(--erp-type-badge, .72rem); }
.rkb-record-reference { display:flex; flex-wrap:wrap; gap:6px 20px; font-size: var(--erp-type-meta, .78rem); color:var(--erp-muted); }
.rkb-record-reference strong { color:#354456; margin-left:5px; font-weight: var(--erp-weight-emphasis, 600); }
.rkb-record-content { border-radius:10px; box-shadow:var(--erp-shadow); overflow:hidden; }
.rkb-record-content .product-detail-tabs { padding:0 20px; gap:10px; background:#fff; }
.rkb-record-content .product-detail-tabs button { min-height:46px; font-size: var(--erp-type-tab, .82rem); font-weight: var(--erp-weight-tab, 500); padding-inline:10px; }
.rkb-record-content .product-detail-tabs button.active { color:var(--rkb-accent); border-bottom-color:var(--rkb-accent); background:var(--rkb-accent-soft); font-weight: var(--erp-weight-tab, 650); }
.rkb-record-content .product-detail-tab-content { padding:14px 16px; min-height:0; }
.rkb-record-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
.rkb-form-section { min-width:0; }
.rkb-form-section + .rkb-form-section { padding-left:0; border-left:0; }
.rkb-form-section > header { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.rkb-section-icon { display:inline-flex; align-items:center; justify-content:center; flex:0 0 32px; width:32px; height:32px; background:var(--rkb-accent-soft,#edf8fc); color:var(--rkb-accent,#087da8); border-radius:8px; }
.rkb-section-icon svg { width:18px; height:18px; }
.rkb-form-section h2, .rkb-record-empty h2 { font-size: var(--erp-type-section, .9rem); font-weight: var(--erp-weight-section, 650); margin:0; }
.rkb-form-section header p { color:var(--erp-muted); margin:3px 0 0; font-size: var(--erp-type-meta, .76rem); }
.rkb-record-field { display:grid; gap:7px; color:#435266; font-size: var(--erp-type-label, .78rem); font-weight: var(--erp-weight-label, 600); min-width:0; }
.rkb-record-field small { color:var(--erp-muted); font-weight: var(--erp-weight-meta, 400); }
.rkb-record-field input { font-weight: var(--erp-weight-label, 400); }
.rkb-record-input-row { display:grid; grid-template-columns:minmax(120px,220px) minmax(0,1fr); align-items:end; gap:16px; margin-top:12px; }
.rkb-record-switch { display:flex; align-items:center; gap:10px; min-height:38px; font-size: var(--erp-type-value, .8rem); }
.rkb-record-switch input { accent-color:var(--rkb-accent); width:17px; height:17px; flex-shrink:0; }
.rkb-record-switch small { display:block; color:var(--erp-muted); font-size: var(--erp-type-meta, .7rem); margin-top:3px; }
.rkb-record-hint { display:flex; flex-wrap:wrap; gap:6px 12px; font-size: var(--erp-type-meta, .74rem); color:var(--erp-muted); margin-top:12px; }
.rkb-record-hint strong { font-weight: var(--erp-weight-medium, 500); }
.rkb-record-facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px 20px; margin:0 0 10px; }
.rkb-record-facts dt { font-size: var(--erp-type-label, .74rem); color:var(--erp-muted); font-weight: var(--erp-weight-medium, 500); margin-bottom:6px; }
.rkb-table-link { appearance:none; border:0; background:transparent; padding:0; margin:0; color:var(--rkb-accent,#245fbd); font:inherit; font-weight:600; text-align:left; cursor:pointer; }
.rkb-table-link:hover { text-decoration:underline; }
.rkb-table-link:focus-visible { outline:2px solid var(--rkb-accent,#245fbd); outline-offset:2px; border-radius:2px; }
.rkb-record-facts dd { font-size: var(--erp-type-value, .86rem); font-weight: var(--erp-weight-emphasis, 600); margin:0; overflow-wrap:anywhere; }
.rkb-record-facts .rkb-record-price { color:var(--rkb-accent); font-size: var(--erp-type-summary, 1.15rem); font-variant-numeric:tabular-nums; }
.rkb-record-facts.rkb-record-facts-stacked { grid-template-columns:minmax(0,1fr); gap:6px; }
.rkb-record-facts-stacked > div { display:grid; grid-template-columns:minmax(80px,110px) minmax(0,1fr); align-items:baseline; gap:8px; }
.rkb-record-facts-stacked dt { margin:0; font-size:var(--erp-type-value,13px); line-height:20px; }
.rkb-record-notice { display:flex; align-items:center; gap:10px; margin-top:12px; background:var(--erp-surface-soft); padding:8px 10px; border-radius:8px; }
.rkb-record-notice strong { font-size: var(--erp-type-value, .76rem); font-weight: var(--erp-weight-emphasis, 600); }
.rkb-record-notice p { font-size: var(--erp-type-meta, .74rem); color:var(--erp-muted); margin:3px 0 0; }
.rkb-record-save-bar { display:flex; align-items:end; flex-wrap:wrap; gap:12px 20px; border-top:1px solid var(--erp-border); padding-top:10px; margin-top:12px; }
.rkb-record-save-bar .rkb-change-reason { flex:0 1 270px; }
.rkb-save-state { color:var(--erp-muted); font-size: var(--erp-type-meta, .74rem); align-self:end; padding-bottom:8px; }
.rkb-record-save-actions { display:flex; gap:8px; margin-left:auto; }
.rkb-record-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:32px 20px; gap:10px; }
.rkb-record-empty p { max-width:440px; color:var(--erp-muted); font-size: var(--erp-type-meta, .82rem); margin:0; }
.rkb-availability-label { font-size: var(--erp-type-value, .7rem); color:#526275; background:#f0f3f6; padding:3px 8px; border-radius:20px; }
.rkb-filter-popover.rkb-filter-compact { width:min(420px,calc(100vw - 24px)); padding:12px; }
.rkb-filter-compact .rkb-filter-sections { gap:10px; }
.rkb-filter-compact .rkb-filter-section + .rkb-filter-section { padding-top:8px; }
.rkb-filter-compact .rkb-filter-section legend { font-size: var(--erp-type-label, .76rem); margin-bottom:7px; }
.rkb-filter-compact .rkb-filter-fields { gap:8px 12px; }
.rkb-filter-compact .form-control, .rkb-filter-compact .form-select { font-size: var(--erp-type-value, .8rem); min-height:34px; height:34px; padding-block:4px; }
@media(max-width:1000px) {
 .rkb-record-summary { flex-wrap:wrap; }
 .rkb-record-summary .product-detail-header-actions { margin-left:auto; }
 .rkb-record-columns { gap:20px; }
 .rkb-form-section + .rkb-form-section { padding-left:0; }
 .rkb-record-input-row { grid-template-columns:1fr; gap:14px; }
}
@media(max-width:720px) {
 .rkb-record-summary { padding:16px; gap:12px; }
 .rkb-record-symbol { width:40px; height:40px; flex-basis:40px; }
 .rkb-record-summary .product-identity-copy h1 { font-size: var(--erp-type-title, 1.1rem); }
 .rkb-record-summary .product-detail-header-actions { width:100%; justify-content:space-between; }
 .rkb-record-content .product-detail-tab-content { padding:16px; }
 .rkb-record-content .product-detail-tabs { padding-inline:8px; gap:0; }
 .rkb-record-columns { grid-template-columns:1fr; }
 .rkb-form-section + .rkb-form-section { border-left:0; border-top:1px solid var(--erp-border); padding:18px 0 0; }
 .rkb-record-input-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
 .rkb-record-save-bar .rkb-change-reason { flex:1 1 100%; }
 .rkb-filter-compact .rkb-filter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:420px) {
 .rkb-record-input-row, .rkb-filter-compact .rkb-filter-fields { grid-template-columns:1fr; }
}

/* Compact field captions sit in the control border without replacing labels. */
.rkb-filter-inset-labels .rkb-filter-fields { gap:12px 10px; padding-top:4px; }
.rkb-filter-inset-labels .rkb-filter-fields label { position:relative; gap:0; }
.rkb-filter-field-label { position:absolute; z-index:1; top:-7px; left:9px; padding:0 4px; background:#fff; font-size: var(--erp-type-label, .68rem); line-height: var(--erp-leading-label, 14px); color:#526275; pointer-events:none; }
.rkb-filter-inset-labels .rkb-filter-fields label > .form-control,
.rkb-filter-inset-labels .rkb-filter-fields label > .form-select { height:38px; padding-top:9px; padding-bottom:3px; }
.rkb-filter-inset-labels .rkb-filter-section legend { margin-bottom:5px; }
.rkb-record-workspace { gap:12px; }
/* Shared visual skin; sizing and column mechanics remain owned by the table foundation. */
.rkb-styled-workspace { --rkb-accent:#087da8; --rkb-accent-soft:#edf8fc; }
.rkb-styled-workspace .btn-dark { background:var(--rkb-accent); border-color:var(--rkb-accent); }
.rkb-styled-workspace .btn-dark:hover:not(:disabled) { background:#066385; border-color:#066385; }
.rkb-styled-workspace .rkb-data-table { --bs-table-bg:#fff; --bs-table-hover-bg:#f0f9fc; }
.rkb-styled-workspace .rkb-data-table thead th { background:var(--erp-table-header-bg); color:var(--erp-table-header-text); border-bottom:1px solid var(--erp-table-header-border); font-size: var(--erp-type-table-heading, .75rem); font-weight: var(--erp-weight-table-heading, 650); }
.rkb-styled-workspace .rkb-data-table tbody td { border-bottom-color:#edf0f3; padding-top:8px; padding-bottom:8px; }
.rkb-styled-workspace .rkb-data-table.rkb-table-compact tbody td { padding-block:4px; }
.rkb-styled-workspace .rkb-table-compact .rkb-row-action-trigger { min-height:28px; height:28px; }
.rkb-styled-workspace .rkb-data-table tbody tr:hover > td { background:#f0f9fc; }
.rkb-styled-workspace .rkb-data-table tbody tr.selected > td,
.rkb-styled-workspace .rkb-data-table tbody tr:has(input[type=checkbox]:checked) > td { background:#e3f3fa; }
.rkb-styled-workspace input[type=checkbox] { accent-color:var(--rkb-accent); }
.rkb-styled-workspace .product-filter-panel { border-radius:10px; border-color:#e0e8ed; box-shadow:none; }
.rkb-styled-workspace .filter-chip { background:#edf8fc; color:#17627f; border-color:#d0e8f2; }
.rkb-styled-workspace .product-tab-toolbar { padding-bottom:10px; border-bottom:1px solid #e6edf1; }
.rkb-styled-workspace .product-detail-count { background:#edf8fc; color:#17627f; border-radius:12px; padding:3px 9px; }
.rkb-styled-workspace .rkb-inline-form { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:14px; background:#f6fafc; border:1px solid #d8e7ee; box-shadow:inset 3px 0 #087da8; }
.rkb-inline-form > label { flex:1 1 150px; max-width:240px; min-width:0; font-size: var(--erp-type-label, .76rem); }
.rkb-inline-form > .rkb-change-reason { flex:1 1 220px; max-width:300px; }
.rkb-inline-form > .check-row { display:flex; align-items:center; align-self:center; gap:8px; }
.rkb-inline-form > button { flex:0 0 auto; }
.rkb-styled-workspace .rkb-record-empty { align-items:flex-start; text-align:left; padding:20px; background:#f8fbfc; border-radius:8px; gap:7px; }
.rkb-styled-workspace .product-tab-empty { text-align:center; padding:22px 12px; color:#6b7d8c; }
@media(max-width:600px) { .rkb-inline-form > label, .rkb-inline-form > .rkb-change-reason { max-width:none; flex-basis:100%; } }
.rkb-profile-info { display:grid; gap:5px; margin:12px 0 18px; }
.rkb-profile-info span { color:#64748b; font-size: var(--erp-type-value, .82rem); }
.rkb-filter-inset-labels > .rkb-filter-fields { margin-top:12px; }
.rkb-dashboard-counts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
.rkb-dashboard-counts a { display:grid; gap:8px; padding:20px; border:1px solid #d9e9ef; border-radius:10px; background:#fff; color:#42586a; text-decoration:none; }
.rkb-dashboard-counts strong { font-size: var(--erp-type-kpi, 2rem); color:#087da8; }
.rkb-dashboard-counts small { color:#6b7d8c; }
@media(max-width:900px){.rkb-dashboard-counts{grid-template-columns:1fr;}}
.rkb-filter-inset-labels .rkb-search-select-input { height:38px; padding-top:9px; padding-bottom:3px; }
.rkb-styled-workspace .product-detail-tabs button.active { color:#087da8; border-bottom-color:#087da8; background:#edf8fc; }
.rkb-account-popover { width:max-content; min-width:220px; max-width:min(300px,calc(100vw - 24px)); padding:12px; }
.rkb-account-popover .rkb-profile-info { margin:0 0 12px; max-width:260px; white-space:normal; }
.rkb-account-popover form .btn { width:100%; text-align:left; }
.rkb-confirm-dialog { width:min(380px,calc(100vw - 32px)); padding:22px; border:1px solid #dbe5eb; border-radius:12px; color:#24384b; box-shadow:0 20px 65px #142d4440; }
.rkb-confirm-dialog::backdrop { background:#102b4655; }
.rkb-confirm-dialog h2 { margin:0 0 12px; font-size: var(--erp-type-section, 1.1rem); }
.rkb-confirm-dialog p { font-size: var(--erp-type-meta, .88rem); line-height: var(--erp-leading-meta, 1.5); }
.rkb-confirm-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }
.rkb-confirm-actions .btn-dark { background:#087da8; border-color:#087da8; }
.rkb-product-editor { max-width:740px; }
.rkb-editor-card { padding:18px 20px; }
.rkb-editor-card h2 { font-size: var(--erp-type-section, 1.1rem); margin:0; }
.rkb-editor-card .panel-header p { font-size: var(--erp-type-meta, .8rem); max-width:520px; margin:6px 0 0; }
.rkb-editor-card .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 18px; }
.rkb-editor-card .form-grid label { font-size: var(--erp-type-label, .78rem); text-transform:none; letter-spacing:0; }
.rkb-editor-card .rkb-editor-name { grid-column:1/-1; }
.rkb-editor-card .form-actions { border-top:1px solid #e5ebef; padding-top:12px; justify-content:flex-end; }
.rkb-record-status-stack { display:flex; flex-direction:column; align-items:center; gap:4px; flex:0 0 auto; }
.rkb-record-status-stack .rkb-record-symbol { width:38px; height:38px; flex-basis:38px; border-radius:8px; }
.rkb-record-status-stack .status-badge { font-size: var(--erp-type-badge, .64rem); padding:2px 6px; }
.rkb-record-summary .product-identity-copy h1 { margin:0 0 8px; }
.rkb-purchasing-facts { grid-template-rows:minmax(68px,auto) auto; row-gap:12px; }
@media(max-width:720px) { .rkb-editor-card .form-grid {grid-template-columns:1fr;} .rkb-purchasing-facts{grid-template-rows:auto auto;} }
.rkb-editor-card .rkb-editor-name { order:-1; }
.rkb-group-load-actions { display:flex; align-items:center; gap:12px; }
.rkb-data-table .table-group-row .product-group-heading { justify-content:flex-start; }
.rkb-data-table .table-group-row .group-toggle { min-width:0; flex-wrap:wrap; padding:0; }
.rkb-price-preview { width:min(1100px,calc(100vw - 40px)); max-height:85vh; padding:20px; border:1px solid #d8e5ed; border-radius:12px; color:#27394c; }
.rkb-price-preview::backdrop { background:#102b4655; }
.rkb-price-controls { display:flex; gap:12px; align-items:end; flex-wrap:wrap; }
.rkb-price-controls label { display:grid; gap:5px; font-size: var(--erp-type-label, .78rem); }
.rkb-price-preview td:not(:first-child) { white-space:nowrap; font-variant-numeric:tabular-nums; }

/* Shared compact metadata and inline table editing composition. */
.rkb-record-metadata { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; gap:20px; padding-top:16px; margin-top:16px; border-top:1px solid var(--erp-border); }
.rkb-record-metadata textarea { min-height:74px; resize:vertical; font-weight: var(--erp-weight-regular, 400); }
.rkb-record-metadata .product-chip-input { min-width:0; min-height:38px; flex-wrap:wrap; align-content:start; }
.rkb-record-metadata .product-chip-input input { min-width:110px; flex:1 1 120px; }
.rkb-row-action-cell { text-align:right; }
.rkb-row-action-trigger { width:30px; height:30px; padding:0; font-size:22px; line-height:1; }
.rkb-row-action-popover { width:max-content; min-width:160px; max-width:min(220px,calc(100vw - 24px)); padding:5px; }
.rkb-row-action-list { display:grid; gap:2px; }
.rkb-row-action-list button { border:0; background:transparent; text-align:left; padding:8px 10px; border-radius:5px; font-size: var(--erp-type-action, .8rem); color:var(--erp-text); }
.rkb-row-action-list button:not(:disabled):hover, .rkb-row-action-list button:not(:disabled):focus-visible { background:var(--erp-primary-soft); color:var(--erp-accent); }
.rkb-row-action-list button:disabled { color:var(--erp-muted); opacity:.5; cursor:not-allowed; background:transparent; }
.rkb-table-editor-row > td { background:#f4fafe; padding:3px 6px!important; }
.rkb-inline-table-fields { border:0; padding:0; margin:0; display:grid; grid-template-columns:minmax(130px,1fr) minmax(100px,150px) minmax(180px,1.5fr) auto; align-items:end; gap:12px; }
.rkb-inline-table-fields label { display:grid; gap:5px; margin:0; font-size: var(--erp-type-label, .78rem); }
.rkb-inline-table-actions { display:flex; gap:6px; }
@media(max-width:800px) { .rkb-record-metadata { grid-template-columns:1fr; gap:12px; } .rkb-inline-table-fields { grid-template-columns:1fr 1fr; } }

.rkb-record-metadata > * { min-width:0; width:100%; }
.rkb-print-heading { display:none; }
@media print { .rkb-print-region, .rkb-print-region * { visibility:visible !important; } .rkb-print-region { position:absolute; inset:0; padding:12mm; width:100%; background:white; } .rkb-print-heading { display:block; } .rkb-print-region .rkb-table-wrap { overflow:visible; } .rkb-print-region table { width:100% !important; min-width:0 !important; } }
.rkb-create-fields { border:0; padding:0; margin:0; min-width:0; } .rkb-activity-group { margin:12px 0; } .rkb-activity-group h3, .rkb-activity-group summary { font-size: var(--erp-type-subsection, .9rem); font-weight: var(--erp-weight-subsection, 600); padding:8px 0; }

@media print { .rkb-print-region button, .rkb-print-region [role="separator"] { display:none !important; } .rkb-print-region th, .rkb-print-region td { display:table-cell !important; width:auto !important; min-width:0 !important; white-space:normal !important; } }
/* Shared intentional-edit dialog and cells aligned with their owning columns. */
.rkb-record-dialog { width:min(880px,calc(100vw - 40px)); max-height:85vh; overflow:auto; padding:20px; border:1px solid var(--erp-border); border-radius:12px; color:var(--erp-text); }
.rkb-record-dialog::backdrop { background:#102b4655; }
.rkb-table-editor-row .rkb-cell-input { width:100%; min-width:0; border:0; border-bottom:1px solid #90b7ca; border-radius:0; padding:7px 3px; background:transparent; box-shadow:none; }
.rkb-table-editor-row .rkb-cell-input:focus { border-bottom-color:#087fa5; background:#f0faff; outline:2px solid #087fa530; }
.rkb-cell-actions { display:flex; gap:4px; align-items:center; flex-wrap:wrap; }
.rkb-record-dialog .rkb-record-columns { margin-top:16px; }
@media print { dialog:open { position:absolute; inset:0; width:100%; max-width:none; max-height:none; overflow:visible; border:0; padding:0; } dialog::backdrop { background:white; } }
.rkb-price-preview .rkb-record-field { max-width:280px; } .rkb-price-preview .rkb-change-reason { max-width:340px; margin:12px 0; }
.rkb-table-foundation .rkb-table-editor-row td { vertical-align:top; }

/* Compact editor actions share one horizontal row, including narrow action columns. */
.rkb-cell-actions { flex-wrap:nowrap; justify-content:flex-end; }
.rkb-cell-actions > .btn { flex:0 0 auto; min-width:30px; }
.rkb-table-foundation .rkb-table-editor-row td { vertical-align:middle; }
.rkb-styled-workspace .rkb-table-foundation .rkb-table-editor-row td[data-column="ACTIONS"] { padding-inline:4px; }
.rkb-table-editor-row .rkb-cell-actions > .btn { width:26px; min-width:26px; height:28px; padding:0; }
.rkb-span-all { grid-column:1 / -1; }
.rkb-record-metadata > header { margin:0; }
.rkb-record-metadata { border:1px solid var(--erp-border); border-radius:10px; padding:16px; gap:12px 20px; }
.rkb-cell-editor td { vertical-align:middle; }

.rkb-card-actions { margin-left:auto; display:flex; flex-wrap:wrap; gap:6px; }
.rkb-record-workspace .rkb-form-section .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.rkb-record-workspace .rkb-form-section .product-field { min-width:0; background:transparent; border:0; padding:0; }
.rkb-record-workspace .rkb-form-section .product-field.read-only > div { border:0; background:transparent; padding:6px 0; min-height:32px; }
.rkb-record-workspace .rkb-form-section .product-field input { min-height:36px; }
.rkb-record-workspace .rkb-form-section textarea { min-height:70px; }
.rkb-record-workspace .rkb-form-section textarea.large { min-height:80px; }
@media(max-width:650px){.rkb-record-workspace .rkb-form-section .form-grid { grid-template-columns:1fr; }}
.rkb-form-section > header { flex-wrap:wrap; }
.rkb-file-list { display:flex; flex-wrap:wrap; gap:12px; margin-top:12px; }
.rkb-file-list a { display:grid; gap:6px; max-width:150px; overflow-wrap:anywhere; }
.rkb-file-list img { width:96px; height:80px; object-fit:contain; border:1px solid var(--erp-border); border-radius:6px; }
.rkb-review-row { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 0; border-top:1px solid var(--erp-border); }
.rkb-review-row p { margin:4px 0; }
.rkb-review-row button { flex-shrink:0; }

/* Kevin: compact record workspaces and feedback outside document flow. */
.rkb-toast{position:fixed;right:24px;bottom:24px;z-index:1100;display:flex;align-items:center;gap:20px;max-width:min(420px,calc(100vw - 32px));padding:12px 16px;background:#154c57;color:white;border-radius:10px;box-shadow:0 6px 24px #16313e26}
.rkb-toast button{border:0;background:transparent;color:inherit;font-size:20px;padding:0 4px}
.rkb-notification-bell{position:relative}
.rkb-notification-bell svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rkb-notification-count{position:absolute;right:-5px;top:-5px;min-width:17px;padding:0 4px;border-radius:10px;background:#087d9b;color:white;font-size:10px;line-height:17px;text-align:center;border:2px solid white}
.rkb-notes-stack .rkb-record-field{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}
.rkb-extras-stack{display:grid;gap:16px}.rkb-extras-stack h3{font-size: var(--erp-type-subsection, 13px);margin:0 0 10px}.rkb-extras-stack .form-grid{gap:10px 14px}
.rkb-compact-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 12px}.rkb-compact-toolbar .rkb-toolbar-search{width:260px;max-width:100%;flex:0 1 260px}.rkb-compact-toolbar .rkb-toolbar-end{margin-left:auto;display:flex;align-items:center;gap:8px}.rkb-compact-toolbar label{display:flex;align-items:center;gap:6px;margin:0}.rkb-compact-toolbar input[type=date]{width:145px}.rkb-compact-toolbar select{width:auto;max-width:220px}
.rkb-status-options{display:grid;gap:8px;padding:8px}.rkb-status-options label{display:flex;align-items:center;gap:8px;font-size: var(--erp-type-label, 13px)}
.rkb-styled-workspace .rkb-table-foundation .rkb-table-editor-row td[data-column="ACTIONS"]{padding:4px!important;overflow:visible}
.rkb-table-editor-row td[data-column="ACTIONS"] .rkb-cell-actions{display:flex;justify-content:center;gap:2px;min-width:0;margin:0}
.rkb-table-editor-row td[data-column="ACTIONS"] .rkb-cell-actions>.btn{box-sizing:border-box;flex:0 0 24px;width:24px;min-width:24px;padding:0;height:28px;margin:0}
.rkb-stock-workspace .rkb-table-wrap{min-height:0;margin-bottom:18px}.rkb-stock-workspace .rkb-print-region>h3{display:none}
@media print{.rkb-toast,.rkb-notification-bell{display:none}.rkb-stock-workspace .rkb-print-region>h3{display:block}}

/* Record action strip, separated section rows and consistent full-width search toolbars. */
.rkb-record-action-strip{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:10px 14px;border-radius:9px;margin:0}
.rkb-record-secondary{display:block;margin-top:24px;padding-top:24px;border-top:1px solid var(--erp-border,#e4e9ed)}
.rkb-compact-toolbar.rkb-search-toolbar{flex-wrap:wrap;gap:8px}
.rkb-compact-toolbar.rkb-search-toolbar>.rkb-toolbar-search{width:auto;max-width:none;flex:1 1 360px;min-width:180px}
.rkb-search-toolbar>.product-detail-table-actions{flex:0 1 auto;flex-wrap:wrap}
.rkb-input-with-unit{display:flex;align-items:stretch;border:1px solid #d4dce2;border-radius:6px;overflow:hidden;background:white}
.rkb-input-with-unit > .rkb-quantity-editor{flex:1 1 auto;min-width:0;width:0}
.rkb-record-workspace .rkb-input-with-unit > .rkb-quantity-editor input.form-control{width:100%}
.rkb-record-workspace .rkb-input-with-unit input.form-control{flex:1 1 auto;min-width:0;width:0;border:0;border-radius:0;box-shadow:none}
.rkb-input-with-unit:focus-within{outline:2px solid #9cd5e5;outline-offset:1px}
.rkb-input-with-unit select{flex:0 0 58px;width:58px;border:0;border-left:1px solid #e4e9ed;background:#f4f8fa;color:#405866;font:inherit;padding:0 5px;cursor:pointer}
.rkb-upload-dropzone{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:110px;padding:16px;border:1px dashed #8cb9c5;border-radius:8px;background:#f7fbfd;text-align:center;color:#346777}
.rkb-upload-dropzone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:1}
.rkb-upload-dropzone svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rkb-upload-dropzone strong{font-size: var(--erp-type-value, 13px)}.rkb-upload-dropzone span{font-size: var(--erp-type-value, 12px);color:#6a7c87}
.rkb-upload-dropzone:hover,.rkb-upload-dropzone:focus-within{background:#edf7fb;border-color:#087d9b;outline:2px solid #c2e5ef;outline-offset:2px}
.rkb-upload-dropzone.is-busy{opacity:.6}.rkb-upload-dropzone.is-busy input{cursor:wait}
@media(max-width:700px){.rkb-compact-toolbar.rkb-search-toolbar>.rkb-toolbar-search{flex-basis:100%;min-width:0}.rkb-record-secondary{margin-top:20px;padding-top:20px}}

.rkb-shared-popover.rkb-filter-options{width:min(280px,calc(100vw - 24px));min-width:0;padding:12px}
.rkb-filter-options .rkb-filter-fields{display:grid;grid-template-columns:minmax(0,1fr)}
.rkb-filter-options .rkb-status-options>.rkb-link-button{text-align:left;justify-self:start}

/* Master-data record rhythm and report controls. */
.rkb-record-action-strip{justify-content:flex-end}
.rkb-filter-section h3{font-size: var(--erp-type-subsection, .78rem);font-weight: var(--erp-weight-subsection, 650);margin:10px 0 8px;color:#405866}
.rkb-report-heading{border-top:1px solid var(--erp-border);padding-top:18px;margin-top:20px;align-items:center;gap:16px;flex-wrap:wrap}
.product-tab-toolbar .rkb-report-date-range{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.product-tab-toolbar > .rkb-report-date-range:first-child{margin-left:0}
.product-tab-toolbar > .product-adjacent-buttons{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;margin-left:auto}
.rkb-report-date-range label{position:relative;margin:0;display:block}
.rkb-report-date-range label>span{position:absolute;top:4px;left:10px;font-size: var(--erp-type-label, 10px);font-weight: var(--erp-weight-label, 600);color:#687b86}
.rkb-report-date-range input.form-control{width:154px;height:48px;padding:17px 8px 3px;font-size: var(--erp-type-value, 12px)}
.rkb-record-workspace .form-grid{gap:12px 18px}.rkb-record-workspace .form-grid>label{font-size: var(--erp-type-label, 12px);font-weight: var(--erp-weight-label, 500);color:#53636e}
.rkb-compact-toolbar select.form-select{padding-right:32px;min-width:150px}
.rkb-report-date-range .btn{height:34px}
@media(max-width:850px){.rkb-report-date-range{margin-left:0}}

.rkb-inline-name{display:flex;align-items:center;gap:8px;min-width:0}
.rkb-inline-name > .rkb-search-select{width:100px;flex:0 0 100px;min-width:100px}
.rkb-inline-name > .rkb-search-select input{width:100%;min-width:0}
.rkb-inline-name > input{width:0;flex:1 1 150px;min-width:80px}

.product-tab-toolbar > .rkb-toolbar-end{display:flex;align-items:center;gap:8px;margin-left:auto}

.rkb-tab-actions{display:flex;justify-content:flex-end;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid var(--erp-border)}
.rkb-role-options{display:flex;flex-wrap:wrap;gap:8px 18px;border:0;padding:12px 0}.rkb-role-options legend{font-size: var(--erp-type-subsection, 13px);font-weight: var(--erp-weight-emphasis, 600)}.rkb-role-options label{display:flex;gap:6px;align-items:center;font-size: var(--erp-type-label, 12px)}

/* Shared compact account/form dialogs: explicit label hierarchy and trailing actions. */
.rkb-compact-editor{width:min(620px,calc(100vw - 32px))}
.rkb-editor-heading{display:grid;gap:4px;margin-bottom:18px}.rkb-editor-heading strong{font-size: var(--erp-type-section, 16px)}.rkb-editor-heading>span{font-size: var(--erp-type-value, 12px);color:var(--erp-muted)}
.rkb-compact-editor .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}
.rkb-compact-editor .form-grid>label,.rkb-editor-field{display:grid;gap:6px;min-width:0;font-size: var(--erp-type-label, 12px);font-weight: var(--erp-weight-label, 500);color:#53636e}
.rkb-compact-editor .form-control,.rkb-compact-editor .form-select{font-size: var(--erp-type-value, 13px);min-height:36px}
.rkb-editor-field>.rkb-popover-control{display:block;min-width:0}.rkb-select-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:36px;text-align:left;font-size: var(--erp-type-value, 13px)}.rkb-select-trigger>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rkb-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid var(--erp-border)}
.rkb-editor-note{padding:10px 12px;background:#f4f8fa;border-radius:6px;font-size: var(--erp-type-meta, 12px)}.rkb-editor-note p{margin:4px 0 0;color:var(--erp-muted);line-height: var(--erp-leading-meta, 1.5)}
.rkb-record-workspace .rkb-record-facts dd{font-size: var(--erp-type-value, 13px);line-height: var(--erp-leading-value, 1.5);overflow-wrap:anywhere}.rkb-record-workspace .rkb-record-facts dt{font-size: var(--erp-type-label, 12px)}
@media(max-width:560px){.rkb-compact-editor .form-grid{grid-template-columns:minmax(0,1fr)}}

.rkb-record-workspace .product-general-save-row,.rkb-record-workspace .rkb-record-save-bar{justify-content:flex-end}

/* One shared heading rhythm for record tabs, regardless of action count. */
.rkb-styled-workspace .rkb-tab-heading{box-sizing:border-box;min-height:62px;margin:0 0 16px;padding:0 0 12px;align-items:center}
.rkb-tab-heading .rkb-tab-heading-copy{flex:1 1 220px;min-width:0;display:grid;gap:3px}
.rkb-tab-heading .rkb-tab-heading-copy strong{font-size: var(--erp-type-section, 14px);line-height: var(--erp-leading-section, 20px)}.rkb-tab-heading .rkb-tab-heading-copy span{font-size: var(--erp-type-value, 12px);line-height: var(--erp-leading-value, 18px);color:var(--erp-muted)}
.rkb-record-secondary.rkb-record-columns{display:grid}
.rkb-record-note{font-size: var(--erp-type-meta, 13px);line-height: var(--erp-leading-meta, 1.6);white-space:pre-wrap;margin:0;color:var(--erp-text)}
.rkb-tag-entry{display:flex;align-items:center;gap:8px}.rkb-tag-entry input{flex:1;min-width:0}
.rkb-checkbox-line{display:flex;align-items:center;gap:8px;min-height:36px;font-size: var(--erp-type-value, 13px)}
.rkb-operational-filter .product-advanced-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.rkb-operational-filter .product-advanced-filter-grid>label,.rkb-operational-filter .po-status-filter-field{font-size: var(--erp-type-label, 12px);min-width:0}
.rkb-operational-filter .rkb-filter-checkbox-group{grid-column:1/-1}.rkb-operational-filter .rkb-filter-checkbox-group legend{font-size: var(--erp-type-label, 12px)}
.rkb-operational-workspace .panel{border-radius:10px;border-color:#e0e8ed;box-shadow:none}.rkb-operational-workspace .purchasing-editor-toolbar{padding:12px 16px}
.rkb-operational-workspace .panel-header h2{font-size: var(--erp-type-section, 15px)}.rkb-operational-workspace .panel-header p{font-size: var(--erp-type-meta, 12px);color:var(--erp-muted)}
@media(max-width:700px){.rkb-tab-heading{flex-direction:row!important}.rkb-tab-heading .rkb-tab-heading-copy{flex-basis:100%}.rkb-tab-heading>.product-detail-table-actions{margin-left:auto}.rkb-operational-filter .product-advanced-filter-grid{grid-template-columns:1fr}}

/* Shared compact creation/list surfaces: supplier-first PO and branch requests. */
.rkb-styled-workspace .rkb-entry-card { padding:16px; margin:0; min-width:0; }
.rkb-entry-card .panel-header { margin-bottom:16px; }
.rkb-entry-card .panel-header h2 { font-size: var(--erp-type-section, 15px); margin:0; }
.rkb-entry-card .panel-header p { font-size: var(--erp-type-meta, 12px); margin:4px 0 0; color:var(--erp-muted); }
.rkb-entry-card .form-grid { gap:14px 20px; }
.rkb-entry-card .form-grid label { font-size: var(--erp-type-label, 13px); font-weight: var(--erp-weight-label, 500); text-transform:none; }
.rkb-entry-card .form-control, .rkb-entry-card .form-select { font-size: var(--erp-type-value, 13px); min-height:var(--erp-control-height); }
.rkb-entry-card .request-empty { min-height:90px; }
.rkb-entry-workspace { min-width:0; }
.rkb-entry-workspace .purchasing-context-grid { grid-template-columns:minmax(180px,1fr) minmax(160px,1fr) minmax(220px,2fr); }
.rkb-entry-workspace .current-authority { grid-column:1/-1; display:flex; gap:8px; align-items:center; min-height:0; padding:0; border:0; background:none; }
.rkb-entry-workspace .purchasing-editor-workspace, .rkb-entry-workspace .purchasing-workspace { gap:14px; }
.rkb-styled-workspace .rkb-list-card { padding:16px; min-width:0; }
.rkb-list-card .erp-table { min-width:0; }
.rkb-entry-card .product-search-row { margin-top:0; }
@media(max-width:1000px) { .rkb-entry-workspace .purchasing-context-grid { grid-template-columns:1fr 1fr; } .rkb-entry-workspace .purpose-field { grid-column:1/-1; } }
@media(max-width:640px) { .rkb-entry-workspace .purchasing-context-grid { grid-template-columns:1fr; } .rkb-entry-card .product-search-row { grid-template-columns:1fr; } }

.rkb-table-editor-row textarea.rkb-cell-input[rows="1"] { min-height:34px; height:34px; resize:vertical; }
.rkb-entry-workspace.rkb-operational-workspace { background:transparent;min-height:0;align-content:start }
.rkb-entry-workspace .purchasing-editor-workspace,.rkb-entry-workspace .purchasing-workspace{align-content:start}

.rkb-entry-card-contained { width:100%; max-width:800px; }
/* Full workspace surface with a separate, bounded form measure. Opt-in only. */
.rkb-entry-surface { width:100%; min-height:calc(100dvh - 138px); align-content:start; }
.rkb-entry-form { margin:0; }
.rkb-transaction-entry { display:flex; flex-direction:column; gap:16px; min-height:calc(100dvh - 266px); }
.rkb-transaction-header { display:grid; grid-template-columns:minmax(260px,1fr) minmax(360px,1.4fr); gap:24px; max-width:1200px; }
.rkb-transaction-accounts { display:grid; align-content:start; gap:20px; min-width:0; }
.rkb-transaction-metadata .form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.rkb-transaction-lines { border-block:1px solid var(--erp-border); padding-block:16px; }
.rkb-transaction-lines > .rkb-search-select { max-width:640px; margin-bottom:12px; }
.rkb-entry-lines { margin-top:12px; }
.rkb-entry-lines-empty { height:56px; color:var(--erp-muted); text-align:center; white-space:normal!important; }
.rkb-transaction-additional { max-width:800px; width:100%; }
.rkb-entry-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; border-top:1px solid var(--erp-border); padding-top:16px; margin-top:auto; }
.rkb-entry-footer .rkb-dialog-actions { margin:0; padding:0; border:0; }
.rkb-entry-total { display:grid; gap:4px; font-variant-numeric:tabular-nums; }
.rkb-entry-total > span { color:var(--erp-muted); font-size:var(--erp-type-label); }
.rkb-entry-total > strong { font-size:var(--erp-type-summary); line-height:var(--erp-leading-summary); font-weight:var(--erp-weight-summary); }
.rkb-total-value { font-size:var(--erp-type-total); font-weight:var(--erp-weight-total); }
@media(max-width:900px) { .rkb-transaction-header { grid-template-columns:1fr; } }
.rkb-entry-card-contained .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:640px) { .rkb-entry-card-contained .form-grid { grid-template-columns:1fr; } }

/* Shared order summary and compact planning matrix. */
.rkb-order-overview { padding:12px 0; align-items:start; }
.rkb-order-overview .rkb-form-section header { margin-bottom:10px; }
.rkb-order-overview .rkb-record-facts { gap:12px 20px; }
.rkb-order-overview dd { overflow-wrap:anywhere; }
.rkb-order-overview dd small { display:block; color:var(--erp-muted); margin-top:3px; font-weight: var(--erp-weight-regular, 400); }
.po-detail-header .rkb-detail-toolbar { border-top:1px solid #e5ebef; margin-top:10px; padding-top:10px; }
.po-detail-header .po-detail-actions { margin-left:auto; justify-content:flex-end; }
.po-estimate-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; margin-bottom:10px; }
.po-estimate-toolbar .muted-small { flex:1 1 300px; font-size: var(--erp-type-meta, 12px); color:var(--erp-muted); }
.po-estimate-dates { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.po-estimate-dates label { display:flex; align-items:center; gap:6px; font-size: var(--erp-type-label, 12px); margin:0; }
.po-estimate-table th, .po-estimate-table td { padding:6px 8px; font-size:12px; height:34px; }
.po-estimate-table td input.po-estimate-quantity-input { min-height:28px; height:28px; border-radius:0; border:0; border-bottom:1px solid #9abcc9; background:transparent; }
.po-estimate-table thead th.po-estimate-group { background:#edf7fa; border-left:1px solid #d3e4eb; }
.po-estimate-table td.po-estimate-first, .po-estimate-table thead th.po-estimate-first { border-left-width:1px; }

/* Shared preparation screen for connected operational workspaces. */
.rkb-workflow-preview { padding:16px; }
.rkb-workflow-stage { display:inline-block; border-radius:20px; background:#edf8fc; color:#087da8; padding:4px 10px; font-size: var(--erp-type-action, .8rem); font-weight: var(--erp-weight-emphasis, 600); margin-bottom:8px; }
.rkb-workflow-preview p { color:#687787; font-size: var(--erp-type-meta, .9rem); }
.rkb-workflow-preview h3 { font-size: var(--erp-type-subsection, .9rem); margin:0 0 12px; }
.rkb-workflow-preview li { margin-bottom:8px; font-size: var(--erp-type-value, .88rem); }
.rkb-workflow-links { display:grid; gap:4px; }
.rkb-workflow-links a { display:flex; justify-content:space-between; padding:7px 0; color:#087da8; text-decoration:none; font-size: var(--erp-type-action, .88rem); }
.rkb-workflow-links a:hover { text-decoration:underline; }

.rkb-po-identity { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; align-items:center; }
.rkb-po-identity .rkb-detail-toolbar { grid-column:1 / -1; justify-content:flex-end; border-top:1px solid var(--erp-border); padding-top:12px; }
.rkb-order-overview .rkb-form-section { padding:0; }
.purchasing-line-table tbody td { padding:6px 8px; font-size: var(--erp-table-value-size, .86rem); }

/* Filter fields stack their label above the control, including owned popovers. */
.rkb-shared-popover .rkb-filter-fields > label { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; gap:5px; }
.rkb-shared-popover .rkb-filter-fields > label > .form-select { width:100%; min-width:0; font-size: var(--erp-type-value, .8rem); }

/* Operational worklists reuse the Master Data density and identity layout. */
.rkb-forecast-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.rkb-forecast-intro h1 { font-size: var(--erp-type-title, 1.2rem); margin:8px 0; }
.rkb-forecast-intro p { margin:0 0 5px; color:var(--erp-muted); font-size: var(--erp-type-meta, .86rem); }
.rkb-forecast-intro small { color:var(--erp-muted); font-size: var(--erp-type-meta, .76rem); }
.rkb-workflow-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:0; }
.rkb-workflow-summary-item { display:flex; gap:14px; align-items:center; border:1px solid var(--erp-border,#dce4e8); border-radius:10px; padding:14px; background:#fff; text-align:left; color:var(--erp-text,#243848); }
.rkb-workflow-summary-item.active { border-color:#0a82a0; background:#edf9fc; box-shadow:inset 0 -3px #0a82a0; }
.rkb-workflow-summary-item strong,.rkb-workflow-summary-item b,.rkb-workflow-summary-item small { display:block; }
.rkb-workflow-summary-item strong { font-size: var(--erp-type-summary, 1.35rem); margin-bottom:5px; }
.rkb-workflow-summary-item b { font-size: var(--erp-type-value, .86rem); }
.rkb-workflow-summary-item small { font-size: var(--erp-type-meta, .76rem); color:var(--erp-muted); margin-top:3px; }
.rkb-forecast-method { padding-top:15px; margin-top:14px; border-top:1px solid #e8edf0; font-size: var(--erp-type-value, .82rem); }
.rkb-forecast-method summary { cursor:pointer; margin-bottom:10px; }
.rkb-forecast-product-picker { max-width:520px; margin:10px 0; }
.rkb-stage-strip { list-style:none; display:flex; gap:8px; padding:10px 0; margin:0; border-bottom:1px solid #e8edf0; }
.rkb-stage-strip li { display:flex; align-items:center; gap:8px; font-size: var(--erp-type-action, .78rem); color:#76818e; }
.rkb-stage-strip li:not(:last-child)::after { content:'›'; margin:0 12px; color:#afbac2; }
.rkb-stage-strip .current { color:#007d9b; font-weight: var(--erp-weight-emphasis, 700); }
.rkb-stage-strip .complete { color:#26785c; }
.rkb-stage-strip .cancelled { color:#b93e43; }
.rkb-request-identity > div:first-child { display:flex; gap:12px; align-items:center; }
.rkb-request-identity strong { font-size: var(--erp-type-value, 1.15rem); }
.rkb-table-compact .quantity-cell-button { min-height:26px; padding:2px 8px; font-size:inherit; }
.rkb-table-compact td .form-control { min-height:28px; padding:3px 7px; font-size:inherit; }
@media(max-width:1000px){.rkb-workflow-summary { gap:8px; }.rkb-workflow-summary-item { padding:12px; gap:8px; }.rkb-workflow-summary-item small{display:none}.rkb-forecast-intro{align-items:flex-start;flex-wrap:wrap;}}

.po-workspace > .rkb-detail-toolbar { justify-content:flex-end; padding-bottom:10px; }
.po-workspace > .rkb-detail-toolbar:has(.rkb-stage-strip){justify-content:space-between;flex-wrap:wrap;margin-bottom:0}
.rkb-detail-toolbar > .rkb-stage-strip{border:0;padding:0;flex:0 0 auto;max-width:100%}
.rkb-detail-toolbar > .po-detail-actions{margin-left:auto}
.rkb-group-toggle{display:inline-flex;align-items:center;gap:8px;flex:1;text-align:left;color:inherit;padding:3px 0}
.rkb-group-toggle:focus-visible{outline:2px solid var(--erp-primary);outline-offset:2px}
/* Shared record/report composition: content stays inside its own scrolling workspace. */
.rkb-entry-workspace, .rkb-entry-workspace .purchasing-editor-workspace,
.rkb-entry-workspace .panel { min-width:0; max-width:100%; }
.rkb-entry-workspace .purchasing-editor-workspace { grid-template-columns:minmax(0,1fr); }
.rkb-request-context { display:grid; grid-template-columns:minmax(150px,1fr) minmax(150px,1fr) minmax(240px,2fr); gap:18px; align-items:start; }
.rkb-report-heading { padding:12px 0; }
.rkb-report-heading h2 { margin:0 0 5px; font-size: var(--erp-type-section, 1.05rem); font-weight: var(--erp-weight-section, 650); }
.rkb-report-heading p { margin:0; color:var(--erp-muted); font-size: var(--erp-type-meta, .78rem); }
.rkb-price-report .rkb-field-help { margin-top:10px; }
.rkb-price-preview > .rkb-record-tab-header { margin-bottom:12px; }
.rkb-price-preview fieldset { min-width:0; }
.rkb-price-preview td .money-input { min-width:100px; }
@media(max-width:900px) { .rkb-request-context { grid-template-columns:repeat(2,minmax(0,1fr)); } .rkb-request-context > :last-child { grid-column:1/-1; } }
@media print {
 .rkb-price-report .rkb-report-heading h2 { font-size:17pt; text-align:center; }
 .rkb-price-report .rkb-report-heading p { text-align:center; }
 .rkb-price-report table { width:100%!important; table-layout:auto!important; font-size:9pt; }
 .rkb-price-report th,.rkb-price-report td { width:auto!important; min-width:0!important; max-width:none!important; padding:4px!important; white-space:normal!important; border:1px solid #888!important; }
 .rkb-price-report th { background:#eee!important; }
 .rkb-price-report [data-column="AUDIT"] { display:none!important; }
 .rkb-price-report .rkb-field-help { font-size:8pt; }
}
.rkb-supplier-group-heading { display:flex; gap:10px; align-items:center; padding:3px 0; font-size: var(--erp-type-value, .82rem); }
.rkb-supplier-group-heading .product-detail-count { margin-left:auto; }
.rkb-styled-workspace .rkb-toolbar-panel > .rkb-tab-heading:only-child{margin:0;padding:0;border:0;min-height:40px}.rkb-table-footnote{padding:10px 12px;margin:0}
.rkb-budget-panel{display:grid;grid-template-columns:minmax(230px,1fr) minmax(340px,2fr);align-items:center;gap:8px 24px;padding:12px 16px}
.rkb-budget-heading{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.rkb-budget-heading strong{font-size: var(--erp-type-value, .85rem)}.rkb-budget-heading input{width:150px;min-width:0}
.rkb-budget-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0}.rkb-budget-values dt{font-size: var(--erp-type-label, .75rem);color:var(--erp-muted);font-weight: var(--erp-weight-regular, 400)}.rkb-budget-values dd{font-size: var(--erp-type-total, .95rem);font-weight: var(--erp-weight-total, 650);margin:3px 0 0;font-variant-numeric:tabular-nums}
.rkb-budget-panel>small{grid-column:1/-1}.rkb-budget-preview{padding:12px 0;margin-top:12px;border-top:1px solid var(--erp-border)}.rkb-budget-preview>.rkb-budget-values{margin:10px 0}.rkb-budget-preview>strong{font-size: var(--erp-type-value, .85rem)}
@media(max-width:1100px){.rkb-budget-panel{grid-template-columns:1fr}.rkb-budget-panel>small{grid-column:auto}}
.rkb-record-dialog.rkb-dialog-compact{width:min(420px,calc(100vw - 32px))}.rkb-dialog-compact>label{display:grid;gap:6px;font-size: var(--erp-type-label, .82rem)}.rkb-budget-panel>.rkb-field-help{margin:0;font-size: var(--erp-type-meta, .73rem)}

/* Shared compact action, filter and record composition — Kevin batch030. */
.rkb-modal.rkb-modal-compact, .rkb-record-dialog.rkb-modal-compact { width:min(480px,calc(100vw - 32px)); }
.form-grid.rkb-single-column { grid-template-columns:minmax(0,1fr); }
.rkb-checkbox-filter { border:0; padding:0; margin:0; display:grid; gap:10px; }
.rkb-checkbox-filter legend { font-size: var(--erp-type-label, .82rem); font-weight: var(--erp-weight-emphasis, 650); margin:0 0 10px; }
.rkb-checkbox-filter label { display:flex; align-items:center; gap:8px; font-size: var(--erp-type-label, .82rem); margin:0; }
.rkb-checkbox-filter input { width:16px; height:16px; }
.rkb-history-section { margin-bottom:20px; }
.rkb-stage-action-toolbar { padding-bottom:10px; flex-wrap:wrap; }
.rkb-stage-action-toolbar .rkb-detail-toolbar-actions { margin-left:auto; }
.rkb-record-note { font-size: var(--erp-type-meta, .86rem); white-space:pre-wrap; overflow-wrap:anywhere; }
.rkb-row-action-list > a { display:block; padding:8px 10px; color:var(--erp-text); text-decoration:none; }
.rkb-row-action-list > a:hover { background:var(--erp-primary-soft); }

/* Shared inline field captions keep full-width row editors understandable. */
.rkb-inline-field{display:flex;flex-direction:column;gap:3px;min-width:0;margin:0}
.rkb-inline-field>span{font-size: var(--erp-type-label, .72rem);color:var(--text-muted,#667784)}
.po-estimate-add-row>.text-danger{grid-column:1/-1}

/* Batch031: shared compact controls and consistent record composition. */
.auth-layout { min-height:100dvh; background:#f4f7fa; }
.login-shell { min-height:100dvh; padding:40px 20px; background:#f7f8fc; --erp-blue:var(--erp-shell-accent); --erp-focus-ring:0 0 0 3px #145aff20; }
.login-layout { width:min(100%,410px); max-width:410px; grid-template-columns:minmax(0,1fr); gap:16px; }
.login-panel { --erp-type-title:var(--erp-type-welcome); --erp-leading-title:var(--erp-leading-welcome); --erp-tracking-title:var(--erp-tracking-welcome); padding:40px; border:1px solid var(--erp-shell-border); border-radius:20px; box-shadow:0 24px 70px -18px #172b5640,0 4px 14px #172b560d; }
.rkb-login-brand { display:flex; align-items:center; gap:12px; margin-bottom:30px; }
.rkb-login-brand strong,.rkb-login-brand small { display:block; }
.rkb-login-brand strong { font-size: var(--erp-type-value, 1rem); }.rkb-login-brand small { color:var(--erp-muted); font-size: var(--erp-type-meta, .73rem); margin-top:2px; }
.login-panel h1 { font-size:var(--erp-type-welcome); line-height:var(--erp-leading-welcome); letter-spacing:var(--erp-tracking-welcome); color:var(--erp-shell-dark); }.login-panel p { font-size:var(--erp-type-value); margin:8px 0 22px; }
.login-panel .form-label { display:grid; gap:7px; font-size:var(--erp-type-label); color:var(--erp-shell-text); }.login-panel .form-control { min-height:40px; border-color:#cdd5e1; border-radius:8px; }
.login-panel .form-control:focus { border-color:var(--erp-shell-accent); box-shadow:var(--erp-focus-ring); }
.login-panel .btn { min-height:40px; border-radius:8px; background:var(--erp-shell-accent); border-color:var(--erp-shell-accent); }
.login-panel .btn:hover { background:#1049d4; border-color:#1049d4; }
.login-panel :is(input,button):focus-visible { outline:2px solid var(--erp-shell-accent); outline-offset:2px; }
.login-panel .alert { border-radius:10px; font-size:var(--erp-type-value); }
@media(max-width:600px){.login-panel{padding:26px}.login-shell{padding:24px 16px}}
.login-layout .authority-test-panel { padding:12px 16px; font-size: var(--erp-type-value, .78rem); border:1px solid #e2e9ed; border-radius:8px; }
.authority-test-panel summary { cursor:pointer; color:var(--erp-muted); }
.rkb-date-input { position:relative; gap:0; }
.rkb-date-input > .form-control { padding-right:35px; width:100%; }
.rkb-date-calendar-trigger { position:absolute; right:1px; top:1px; bottom:1px; height:auto; border:0; background:transparent; }
.rkb-report-date-range select.form-select { width:104px; min-width:104px; padding-right:30px; }
.rkb-report-date-range .rkb-date-input { width:148px; }
.rkb-request-actions { margin:0; padding:8px 0; min-height:0; justify-content:flex-end; }
.rkb-stage-strip { flex-wrap:wrap; counter-reset:stage; gap:6px 10px; }
.rkb-stage-strip li { gap:5px; font-size: var(--erp-type-action, .72rem); }
.rkb-stage-strip li:not(:last-child)::after { content:'—'; margin:0 0 0 4px; color:#ccd5db; }
.rkb-stage-number { width:23px;height:23px;border:1px solid #cbd6dc;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size: var(--erp-type-action, .7rem);background:#fff; }
.rkb-stage-strip .current .rkb-stage-number { color:#fff;background:#087f9e;border-color:#087f9e; }
.rkb-stage-strip .complete .rkb-stage-number { color:#26785c;background:#edf8f3;border-color:#9cc9b6; }
.rkb-stage-strip .unverified { color:#8a949e; }
.rkb-row-action-trigger svg { width:18px;height:18px; }
.po-tab-toolbar > .rkb-detail-table-pager { border:0;padding:0;margin:0;flex:1;gap:16px; }
.rkb-budget-panel { display:flex; flex-wrap:wrap; gap:10px 24px; padding:14px 18px; align-items:center; }
.rkb-budget-heading { flex:0 1 300px; gap:8px; }.rkb-budget-heading strong { flex-basis:100%; color:#405363; }
.rkb-budget-panel>.rkb-budget-values { flex:1 1 440px; gap:20px; }
.rkb-budget-values>div { padding:3px 12px; border-left:1px solid #e0e8ed; }
.rkb-budget-values dd { margin-top:4px; font-size: var(--erp-type-total, 1.08rem); }.rkb-budget-values dt { font-size: var(--erp-type-label, .73rem); }
.rkb-budget-panel>small,.rkb-budget-panel>.rkb-field-help { flex-basis:100%;font-size: var(--erp-type-meta, .71rem);color:#71818d; }
.rkb-forecast-context { display:flex;align-items:center;gap:10px;padding:0 0 8px;font-size: var(--erp-type-value, .82rem); }
.rkb-plan-destination { display:grid;grid-template-columns:minmax(90px,160px) minmax(0,1fr);gap:6px 12px;align-items:center;margin:10px 0;font-size: var(--erp-type-value, .82rem); }
.rkb-plan-destination select { min-width:0;width:100%; }
.rkb-forecast-preview .rkb-budget-preview { margin:0 0 12px;padding:8px 12px;border:1px solid var(--erp-border);border-radius:6px;background:#f8fafb; }
.rkb-forecast-preview .rkb-budget-values { margin:6px 0;gap:12px; }
.rkb-forecast-preview .rkb-budget-values dd { font-size: var(--erp-type-total, .9rem); }
.rkb-preview-lines { max-height:30vh;overflow:auto; }
.rkb-preview-lines thead { position:sticky;top:0;background:#f6f9fb;z-index:1; }
.rkb-confirm-explanation { font-size: var(--erp-type-body, .8rem);line-height: var(--erp-leading-body, 1.5);color:var(--erp-muted);margin:12px 0 8px; }
.rkb-confirm-check { display:flex;gap:8px;align-items:flex-start;font-size: var(--erp-type-body, .82rem);line-height: var(--erp-leading-body, 1.5); }
.rkb-confirm-check input { margin-top:3px;flex:none; }
.rkb-confirm-facts .po-general-field strong { white-space:normal;overflow:visible;text-overflow:clip;font-size: var(--erp-type-value, .82rem); }
.rkb-confirm-facts .po-general-field small { font-size: var(--erp-type-meta, .72rem);color:var(--erp-muted); }
/* Available width, not character count, determines disclosure. */
.rkb-expandable-note{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:4px;font:400 13px/20px var(--erp-font);min-width:0;overflow-wrap:anywhere}
.rkb-expandable-note p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--rkb-note-lines,3);overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;min-width:0}
.rkb-expandable-note.is-expanded p{-webkit-line-clamp:unset;display:block}
.rkb-note-disclosure{display:none;place-items:center;border:0;border-radius:3px;background:transparent;color:#2864bb;width:24px;height:24px;padding:3px;cursor:pointer}
.rkb-expandable-note[data-rkb-note-overflow=true]>.rkb-note-disclosure{display:grid}
.rkb-note-disclosure svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.7}
.rkb-expandable-note.is-expanded .rkb-note-disclosure svg{transform:rotate(180deg)}
.rkb-note-disclosure:focus-visible{outline:1px solid #2864bb;outline-offset:-1px}

.rkb-document-toolbar { display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;margin-bottom:12px; }
.rkb-document-toolbar .rkb-detail-toolbar-actions { margin-left:auto; }
.rkb-receipt-preview { width:100%;height:55vh;border:1px solid var(--erp-border); }
.rkb-plan-group td { background:#edf7fa;font-weight: var(--erp-weight-emphasis, 650);padding:8px 10px; }
.rkb-readiness-note { display:flex;gap:12px;align-items:center;justify-content:space-between;padding:9px 12px;margin:8px 0;border-radius:6px;background:#fff7e8;font-size: var(--erp-type-meta, .8rem);color:#755620; }
.po-estimate-table th[data-column="EST_CODE"],.po-estimate-table td[data-column="EST_CODE"] { min-width:82px; }

.po-print-document { width:210mm;padding:7mm;font-size:10px; }
.po-print-document>header { padding-bottom:7px;margin-bottom:10px;gap:12px;text-align:left;border-bottom:1px solid #46545c; }
.po-print-document h1 { font-size:11px;margin:0 0 3px; }.po-print-document h2 { font-size:16px; }
.po-print-document>header>div:last-child { font-size:12px; }.po-print-document>header p { margin:3px 0 0;font-size:10px; }
.po-print-meta dl { margin-bottom:10px;gap:12px; }.po-print-meta dl div { display:grid;grid-template-columns:50px 1fr;gap:5px; }
.po-print-meta dt { margin:0;font-size:9px; }.po-print-table th,.po-print-table td { padding:3px 4px;font-size:10px; }
.po-print-document footer { margin-top:8px;padding-top:6px;font-size:9px; }.po-print-total { font-weight:700;text-align:right;margin:8px 0 4px; }
@media print {
 body:has(.po-print-document) .app-shell { display:block!important; }
 body:has(.po-print-document) .sidebar,body:has(.po-print-document) .top-row { display:none!important; }
 .po-print-document { width:196mm!important;max-width:196mm!important;margin:0!important;padding:0!important;top:0;left:0; }
 .po-print-table thead { display:table-header-group; }.po-print-table tr { break-inside:avoid; }
 .po-print-document header,.po-print-document footer { break-inside:avoid; }
 .rkb-price-report .rkb-report-heading h2 { font-size:14pt; text-align:left; }
 .rkb-price-report .rkb-report-heading p { text-align:left;font-size:8pt; }
 .rkb-price-report table { font-size:8pt; }.rkb-price-report th,.rkb-price-report td { padding:2px 4px!important; }
}

.rkb-receiving-row-actions { display:flex;justify-content:flex-end;align-items:center;gap:8px; }
.rkb-row-number { color:var(--erp-muted);font-variant-numeric:tabular-nums;font-size: var(--erp-type-value, .76rem); }
.rkb-receiving-entry { display:grid;grid-template-columns:90px 110px 130px 100px minmax(150px,1fr) minmax(160px,1fr);gap:10px;align-items:end; }
.rkb-receiving-entry label { display:grid;gap:4px;font-size: var(--erp-type-label, .73rem); }
.rkb-receiving-entry .rkb-entry-product { grid-column:1/-1; }
.rkb-receiving-entry .rkb-dialog-actions,.rkb-receiving-entry>p { grid-column:1/-1;margin:0; }
.rkb-record-dialog .receiving-issue-editor,.rkb-record-dialog .receiving-issue-resolution { border:0;background:transparent;padding:0;margin:0; }
.rkb-record-dialog .form-actions { justify-content:flex-end; }
.rkb-receiving-row-actions .muted-small { overflow:hidden;text-overflow:ellipsis;max-width:130px;white-space:nowrap; }
@media(max-width:1100px){.rkb-receiving-entry { grid-template-columns:repeat(3,minmax(0,1fr)); }}
.rkb-pdf-preview{display:block;width:100%;height:calc(100vh - 180px);min-height:480px;border:0;background:#eef2f6}.rkb-inline-edit-actions{display:flex;justify-content:flex-end;gap:4px;flex-wrap:nowrap}.rkb-inline-edit-actions button{flex:0 0 28px;padding:3px;width:28px;height:28px}.rkb-plan-group th{background:#edf6fa;color:#205970;padding:7px 10px}.rkb-plan-group span{font-weight: var(--erp-weight-regular, 400);font-size: var(--erp-type-value, 11px);margin-left:8px}
.rkb-invoice-evidence{padding:12px 16px;border-top:1px solid #e6ebef;background:#fff}.rkb-invoice-evidence-heading,.rkb-invoice-file{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.rkb-invoice-evidence-heading strong{font-size: var(--erp-type-value, 13px)}.rkb-invoice-file{padding-top:8px;font-size: var(--erp-type-value, 12px)}.rkb-invoice-file small{color:#71808b;margin-left:auto}.rkb-invoice-review{width:min(1200px,calc(100vw - 48px));max-width:1200px}.rkb-ocr-table{min-width:1100px;table-layout:fixed}.rkb-ocr-table th:first-child{width:42px}.rkb-ocr-table th:nth-child(2){width:290px}.rkb-ocr-table th:nth-child(3){width:120px}.rkb-ocr-table th:nth-child(4){width:80px}.rkb-ocr-table th:nth-child(5){width:95px}.rkb-ocr-table th:nth-child(6){width:120px}.rkb-ocr-table th:nth-child(7){width:85px}.rkb-ocr-table th:nth-child(8){width:135px}.rkb-ocr-table th:last-child{width:48px}.rkb-ocr-table input,.rkb-ocr-table select{max-width:100%;min-width:0}.rkb-ocr-source{margin:12px 0}.rkb-ocr-source pre{max-height:200px;overflow:auto;font-size:11px;white-space:pre-wrap;background:#f6f8fa;padding:10px}
.rkb-plan-supplier-help{grid-column:2; margin:0; color:var(--rkb-text-muted,#657383)}
dialog.rkb-invoice-review:not(.has-results){width:min(540px,calc(100vw - 32px))}
.rkb-login-brand .rkb-record-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:var(--erp-shell-accent);color:#fff;font-weight:800;flex:none}

.rkb-report-date-range label>select.form-select{height:48px;padding:17px 30px 3px 9px;font-size: var(--erp-type-value, 12px)}

.rkb-summary-action-toolbar .rkb-detail-table-pager{margin:0;padding:0;min-height:32px}

/* The screen preview follows the same boxed supplier/identity/destination header as the PDF. */
.po-print-document .rkb-po-paper-header { display:grid; grid-template-columns:1fr 1.08fr 1fr; gap:0; border:1px solid #555; padding:0; margin-bottom:10px; }
.rkb-po-paper-header > div { padding:8px; min-width:0; font-size:12px; }
.rkb-po-paper-header > div + div { border-left:1px solid #555; }
.rkb-po-paper-header p { margin:4px 0 0; font-size:11px; line-height:1.4; }
.rkb-po-paper-header .rkb-po-paper-identity { text-align:center; }
.rkb-po-paper-header .rkb-po-paper-identity strong { font-size:17px; }
.po-print-document .rkb-po-paper-header h2 { margin:0 0 4px; font-size:14px; }

/* Shared master filters and compact purchasing actions (September 2026). */
.rkb-shared-popover.rkb-filter-compact,.rkb-filter-popover.rkb-filter-compact { width:min(420px,calc(100vw - 24px));min-width:0; }
.rkb-multicheck-field { position:relative;display:grid;gap:0;min-width:0;align-content:start; }
.rkb-filter-inset-labels .rkb-multicheck-trigger { height:38px;padding-top:9px;padding-bottom:3px; }
.rkb-multicheck-field>.rkb-popover-control { display:block;min-width:0; }
.rkb-multicheck-trigger { min-width:0;min-height:34px;height:34px;padding:5px 9px;font-size: var(--erp-type-value, 13px);font-weight: var(--erp-weight-regular, 400); }
.rkb-multicheck-trigger>span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.rkb-multicheck-trigger>svg { width:16px;height:12px;flex:none;fill:none; }
.rkb-select-trigger { padding-right:12px; }
.rkb-select-chevron { width:16px;height:12px;flex:none; }
.rkb-shared-popover.rkb-check-menu { width:max-content;min-width:175px;max-width:min(280px,calc(100vw - 24px));padding:8px; }
.rkb-check-menu .rkb-status-options { max-height:260px;overflow:auto; }
.rkb-check-menu .rkb-status-options label { display:flex;align-items:center;gap:8px;margin:0;padding:6px;font-size: var(--erp-type-label, 13px);font-weight: var(--erp-weight-label, 400); }
.rkb-shared-popover.rkb-row-action-popover { min-width:160px;width:max-content;max-width:min(240px,calc(100vw - 24px));padding:5px;font-size: var(--erp-type-body, 13px); }
.rkb-bulk-fields-popover { width:min(390px,calc(100vw - 24px)); }
.rkb-bulk-fields { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end; }
.rkb-bulk-fields label { margin:0;display:grid;gap:4px;font-size: var(--erp-type-label, 13px); }
.rkb-bulk-fill { margin-top:12px; }
.rkb-budget-page-toolbar { display:flex;align-items:center;flex-wrap:wrap;gap:12px; }
.rkb-budget-page-toolbar>label { display:flex;align-items:center;gap:8px;font-size: var(--erp-type-label, 13px);margin:0;flex:none; }
.rkb-budget-page-toolbar>label>select { width:90px;min-width:90px; }
.rkb-budget-page-toolbar .rkb-detail-toolbar-actions { margin-left:auto; }
.rkb-budget-page-toolbar+.rkb-budget-values { margin-top:14px;padding-top:12px;border-top:1px solid var(--erp-border); }
.rkb-budget-editor { width:min(620px,calc(100vw - 24px)); }
.rkb-budget-distribute { display:flex;gap:10px;align-items:end;margin:12px 0; }
.rkb-budget-distribute>label { flex:1;min-width:0; }
.rkb-budget-month-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 14px; }
.rkb-budget-month-grid label,.rkb-budget-distribute label { display:grid;gap:4px;font-size: var(--erp-type-label, 13px); }
.po-add-product-row [data-rkb-span-columns] { white-space:normal; }
.po-add-product-row input,.po-add-product-row select { width:100%;min-width:0; }
@media(max-width:640px){.rkb-budget-month-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}

.rkb-inline-edit-with-note { display:flex; align-items:center; gap:6px; min-width:0; }
.rkb-inline-edit-with-note > input { flex:1 1 60px; min-width:0; }
.rkb-inline-edit-with-note > .rkb-inline-edit-actions { flex:none; }

/* Shared preparation workspaces: same width owner, table foundation and toolbar rhythm. */
.rkb-blueprint-notice{display:flex;align-items:center;gap:8px;font-size: var(--erp-type-value, 12px);color:#5d6c75;padding:0 2px 8px}.rkb-blueprint-notice a{margin-left:auto}
.rkb-blueprint-search{display:flex;align-items:center;gap:8px}.rkb-blueprint-search>.form-control{min-width:160px;flex:1}.rkb-blueprint-search>.btn{white-space:nowrap}
.rkb-blueprint-pager{margin-top:8px;padding-top:8px;border-top:1px solid #e8edef;display:flex;justify-content:space-between;align-items:center}
.rkb-blueprint-guidance{display:flex;gap:14px;padding:18px}.rkb-blueprint-guidance h2{font-size: var(--erp-type-section, 14px);margin:0 0 6px}.rkb-blueprint-guidance p{font-size: var(--erp-type-meta, 13px);color:#65747d;margin:0;max-width:85ch}
.rkb-document-catalog{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.rkb-document-tile{padding:18px;display:flex;flex-direction:column;gap:12px}.rkb-document-tile header{display:flex;gap:12px;align-items:center}.rkb-document-tile h2{font-size: var(--erp-type-section, 15px);margin:0}.rkb-document-tile p{font-size: var(--erp-type-meta, 13px);color:#65747d;margin:0}.rkb-document-tile footer{display:flex;justify-content:flex-end;gap:8px;margin-top:auto}.rkb-document-tile dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}.rkb-document-tile dt{font-size: var(--erp-type-label, 11px);color:#687881;font-weight: var(--erp-weight-regular, 400)}.rkb-document-tile dd{font-size: var(--erp-type-value, 13px);margin:2px 0}
@media(max-width:800px){.rkb-document-catalog{grid-template-columns:1fr}.rkb-blueprint-search{flex-wrap:wrap}.rkb-blueprint-search>.form-control{flex-basis:100%}.rkb-blueprint-notice{flex-wrap:wrap}}

.rkb-document-center{display:grid;gap:16px}.rkb-document-center>.panel{margin:0}

/* Multi-choice menus retain native keyboard/checked semantics, with a tick instead of a box. */
.rkb-checklist-option { display:inline-flex; align-items:center; gap:6px; min-height:24px; }
:is(.rkb-status-options,.rkb-checklist-option,.rkb-column-chooser-popover,.rkb-filter-checkbox-group,.rkb-checkbox-filter) input[type="checkbox"] {
 appearance:none; background:transparent; border:0; border-radius:2px; box-shadow:none;
 width:18px; min-width:18px; height:18px; min-height:18px; flex:0 0 18px; margin:0;
 display:inline-grid; place-content:center; color:var(--rkb-accent,#087f9e); cursor:pointer;
}
:is(.rkb-status-options,.rkb-checklist-option,.rkb-column-chooser-popover,.rkb-filter-checkbox-group,.rkb-checkbox-filter) input[type="checkbox"]::before {
 content:""; width:10px; height:6px; border-left:2px solid currentColor; border-bottom:2px solid currentColor;
 transform:rotate(-45deg) translate(1px,-1px); visibility:hidden;
}
:is(.rkb-status-options,.rkb-checklist-option,.rkb-column-chooser-popover,.rkb-filter-checkbox-group,.rkb-checkbox-filter) input[type="checkbox"]:checked::before { visibility:visible; }
:is(.rkb-status-options,.rkb-column-chooser-popover,.rkb-filter-checkbox-group,.rkb-checkbox-filter) input[type="checkbox"]:focus-visible { outline:2px solid var(--rkb-accent,#087f9e); outline-offset:2px; }
:is(.rkb-status-options,.rkb-column-chooser-popover) label { cursor:pointer; border:0; border-radius:4px; }
:is(.rkb-status-options,.rkb-column-chooser-popover) label:hover { background:var(--erp-bg,#f2f6f8); }
:is(.rkb-status-options,.rkb-column-chooser-popover) label:has(input:checked) { color:var(--rkb-accent,#087f9e); }
:is(.rkb-status-options,.rkb-column-chooser-popover) input:disabled { opacity:.45;cursor:default; }
.rkb-workspace-tabs { margin-bottom:12px; background:#fff; border:1px solid var(--erp-border);border-radius:8px; }
.rkb-workspace-tabs>a { padding:12px 18px;color:var(--erp-muted);font-size: var(--erp-type-tab, 13px);text-decoration:none;border-bottom:3px solid transparent; }
.rkb-workspace-tabs>a.active { color:var(--rkb-accent,#087f9e);border-bottom-color:currentColor;background:#eef8fb;font-weight: var(--erp-weight-emphasis, 650); }
.rkb-document-indicator { display:flex;align-items:center;justify-content:center;gap:8px;min-height:28px; }
.rkb-line-summary { display:flex;align-items:center;flex-wrap:wrap;gap:6px 0;font-size: var(--erp-type-value, 12px);color:var(--erp-muted); }
.rkb-line-summary > span { display:inline-flex;align-items:baseline;gap:5px;padding:0 12px;border-right:1px solid var(--erp-border);white-space:nowrap; }
.rkb-line-summary > span:first-child { padding-left:0; }
.rkb-line-summary > span:last-child { border-right:0; }
.rkb-line-summary strong { color:var(--erp-text);font-weight: var(--erp-weight-emphasis, 650); }
.rkb-field-prompt { font-size: var(--erp-type-value, 12px);color:#87651c;border-bottom:1px dashed #bda05c;cursor:text; }

.rkb-stage-link { color:inherit;text-decoration:none;border-bottom:1px dotted currentColor; }
.rkb-stage-link:hover { color:var(--rkb-accent,#087f9e);border-bottom-style:solid; }
.rkb-stage-link:focus-visible { outline:2px solid var(--rkb-accent,#087f9e);outline-offset:3px; }
.rkb-finance-summary { padding:12px 0;margin:0 0 12px;border-bottom:1px solid var(--erp-border); }
.rkb-finance-summary dl { display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px 20px;margin:0; }
.rkb-finance-summary dt { color:var(--erp-muted);font-size: var(--erp-type-label, 12px);font-weight: var(--erp-weight-regular, 400); }
.rkb-finance-summary dd { margin:4px 0 0;font-size: var(--erp-type-total, 13px);font-weight: var(--erp-weight-total, 650); }
.rkb-finance-panel fieldset>.btn { display:block;margin:10px 0 10px auto; }
.rkb-inline-form-actions { display:flex;align-items:end;gap:10px;margin:0 0 12px;flex-wrap:wrap; }
.rkb-inline-form-actions>label { display:grid;gap:5px;font-size: var(--erp-type-label, 12px);flex:0 1 320px;min-width:180px;margin:0; }
.rkb-inline-form-actions>.btn { flex:none;height:34px; }
.rkb-inline-action-toolbar { display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:10px 0 14px;flex-wrap:wrap; }
.rkb-compact-field-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px; }
.rkb-compact-field-grid>label { display:grid;gap:5px;font-size: var(--erp-type-label, 12px);min-width:0; }
@media(max-width:850px){.rkb-compact-field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }}
@media(max-width:560px){.rkb-compact-field-grid { grid-template-columns:1fr; }}
@media(forced-colors:active) { :is(.rkb-status-options,.rkb-checklist-option,.rkb-column-chooser-popover,.rkb-filter-checkbox-group,.rkb-checkbox-filter) input[type="checkbox"] { appearance:auto; } }

/* Shared read-only information dialog and single-line table references. */
.rkb-info-dialog { width:min(560px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); padding:0; overflow:auto; }
.rkb-info-dialog-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:18px 20px 14px; border-bottom:1px solid var(--erp-border); }
.rkb-info-dialog-header h2 { margin:0; font-size: var(--erp-type-section, 1rem); font-weight: var(--erp-weight-section, 700); }
.rkb-info-dialog-header p { margin:5px 0 0; color:var(--erp-muted); font-size: var(--erp-type-meta, .82rem); }
.rkb-info-dialog-body { padding:16px 20px; }
.rkb-dialog-form { display:grid; gap:14px; }
.rkb-dialog-form > p { margin:0; }
.rkb-info-dialog .rkb-dialog-actions { margin:0; padding:12px 20px; border-top:1px solid var(--erp-border); }
.rkb-info-dialog .rkb-record-facts { margin:0; }
.rkb-info-dialog .rkb-record-facts dd { overflow-wrap:anywhere; }
.rkb-info-relations { list-style:none; margin:0; padding:0; display:grid; }
.rkb-info-relations li { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:11px 0; border-bottom:1px solid var(--erp-border); }
.rkb-info-relations li:last-child { border-bottom:0; }
.rkb-info-relations li > div { display:grid; gap:3px; }
.rkb-info-relations small { color:var(--erp-muted); }
.rkb-inline-reference { display:inline-flex; align-items:center; gap:8px; max-width:100%; white-space:nowrap; }
.rkb-inline-reference > strong { overflow:hidden; text-overflow:ellipsis; }
.rkb-inline-reference .po-merge-info { flex:0 0 22px; }

.rkb-ocr-source { white-space:pre-wrap; overflow-wrap:anywhere; max-height:180px; overflow:auto; font-size: var(--erp-type-value, .78rem); padding:10px; background:var(--erp-bg); }

.rkb-info-dialog-wide { width:min(940px,calc(100vw - 32px)); }
.rkb-info-dialog-table { width:min(1220px,calc(100vw - 32px)); }
.rkb-document-preview { width:100%; height:68dvh; border:0; }

/* Account hierarchy follows the server tree across paginated results. */
.rkb-account-tree-label { display:inline-block; padding-inline-start:calc(var(--account-depth,0) * var(--erp-account-indent)); font-weight:var(--erp-weight-regular,400); }
.rkb-account-tree-label.rkb-account-parent { font-weight:var(--erp-weight-emphasis,600); }

/* Compact task context: shared by invoice entry, reports and page help. */
.rkb-help-section{margin-bottom:16px}.rkb-help-section h3{font-size: var(--erp-type-subsection, 14px);margin:0 0 5px}.rkb-help-section p{margin:0;font-size: var(--erp-type-meta, 13px);line-height: var(--erp-leading-meta, 1.5)}
.rkb-invoice-entry{display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px;padding:12px 0;border-bottom:1px solid #e3e8ec;margin-bottom:10px}
.rkb-invoice-entry-fields{display:grid;grid-template-columns:repeat(2,minmax(150px,240px));gap:12px}.rkb-invoice-entry-fields label{display:flex;flex-direction:column;gap:4px}
.rkb-invoice-entry-actions{display:flex;gap:8px;align-self:flex-start;padding-top:24px;margin-left:auto}
/* Shared item density for both editable and read-only purchasing details. */
.rkb-styled-workspace .rkb-data-table.rkb-item-table tbody td,
.rkb-styled-workspace .rkb-data-table.rkb-item-table tbody th { height:34px;padding-block:3px;vertical-align:middle;line-height: var(--erp-table-leading, 1.25); }
.rkb-styled-workspace .rkb-item-table thead th { padding-block:7px; }
.rkb-styled-workspace .rkb-item-table .form-control,
.rkb-styled-workspace .rkb-item-table .form-select,
.rkb-styled-workspace .rkb-item-table .quantity-cell-button { min-height:28px;line-height: var(--erp-leading-value, 1.25);font-size:inherit; }
.rkb-styled-workspace .rkb-item-table .po-inline-editable { min-height:28px; }
.rkb-styled-workspace .rkb-item-table .drag-handle { white-space:nowrap; }
.rkb-styled-workspace .rkb-item-table .drag-handle > span { display:inline-block;padding:0 3px;line-height:24px;vertical-align:middle; }
.rkb-workflow-next { width:auto;min-height:32px;flex-shrink:0;white-space:normal; }
.rkb-invoice-comparison { table-layout:fixed;width:100%;min-width:600px;margin-bottom:0; }
.rkb-invoice-comparison col.comparison-label { width:25%; }
.rkb-invoice-comparison th,.rkb-invoice-comparison td { vertical-align:middle;padding:6px 12px; }
.rkb-invoice-comparison tbody th { background:transparent;font-weight: var(--erp-weight-emphasis, 600); }
.rkb-invoice-comparison .numeric-cell { text-align:right;font-variant-numeric:tabular-nums; }
.rkb-invoice-comparison .form-control { text-align:right;min-height:30px;padding:4px 8px; }
.rkb-invoice-comparison .invalid-feedback { white-space:normal;text-align:left; }
.rkb-dialog-summary { padding:12px;background:var(--erp-bg,#f6f8fa);border:1px solid var(--erp-border);border-radius:6px; }
.rkb-dialog-summary .rkb-fact-wide { grid-column:1/-1; }
.rkb-dialog-note { display:flex;flex-direction:column;gap:4px;margin-top:12px; }
.rkb-compact-report-context{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid #e3e8ec;margin-bottom:8px}.rkb-compact-report-context small{display:block;color:#65737e;font-size: var(--erp-type-meta, 12px)}
/* Shared compact date-range actions: labels own their row, controls share a baseline. */
.rkb-date-range-toolbar{display:flex;align-items:flex-end;justify-content:flex-end;flex-wrap:wrap;gap:8px;min-width:0}
.rkb-date-range-toolbar>label{display:grid;gap:3px;margin:0;font-size: var(--erp-type-label, 12px);color:var(--erp-muted);min-width:0}
.rkb-date-range-toolbar .rkb-date-input{width:148px;max-width:100%}
.rkb-date-range-toolbar .form-control{height:32px;font-size: var(--erp-type-value, 12px)}
.rkb-date-range-toolbar>.btn{height:32px}
@media(max-width:700px){.rkb-invoice-entry-actions{padding-top:0;margin-left:0}.rkb-invoice-entry-fields{width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Compact read-only facts share the available row and wrap on narrow screens. */
.rkb-record-facts.rkb-record-facts-inline { grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:10px 18px; }

/* Owned dialogs use the same compact typography as the operational workspace. */
.rkb-record-dialog,.rkb-modal.rkb-styled-workspace { font-size: var(--erp-type-value, 13px); line-height: var(--erp-leading-value, 1.45); }
.rkb-record-dialog .form-control,.rkb-record-dialog .form-select,.rkb-modal.rkb-styled-workspace .form-control,.rkb-modal.rkb-styled-workspace .form-select { font-size: var(--erp-type-value, 13px); }
.rkb-record-dialog .btn-sm,.rkb-modal.rkb-styled-workspace .btn-sm { font-size: var(--erp-type-action-sm, 12px); }
.rkb-record-dialog .rkb-record-tab-header h2,.rkb-record-dialog h3,.rkb-modal.rkb-styled-workspace h3 { font-size: var(--erp-type-section, 15px); }
.rkb-record-dialog .rkb-field-help { font-size: var(--erp-type-meta, 12px); }
.rkb-ocr-text { white-space:pre-wrap; overflow-wrap:anywhere; max-height:55vh; overflow:auto; font:12px/1.5 monospace; }

.rkb-forecast-preview { width:min(1040px,calc(100vw - 40px)); }
.rkb-plan-distribution table { min-width:850px; }
.rkb-plan-distribution input { text-align:right; }

/* Shared operational controls: stable action positions and readable comparison. */
.rkb-topbar-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.rkb-invoice-comparison{max-width:880px;margin-left:auto}
.rkb-save-status{order:-1;flex:1;min-width:120px;font-size: var(--erp-type-meta, 12px);color:var(--rkb-text-muted,#64748b);text-align:right}
.rkb-save-status:empty::before{content:"\00a0"}

/* Shared filter presets remain a compact part of the owned filter popup. */
.rkb-filter-presets{border-bottom:1px solid var(--bs-border-color,#dce3e8);padding-bottom:8px;margin-bottom:10px;font-size: var(--erp-type-value, 12px)}.rkb-filter-presets>.rkb-inline-form-actions{display:flex;align-items:center;gap:6px}.rkb-filter-presets .form-select{min-width:0;font-size: var(--erp-type-value, 12px)}.rkb-filter-presets label{display:block;margin-top:7px}.rkb-filter-presets small{display:block;margin-top:6px}

/* Shared workflow refinements: stable summaries, tabbed secondary actions. */
.rkb-status-details{display:inline-flex;gap:4px;align-items:center;flex-wrap:wrap}
.status-badge.purple{background:#eee8f7;color:#67459c;border:1px solid #dacfef}
.rkb-save-feedback{font-size: var(--erp-type-meta, 12px);min-height:18px;color:#536672}
.rkb-comparison-layout{display:grid;grid-template-columns:minmax(180px,1fr) minmax(600px,880px);gap:16px;align-items:start}
.rkb-document-readiness{padding:8px 12px;border:1px solid #e0e7ec;border-radius:6px}
.rkb-document-readiness .rkb-record-facts{grid-template-columns:1fr 1fr;gap:12px;margin:0}
.rkb-clean-fieldset{border:0;padding:12px 0 0;margin:0;min-width:0}
.rkb-field-wide{grid-column:1/-1}
.rkb-filter-workspace .product-detail-tabs{margin:0 0 10px}
.rkb-filter-workspace .rkb-filter-popover-actions{flex-wrap:wrap;gap:6px}
.rkb-filter-manual[hidden],.rkb-filter-saved[hidden],.rkb-tab-panel[hidden]{display:none!important}
.rkb-preset-row{display:flex;gap:8px;align-items:center;border-bottom:1px solid #e1e7ec;padding:6px 0}
.rkb-preset-choice{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;text-align:left;background:transparent;border:0;padding:6px;color:inherit}
.rkb-preset-choice small{font-size: var(--erp-type-meta, 12px);color:#64748b}
.rkb-sort-select{width:auto;max-width:220px}
.rkb-inline-field{display:flex;gap:8px;align-items:center;min-width:0;font-size: var(--erp-type-label, 12px)}
.rkb-drag-handle{cursor:grab;display:inline-block;padding:3px 5px;color:#657382}
.rkb-checkbox-label{display:flex;gap:8px;align-items:start;font-size: var(--erp-type-value, 13px);margin-top:12px}
@media(max-width:1250px){.rkb-comparison-layout{grid-template-columns:1fr}.rkb-document-readiness .rkb-record-facts{grid-template-columns:repeat(4,minmax(0,1fr))}.rkb-comparison-layout .rkb-invoice-comparison{max-width:none}}
@media(max-width:650px){.rkb-document-readiness .rkb-record-facts{grid-template-columns:1fr 1fr}}
/* Bounded review surfaces share the operational table and metadata foundation. */
.rkb-bounded-review{max-width:960px;margin-inline:0}
.rkb-review-metadata{display:grid;grid-template-columns:minmax(70px,.45fr) minmax(190px,1fr) minmax(190px,1fr);gap:12px;margin:0 0 12px;padding:10px 12px;border:1px solid var(--erp-border);border-radius:6px;background:var(--erp-soft,#f7fafb)}
.rkb-review-metadata dt{font-size: var(--erp-type-meta, 11px)}.rkb-review-metadata dd{margin:3px 0 0;font-size: var(--erp-type-meta, 12px)}
.rkb-bounded-review .rkb-date-range-toolbar{justify-content:flex-start}
.rkb-operational-footer{padding:12px 14px;gap:12px}
.rkb-select-field{display:grid;gap:5px;min-width:0;width:100%;margin:0}
.rkb-select-field>.form-select{width:100%;padding-right:36px;min-height:34px}
.rkb-inline-field>.form-select,.rkb-sort-select{min-width:190px;flex-shrink:0;padding-right:36px}
@media(max-width:680px){.rkb-review-metadata{grid-template-columns:1fr}.rkb-select-field>.form-select{min-width:0}}

/* Compact inline entry fields share the item-table rhythm. */
.rkb-inline-fields td { padding: 5px 6px; vertical-align: middle; }
.rkb-inline-fields .form-control, .rkb-inline-fields .form-select { width: 100%; min-width: 0; min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: var(--erp-type-value, 12px); }
.rkb-inline-fields input[type="date"] { min-width: 128px; }
.rkb-inline-fields .form-select { padding-right: 28px; }

/* Shared stage palette: distinguish each position in the purchasing chain. */
.status-badge.stage-draft{background:#fff1d6;border-color:#dfbc76;color:#765000}
.status-badge.stage-ordered{background:#e8effe;border-color:#c4d5fa;color:#224ca0}
.status-badge.stage-received{background:#e4f4ed;border-color:#badfce;color:#25694e}
.status-badge.stage-checked{background:#f0eafa;border-color:#d8c8ee;color:#674191}
.status-badge.stage-bill{background:#fff0dc;border-color:#f0d2a5;color:#87510a}
.status-badge.stage-paid{background:#e3f4f9;border-color:#b9dfe9;color:#14677d}
.status-badge.stage-complete{background:#216347;border-color:#216347;color:#fff}
.rkb-financial-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,360px);gap:24px;margin-bottom:18px;max-width:1060px}
.rkb-fact-group{min-width:0;border:1px solid var(--erp-border);border-radius:6px;padding:12px 16px}
.rkb-fact-group h3{font-size: var(--erp-type-subsection, 13px);font-weight: var(--erp-weight-subsection, 650);margin:0 0 12px}
.rkb-amount-summary{margin:0;font-size: var(--erp-type-value, 13px)}
.rkb-amount-summary>div{display:flex;justify-content:space-between;gap:20px;padding:5px 0}
.rkb-amount-summary dt{font-weight: var(--erp-weight-regular, 400)}.rkb-amount-summary dd{margin:0;text-align:right;font-variant-numeric:tabular-nums}
.rkb-amount-summary .rkb-amount-total{border-top:1px solid var(--erp-border);margin-top:5px;padding-top:9px;font-weight: var(--erp-weight-total, 650)}
.rkb-amount-summary .rkb-amount-total dt{font-weight: var(--erp-weight-total, 650)}
.rkb-bank-reference{display:flex;flex-wrap:wrap;gap:6px 20px;padding:10px 0;font-size: var(--erp-type-meta, 13px)}
.rkb-payment-instructions{display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;margin-top:16px}
.rkb-payment-instructions label{min-width:0;display:grid;gap:6px;font-size: var(--erp-type-label, 13px)}
.rkb-payment-instructions select{width:100%;padding-right:36px}
.rkb-totals-row{display:flex;justify-content:flex-end;margin-top:12px}.rkb-totals-row .rkb-amount-summary{width:320px;max-width:100%}
.rkb-compact-reference{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;font-size: var(--erp-type-meta, 13px);padding:8px 0}
.rkb-import-drop{display:grid;position:relative;place-items:center;gap:8px;min-height:148px;border:1px dashed #92afb9;border-radius:8px;background:#f5fafb;padding:24px;text-align:center;color:#334d59}
.rkb-import-drop input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.rkb-import-drop:focus-within{outline:2px solid var(--erp-primary,#087e9c);outline-offset:2px}
.rkb-import-preview{max-height:52vh;overflow:auto}.rkb-import-preview thead th{position:sticky;top:0;z-index:1}
.rkb-table-foundation td.rkb-wrap-cell { white-space:normal;overflow-wrap:anywhere; }
.rkb-wrap-cell small { display:block; }
.rkb-import-preview .rkb-cell-input { width:100%;min-width:0;padding:5px; }
.rkb-import-type{display:flex;align-items:center;gap:10px;margin-bottom:12px;font-size: var(--erp-type-value, 13px)}
@media(max-width:720px){.rkb-financial-overview,.rkb-payment-instructions{grid-template-columns:minmax(0,1fr)}.rkb-summary-action-toolbar{flex-wrap:wrap}}
/* Report catalog uses the shared list toolbar and compact table geometry. */
.rkb-report-catalog-table{margin-bottom:0}
.rkb-report-catalog-table th,.rkb-report-catalog-table td{padding:5px 10px;vertical-align:middle}
.rkb-report-catalog-table .rkb-report-section th{background:#f6f8fa;color:var(--erp-muted);font-size: var(--erp-type-value, 11px);font-weight: var(--erp-weight-emphasis, 600);padding-block:7px}
.rkb-report-links{display:flex;justify-content:flex-end;align-items:center;gap:8px;white-space:nowrap}

/* Shared separation between amount/action summaries and their item tables. */
.rkb-summary-action-toolbar { margin-bottom: 12px; }
.rkb-supplier-dictionary-filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0 10px}
.rkb-supplier-dictionary-filters>.rkb-inset-control:first-child{flex:1 1 225px;min-width:0}
.rkb-supplier-dictionary-filters>.rkb-inset-control:nth-child(2){flex:0 1 155px;min-width:130px}
.rkb-supplier-dictionary-filters>.btn{flex:none;width:34px;height:34px;padding:4px}
.rkb-supplier-dictionary-filters>.rkb-summary-strip{flex:none;margin:0;min-height:30px}
.rkb-supplier-dictionary-filters>.rkb-register-controls{display:flex;align-items:center;gap:6px;margin-left:auto;min-width:0}
.rkb-supplier-dictionary-conflict{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px 12px;padding:10px;border:1px solid var(--rkb-border,#d7dfe9);border-radius:6px;margin-bottom:10px;font-size:.82rem}
.rkb-supplier-dictionary-conflict>button{grid-column:1/-1;justify-self:end;margin-top:4px}
.rkb-supplier-dictionary-history{display:grid;gap:8px}
.rkb-supplier-dictionary-history-item{min-width:0;border:1px solid var(--rkb-border,#d7dfe9);border-radius:6px;padding:9px 10px;font-size:.8rem}
.rkb-supplier-dictionary-history-item>header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:3px 12px;color:#334155}
.rkb-supplier-dictionary-history-item>header>span,.rkb-supplier-dictionary-history-item>p,.rkb-supplier-dictionary-history-values small{color:#64748b}
.rkb-supplier-dictionary-history-item>p{margin:3px 0 0}
.rkb-supplier-dictionary-history-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:6px}
.rkb-supplier-dictionary-history-values>div{min-width:0;display:grid;gap:2px;overflow-wrap:anywhere}
.rkb-supplier-dictionary-history-values small{font-weight:600}
@media(max-width:570px){.rkb-supplier-dictionary-filters>.rkb-inset-control:first-child{flex-basis:calc(100% - 42px)}.rkb-supplier-dictionary-filters>.rkb-inset-control:nth-child(2){flex:1 1 130px}.rkb-supplier-dictionary-filters>.rkb-register-controls{margin-left:0}.rkb-supplier-dictionary-conflict{grid-template-columns:minmax(0,1fr)}}
@media(max-width:570px){.rkb-supplier-dictionary-history-values{grid-template-columns:minmax(0,1fr)}}
.rkb-payment-instructions { grid-template-columns: 180px minmax(0,1fr) auto; align-items: end; }
.rkb-payment-instructions .rkb-detail-toolbar-actions { flex-wrap: nowrap; }
@media(max-width:720px) { .rkb-payment-instructions { grid-template-columns: minmax(0,1fr); } }

/* Shared bounded report controls: tables own overflow; filters and actions wrap. */
.rkb-report-controls { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; padding:10px 0; }
.rkb-report-controls > label { display:grid; gap:4px; width:150px; max-width:100%; min-width:0; font-size: var(--erp-type-label, .78rem); margin:0; }
.rkb-report-controls > .rkb-report-kind { width:290px; }
.rkb-report-controls .form-control,.rkb-report-controls .form-select { width:100%; height:34px; font-size: var(--erp-type-value, .8rem); }
.rkb-report-controls > .rkb-detail-toolbar-actions { flex:none; padding-bottom:0; }
.rkb-report-links { display:grid; grid-template-columns:102px 150px; gap:8px; align-items:center; justify-content:end; }
.rkb-report-links > .rkb-report-open { grid-column:2; }
.rkb-report-links > .btn { min-height:32px; display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; }
.rkb-reference-with-info { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.rkb-route-note-fields { display:grid; grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) minmax(200px,1.6fr); gap:12px; align-items:start; }
.rkb-route-note-fields > label { display:grid; gap:5px; min-width:0; font-size: var(--erp-type-meta, .8rem); }
.rkb-route-note-fields .form-select { width:100%; min-width:0; }
.rkb-route-note-fields textarea { min-height:34px; }
@media(max-width:800px) { .rkb-route-note-fields { grid-template-columns:repeat(2,minmax(0,1fr)); } .rkb-route-note-fields > label:last-child { grid-column:1/-1; } }
@media(max-width:480px) { .rkb-report-controls > label,.rkb-report-controls > .rkb-report-kind { width:100%; } .rkb-route-note-fields { grid-template-columns:1fr; } }
.rkb-dialog-table-scroll{max-height:min(360px,45vh);overflow:auto;margin-top:12px}

/* Design System V1 / Phase 1. The four canonical page roots opt in.
   Extend the existing ERP theme; keep column geometry, density, layout and
   interaction owners above unchanged. Route-gated body scope also covers the
   existing column chooser portal. Print and other routes retain their skin. */
@media screen {
 body:has(.page .rkb-visual-pilot) {
    --erp-bg: #fcfcfc;
    --erp-canvas: var(--erp-bg);
    --erp-surface: #ffffff;
    --erp-surface-soft: #f1f5f9;
    --erp-surface-accent: #f0f4fe;
    --erp-row-hover: #f8fafc;
    --erp-border: #e2e8f0;
    --erp-border-strong: #64748b;
    --erp-border-control-idle: #8894a4;
    --erp-text: #14141e;
    --erp-dark: #020520;
    --erp-text-secondary: #374151;
    --erp-muted: #6b7280;
    --erp-blue: #145aff;
    --erp-accent-hover: #1048cc;
    --erp-accent-pressed: #0d3aa6;
    --erp-info: #1e40af;
    --erp-info-soft: #eff6ff;
    --erp-green: #166534;
    --erp-green-soft: #f0fdf4;
    --erp-amber: #92400e;
    --erp-amber-soft: #fffbeb;
    --erp-red: #991b1b;
    --erp-red-soft: #fef2f2;
    --erp-purple: #6b21a8;
    --erp-purple-soft: #faf5ff;
    --erp-radius: 8px;
    --erp-radius-control: 6px;
    --erp-radius-dialog: 12px;
    --erp-shadow: 0 1px 2px rgba(2,5,32,.04);
    --erp-shadow-dialog: 0 8px 24px rgba(2,5,32,.12);
    --erp-focus-ring: 0 0 0 3px rgba(20,90,255,.14);
    --erp-space-1: 4px;
    --erp-space-2: 6px;
    --erp-space-3: 8px;
    --erp-space-4: 12px;
    --erp-space-5: 16px;
    --erp-space-6: 24px;
    --erp-space-7: 32px;
    --rkb-accent: var(--erp-blue);
    --rkb-accent-soft: var(--erp-surface-accent);
    background: var(--erp-bg);
    color: var(--erp-text);
    font-family: var(--erp-font);

    /* Rebind aliases also declared by existing record/styled workspaces. */
    & :is(.rkb-styled-workspace, .rkb-record-workspace) {
        --rkb-accent: var(--erp-blue);
        --rkb-accent-soft: var(--erp-surface-accent);
    }
    & :is(.panel, .rkb-record-summary, .rkb-record-content, .product-filter-panel) {
        background: var(--erp-surface); border-color: var(--erp-border);
        border-radius: var(--erp-radius); box-shadow: var(--erp-shadow);
    }
    /* Sidebar and topbar now have universal scoped owners. */
    & :is(.rkb-section-icon, .rkb-record-symbol) { background: var(--erp-surface-soft); color: var(--erp-text-secondary); border-color: var(--erp-border); }

    /* Existing control heights, inline editor padding and hit areas are retained. */
    & :is(.btn, .form-control, .form-select, .product-chip-input, .rkb-search-select-input, .rkb-multicheck-trigger) { border-radius: var(--erp-radius-control); }
    & :is(.form-control, .form-select, .product-chip-input, .rkb-search-select-input) { border-color: var(--erp-border-control-idle); color: var(--erp-text); }
    & :is(.form-control, .form-select, .product-chip-input, .rkb-search-select-input):focus { border-color: var(--erp-blue); }
    & :is(.form-control, .form-select) { font-size: var(--erp-type-value, var(--erp-type-body)); }
    & :is(.btn-dark, .btn-primary) { background: var(--erp-blue); border-color: var(--erp-blue); color: var(--erp-surface); }
    & :is(.btn-dark, .btn-primary):hover:not(:disabled) { background: var(--erp-accent-hover); border-color: var(--erp-accent-hover); }
    & :is(.btn-dark, .btn-primary):active:not(:disabled) { background: var(--erp-accent-pressed); border-color: var(--erp-accent-pressed); }
    & :is(.btn-outline-dark, .btn-outline-secondary) { background: var(--erp-surface); border-color: var(--erp-border-control-idle); color: var(--erp-text-secondary); }
    & :is(.btn-outline-dark, .btn-outline-secondary):hover:not(:disabled) { background: var(--erp-surface-soft); color: var(--erp-dark); }
    & .btn-outline-danger { border-color: var(--erp-red); color: var(--erp-red); }
    & .btn-outline-danger:hover:not(:disabled) { background: var(--erp-red); color: var(--erp-surface); }
    & .btn:disabled { background: var(--erp-surface-soft); border-color: var(--erp-border); color: var(--erp-muted); opacity: 1; }
    & :is(.form-control:disabled, .form-select:disabled, .read-only-value) { background: var(--erp-surface-soft); color: var(--erp-text-secondary); }
    & :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--erp-blue); outline-offset: 2px; box-shadow: var(--erp-focus-ring); }
    & :is(.rkb-data-table tr, .rkb-data-table th):focus-visible { outline-offset: -2px; }
    & input[type=checkbox] { accent-color: var(--erp-blue); }

    & :is(.product-identity-copy h1, .po-detail-title-row h1) { color: var(--erp-dark); font-size: var(--erp-type-title, 20px); line-height: var(--erp-leading-title, 26px); font-weight: var(--erp-weight-title, 600); letter-spacing: var(--erp-tracking-title, -.01em); }
    & :is(.rkb-form-section h2, .rkb-record-tab-header h2) { color: var(--erp-dark); font-size: var(--erp-type-section, 16px); line-height: var(--erp-leading-section, 22px); font-weight: var(--erp-weight-section, 600); }
    & .rkb-record-facts dd { color: var(--erp-text); font-size: var(--erp-type-value, var(--erp-type-body)); line-height: var(--erp-leading-value, 20px); }
    & .rkb-record-facts .rkb-record-price { color: var(--erp-text); font-size: var(--erp-type-summary, 16px); }
    & :is(.rkb-record-facts dt, .rkb-record-reference, .rkb-save-state) { font-size: var(--erp-type-meta, var(--erp-type-meta)); color: var(--erp-muted); }
    & :is(.rkb-record-reference strong, .rkb-record-field) { color: var(--erp-text-secondary); }
    & .rkb-record-columns { gap: var(--erp-space-6); }
    & .rkb-record-summary { padding: var(--erp-space-4) var(--erp-space-5); gap: var(--erp-space-4); }
    & .rkb-record-save-actions { gap: var(--erp-space-3); }
    & .product-detail-tabs button { font-size: var(--erp-type-tab, var(--erp-type-table)); font-weight: var(--erp-weight-tab, 600); }
    & .product-detail-tabs button.active { background: var(--erp-surface-accent); color: var(--erp-blue); border-bottom-color: var(--erp-blue); }
    & :is(.filter-chip, .product-detail-count) { background: var(--erp-surface-accent); color: var(--erp-text-secondary); border-color: var(--erp-border); }
    & .rkb-line-summary { color: var(--erp-text-secondary); }
    & .rkb-line-summary strong { color: var(--erp-dark); font-variant-numeric: tabular-nums; }

    /* Keep the foundation's table font metrics as well as widths/order/scrolling:
       changing glyph widths would alter its content-measured column sizes. */
    & .rkb-data-table { --bs-table-bg: var(--erp-surface); --bs-table-hover-bg: var(--erp-row-hover); color: var(--erp-text); }
    & .rkb-data-table thead th { background: var(--erp-table-header-bg); color: var(--erp-table-header-text); border-bottom-color: var(--erp-table-header-border); }
    & .rkb-data-table tbody td { border-bottom-color: var(--erp-border); }
    & .rkb-data-table tbody tr:hover > td { background: var(--erp-row-hover); }
    & .rkb-data-table tbody :is(tr.selected, tr:has(input[type=checkbox]:checked)) > td { background: var(--erp-surface-accent); }
    & .rkb-data-table :is(.form-control, .form-select, .po-inline-editable) { font-size: inherit; }
    & .rkb-data-table .rkb-table-editor-row > td { background: var(--erp-surface-accent); }
    & .rkb-data-table tbody tr > td.table-cell-warning { background: var(--erp-amber-soft); color: var(--erp-amber); box-shadow: inset 3px 0 var(--erp-amber); }
    & .rkb-data-table tbody tr > td.table-cell-danger { background: var(--erp-red-soft); color: var(--erp-red); box-shadow: inset 3px 0 var(--erp-red); }
    & .rkb-field-prompt { color: var(--erp-amber); border-bottom-color: var(--erp-amber); }

    /* Semantic colors decorate existing status classes; no state inference. */
    & .status-badge { --erp-status-text: var(--erp-text-secondary); --erp-status-bg: var(--erp-surface-soft); color: var(--erp-status-text); background: var(--erp-status-bg); border-color: var(--erp-border); border-radius: var(--erp-radius-control); }
    & .status-badge:is(.blue, .stage-ordered) { --erp-status-text: var(--erp-info); --erp-status-bg: var(--erp-info-soft); }
    & .status-badge:is(.green, .stage-paid, .stage-complete) { --erp-status-text: var(--erp-green); --erp-status-bg: var(--erp-green-soft); }
    & .status-badge:is(.amber, .stage-draft, .stage-bill) { --erp-status-text: var(--erp-amber); --erp-status-bg: var(--erp-amber-soft); }
    & .status-badge.red { --erp-status-text: var(--erp-red); --erp-status-bg: var(--erp-red-soft); }
    & .status-badge:is(.purple, .stage-checked) { --erp-status-text: var(--erp-purple); --erp-status-bg: var(--erp-purple-soft); }
    & .status-badge.stage-received { --erp-status-text: #126b75; --erp-status-bg: #e2f4f5; }
    /* Stage identity is semantic, not a primary-action treatment. */
    & .rkb-stage-strip .current { --erp-stage-text: var(--erp-green); --erp-stage-bg: var(--erp-green-soft); color: var(--erp-stage-text); }
    & .rkb-stage-strip .current[data-stage=ORDERED] { --erp-stage-text: var(--erp-info); --erp-stage-bg: var(--erp-info-soft); }
    & .rkb-stage-strip .current:is([data-stage=DRAFT], [data-stage=BILLED]) { --erp-stage-text: var(--erp-amber); --erp-stage-bg: var(--erp-amber-soft); }
    & .rkb-stage-strip .current .rkb-stage-number { color: var(--erp-stage-text); background: var(--erp-stage-bg); border-color: var(--erp-stage-text); }
    & .rkb-stage-strip .complete { color: var(--erp-green); }
    & .rkb-stage-strip .complete .rkb-stage-number { color: var(--erp-green); background: var(--erp-green-soft); border-color: var(--erp-green); }
    & .rkb-stage-strip .cancelled { color: var(--erp-red); }

    /* Same skin for native dialogs, owned popovers and the existing modal. */
    & :is(.rkb-record-dialog, .rkb-confirm-dialog, .rkb-modal, .rkb-shared-popover, .rkb-filter-popover, .rkb-column-chooser-popover) { background: var(--erp-surface); color: var(--erp-text); border-color: var(--erp-border); border-radius: var(--erp-radius-dialog); box-shadow: var(--erp-shadow-dialog); }
    & .rkb-inline-form { background: var(--erp-surface-accent); border-color: var(--erp-border); box-shadow: inset 3px 0 var(--erp-blue); }
 }
}
@media screen and (prefers-reduced-motion: reduce) {
 body:has(.page .rkb-visual-pilot) :is(.btn, .sidebar, .nav-link, .nav-group-chevron) { transition: none; }
}
@media screen and (forced-colors: active) {
 body:has(.page .rkb-visual-pilot) :is(button, a, input, select, textarea, [tabindex]):focus-visible { outline-color: Highlight; }
}

/* Universal type roles: components retain all geometry and interaction owners. */
@media screen {
 body { font-family: var(--erp-font); font-size: var(--erp-type-body); line-height: var(--erp-leading-body); font-weight: var(--erp-weight-body); }
 :is(button,input,select,textarea) { font-family: var(--erp-font); }
 :is(h1,.page-header h1,.product-identity-copy h1,.po-detail-title-row h1,.rkb-record-summary .product-identity-copy h1) { font-size:var(--erp-type-title); line-height:var(--erp-leading-title); font-weight:var(--erp-weight-title); letter-spacing:var(--erp-tracking-title); }
 h2 { font-size:var(--erp-type-section); line-height:var(--erp-leading-section); font-weight:var(--erp-weight-section); letter-spacing:var(--erp-tracking-section); }
 :is(h3,h4,h5,h6) { font-size:var(--erp-type-subsection); line-height:var(--erp-leading-subsection); font-weight:var(--erp-weight-subsection); letter-spacing:var(--erp-tracking-subsection); }
 :is(strong,b) { font-weight:var(--erp-weight-emphasis); }
 small { font-size:var(--erp-type-meta); line-height:var(--erp-leading-meta); }
 :is(.form-control,.form-select,.rkb-search-select-input,.rkb-cell-input) { font-size:var(--erp-type-value); line-height:var(--erp-leading-value); font-weight:var(--erp-weight-value); letter-spacing:0; }
 :is(.form-label,.form-grid>label,.rkb-record-field) { line-height:var(--erp-leading-label); }
 :is(.table,.erp-table,.rkb-data-table) { --erp-table-value-size:var(--erp-type-table); --erp-table-leading:var(--erp-leading-table); font-family:var(--erp-font); font-size:var(--erp-table-value-size); line-height:var(--erp-table-leading); font-weight:var(--erp-weight-table); font-variant-numeric:tabular-nums; }
 :is(.rkb-item-table,.rkb-table-compact,.product-detail-table,.erp-table.compact) { --erp-table-value-size:var(--erp-type-table-compact); --erp-table-leading:var(--erp-leading-table-compact); }
 :is(.table,.erp-table,.rkb-data-table)>thead>tr>th { font-size:var(--erp-type-table-heading); font-weight:var(--erp-weight-table-heading); line-height:var(--erp-leading-table-heading); letter-spacing:var(--erp-tracking-table-heading); }
 :is(.table,.erp-table,.rkb-data-table)>tbody>tr>td { font-size:var(--erp-table-value-size); line-height:var(--erp-table-leading); }
 :is(.product-column-heading,.table-sort-button) { font:inherit; letter-spacing:inherit; }
 :is(.table,.erp-table,.rkb-data-table) :is(.form-control,.form-select,.quantity-cell-button,.po-inline-editable) { font-size:var(--erp-table-value-size); line-height:var(--erp-table-leading); }
 :is(.request-table .amount-cell,.po-total-cell strong,.quantity-cell-button) { font-weight:var(--erp-weight-table); }
 :is(.rkb-record-facts dd,.po-general-field strong,.po-detail-meta dd,.detail-list dd) { font-weight:var(--erp-weight-medium); }
 :is(.rkb-record-price,.rkb-record-facts .rkb-record-price,.rkb-workflow-summary-item strong,.product-cost-value) { font-size:var(--erp-type-summary); line-height:var(--erp-leading-summary); font-weight:var(--erp-weight-summary); letter-spacing:var(--erp-tracking-summary); font-variant-numeric:tabular-nums; }
 :is(.rkb-dashboard-counts strong,.metric-copy strong) { font-size:var(--erp-type-kpi); line-height:var(--erp-leading-kpi); font-weight:var(--erp-weight-kpi); letter-spacing:var(--erp-tracking-kpi); font-variant-numeric:tabular-nums; }
 :is(.rkb-finance-summary dd,.rkb-budget-values dd,.total-strip strong,.rkb-amount-total dd,.receiving-table-summary .grand dd,.po-invoice-totals strong,.rkb-data-table tfoot .po-total-cell) { font-size:var(--erp-type-total); line-height:var(--erp-leading-total); font-weight:var(--erp-weight-total); letter-spacing:var(--erp-tracking-total); font-variant-numeric:tabular-nums; }
 .rkb-data-table tfoot .po-total-cell strong { font-weight:var(--erp-weight-total); }
 :is(.rkb-line-summary,.rkb-amount-summary,.po-invoice-totals,.rkb-page-position,.product-result-range,input[type=number]) { font-variant-numeric:tabular-nums; }
 .rkb-breadcrumbs { font-size:var(--erp-type-caption); line-height:var(--erp-leading-caption); font-weight:var(--erp-weight-caption); }
 /* Compact topbar controls. Original popover/notification/auth owners are reused. */
 .rkb-topbar-actions { gap:10px; flex-shrink:0; }
 .rkb-topbar-actions :is(.rkb-page-help-button,.rkb-notification-bell) { display:grid; place-items:center; margin:0; width:34px; height:34px; flex:0 0 34px; min-height:34px; border:0; border-radius:9px; background:transparent; color:var(--erp-shell-text); }
 .rkb-topbar-actions :is(.rkb-page-help-button,.rkb-notification-bell):hover { background:var(--erp-shell-accent-soft); color:var(--erp-shell-accent); }
 .rkb-topbar-actions .rkb-profile-button { display:flex; align-items:center; gap:8px; width:auto; max-width:210px; margin:0; height:38px; flex:0 1 auto; min-height:38px; padding:3px 10px 3px 4px; border:1px solid var(--erp-shell-border); border-radius:24px; background:var(--erp-shell-surface); color:var(--erp-shell-text); }
 .rkb-topbar-actions .rkb-profile-button:hover,.rkb-topbar-actions .rkb-profile-button[aria-expanded=true] { background:var(--erp-shell-hover); }
 .rkb-profile-avatar { display:grid; place-items:center; width:29px; height:29px; flex:0 0 29px; border-radius:50%; background:var(--erp-shell-accent-soft); color:var(--erp-shell-accent); }
 .rkb-profile-avatar svg { width:19px; height:19px; }
 .rkb-profile-name { max-width:105px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--erp-type-caption); font-weight:var(--erp-weight-medium); }
 .rkb-profile-chevron { width:12px; height:12px; flex:0 0 12px; }
 .rkb-notification-count { background:var(--erp-shell-accent); color:white; border:2px solid var(--erp-shell-surface); font-size:9px; min-width:18px; }
 .rkb-topbar-actions :is(button,a):focus-visible { outline:2px solid var(--erp-shell-accent); outline-offset:2px; }
 @media(max-width:1100px) { .rkb-profile-name { display:none; } }
}

/* Universal geometry roles. Compact value typography does not imply a shorter
   header. Widths, sticky positioning and table preferences remain JS-owned. */
@media screen {
 .form-grid > label:not(.check-filter):not(.check-row) { align-content:start; }
 .form-grid > label > :is(input.form-control,select.form-select) { box-sizing:border-box; height:var(--erp-control-height); }
 :is(.product-search-main-row,.product-search-actions,.rkb-table-toolbar,.product-tab-toolbar,.rkb-detail-toolbar-actions,.product-detail-table-actions,.rkb-date-range-toolbar,.rkb-report-controls,.rkb-control-row-compact) { --rkb-control-size:var(--erp-control-height-sm); }
 :is(.product-search-main-row,.rkb-control-row-compact) .product-chip-input { min-height:var(--erp-control-height-sm); padding-block:1px; }
 .product-chip-input > input { box-sizing:border-box; height:var(--erp-control-height-inline); }
 :is(.product-search-main-row,.product-search-actions,.rkb-table-toolbar,.product-tab-toolbar,.rkb-detail-toolbar-actions,.product-detail-table-actions,.rkb-date-range-toolbar,.rkb-report-controls,.rkb-control-row-compact) :is(.btn,.form-control:not(textarea),.form-select,.rkb-column-chooser-button) { box-sizing:border-box; height:var(--rkb-control-size); min-height:var(--rkb-control-size); padding-block:3px; }
 .product-pager :is(.product-page-arrow,.product-page-number,.product-page-input,.rkb-column-chooser-button), .rkb-control-compact { box-sizing:border-box; height:var(--erp-control-height-sm); min-height:var(--erp-control-height-sm); }
 .rkb-control-standard { box-sizing:border-box; min-height:var(--erp-control-height); }
 .rkb-control-inline { box-sizing:border-box; min-height:var(--erp-control-height-inline); }
 .rkb-entry-lines :is(.form-control,.form-select), .rkb-item-table :is(.form-control,.form-select,.btn) { min-height:var(--erp-control-height-inline); }
 .rkb-transaction-entry .rkb-total-value { font-size:var(--erp-type-total); font-weight:var(--erp-weight-total); }
 :is(.table,.erp-table,.rkb-data-table,.product-detail-table,.product-master-sticky-clone-table,.rkb-detail-sticky-clone-table) { --rkb-header-size:var(--erp-table-header-height); }
 :is(.rkb-item-table,.po-estimate-table,[data-rkb-density="dense"]) { --rkb-header-size:var(--erp-table-header-height-dense); }
 :is(.table,.erp-table,.rkb-data-table,.product-detail-table,.product-master-sticky-clone-table,.rkb-detail-sticky-clone-table)>thead>tr>th { box-sizing:border-box; height:var(--rkb-header-size); padding-block:6px; vertical-align:middle; font-family:var(--erp-font); font-size:var(--erp-type-table-heading); font-weight:var(--erp-weight-table-heading); line-height:var(--erp-leading-table-heading); letter-spacing:var(--erp-tracking-table-heading); }
 :is(.product-column-heading,.table-sort-button) { align-items:center; min-height:var(--erp-leading-table-heading); }
 /* Shared appearance, independent owners: selection and persisted checklist
    callbacks are never inferred from a checked visual. */
 :is(.rkb-checkbox-label,.rkb-item-check,.rkb-checkbox-line,.check-filter,.coa-access-options,table) input[type="checkbox"] {
  appearance:none; box-sizing:border-box; width:var(--rkb-checkbox-size,var(--erp-checkbox-size)); height:var(--rkb-checkbox-size,var(--erp-checkbox-size)); min-width:var(--rkb-checkbox-size,var(--erp-checkbox-size)); min-height:var(--rkb-checkbox-size,var(--erp-checkbox-size)); flex-shrink:0; margin:0; vertical-align:middle;
  border:1.5px solid var(--erp-checkbox-border); border-radius:4px; background-color:var(--erp-surface,#fff); background-position:center; background-repeat:no-repeat; background-size:13px 13px; cursor:pointer;
 }
 :is(.rkb-checkbox-label,.rkb-item-check,.rkb-checkbox-line,.check-filter,.coa-access-options,table) input[type="checkbox"]:checked {
  background-color:var(--erp-checkbox-accent); border-color:var(--erp-checkbox-accent); background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 8 3 3 7-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 }
 :is(.rkb-checkbox-label,.rkb-item-check,table) input[type="checkbox"]:indeterminate { background-color:var(--erp-checkbox-accent); border-color:var(--erp-checkbox-accent); background-image:linear-gradient(white,white); background-size:9px 2px; }
 :is(.rkb-checkbox-label,.rkb-item-check,.rkb-checkbox-line,.check-filter,.coa-access-options,table) input[type="checkbox"]:hover:not(:disabled) { border-color:var(--erp-checkbox-accent); }
 :is(.rkb-checkbox-label,.rkb-item-check,.rkb-checkbox-line,.check-filter,.coa-access-options,table) input[type="checkbox"]:focus-visible { outline:2px solid var(--erp-checkbox-accent); outline-offset:2px; }
 :is(.rkb-checkbox-label,.rkb-item-check,.rkb-checkbox-line,.check-filter,.coa-access-options,table) input[type="checkbox"]:disabled { cursor:default; opacity:.5; }
}
@media (forced-colors:active) {
 :is(.rkb-checkbox-label,.rkb-item-check,.rkb-checkbox-line,.check-filter,.coa-access-options,table) input[type="checkbox"] { appearance:auto; background-image:none; }
}

/* Confirmation with item-level financial comparison retains owned scrolling. */
.rkb-confirm-dialog.rkb-confirm-with-table { width:min(860px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; }
.rkb-confirm-with-table .rkb-table-wrap { max-height:36vh; overflow:auto; }
