/**
 * ERP filter card — layout, controls, tags, buttons (RTL-safe utilities: ms-*, me-* in Blade).
 */

/* --- Card shell ---------------------------------------------------------- */
.erp-filter-card {
    --erp-filter-border: rgba(0, 0, 0, 0.12);
    --erp-filter-muted: var(--bs-secondary-color, #6c757d);
    border: 0.5px solid var(--erp-filter-border);
    border-radius: 12px;
    background: var(--bs-body-bg, #fff);
}

.erp-filter-card__inner {
    padding: 14px 16px;
}

.erp-filter-card__head {
    min-height: 1.25rem;
}

.erp-filter-gutter {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
}

/* --- Labels -------------------------------------------------------------- */
.erp-filter-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--erp-filter-muted);
    font-weight: 400;
}

/* --- Controls (34px) ------------------------------------------------------ */
.erp-ctrl {
    display: block;
    width: 100%;
    height: 34px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
    line-height: 1.25;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: 0.5px solid var(--erp-filter-border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.erp-ctrl:focus {
    border-color: #1a6fc4;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(26, 111, 196, 0.15);
}

select.erp-ctrl {
    cursor: pointer;
}

/* Select wrapper + custom chevron (RTL: arrow flips with dir on html) */
.erp-sel-wrap {
    position: relative;
    width: 100%;
}

.erp-sel-wrap select.erp-ctrl {
    appearance: none;
    -webkit-appearance: none;
    padding-inline-end: 28px;
}

.erp-sel-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    inset-inline-end: 10px;
    width: 0;
    height: 0;
    margin-top: -3px;
    border-inline-start: 4px solid transparent;
    border-inline-end: 4px solid transparent;
    border-top: 5px solid var(--erp-filter-muted);
    pointer-events: none;
}

.erp-sel-wrap--select2::after {
    display: none;
}

/* Select2 (Bootstrap 5 theme) inside filter card — match .erp-ctrl 34px, vertically centered text */
.erp-filter-card .select2-container {
    display: block !important;
    min-width: 0 !important;
}

.erp-filter-card .select2-container--bootstrap-5 .select2-selection {
    min-height: 34px !important;
    font-size: 13px;
}

.erp-filter-card .select2-container--bootstrap-5 .select2-selection--single {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    height: 34px !important;
    border-radius: 8px !important;
    border: 0.5px solid var(--erp-filter-border, rgba(0, 0, 0, 0.12)) !important;
}

.erp-filter-card .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 1.25 !important;
    height: auto !important;
    padding-block: 0 !important;
    padding-inline-start: 10px;
    padding-inline-end: 28px;
    display: flex !important;
    align-items: center !important;
    flex: 1 1 auto;
    min-width: 0;
}

/* Theme keeps arrow absolute; fixed line-height on arrow column caused optical misalignment */
.erp-filter-card .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    min-height: 34px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/*
 * Row 2: single horizontal band — [180px PO/field] [search flex:1] [Filter] [Reset]
 * nowrap keeps search on the same row as PO type + buttons (no full-width stack).
 */
.erp-filter-row2 {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
    min-width: 0;
}

.erp-filter-row2__po {
    flex: 0 0 180px;
    width: 180px;
    max-width: 180px;
    min-width: 0;
}

.erp-filter-row2__search {
    flex: 1 1 0;
    min-width: 0;
}

.erp-filter-row2__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 8px;
}

/*
 * Row 2 is a flex strip, not a Bootstrap .row. A child .col-12 would take width:100% and
 * shove Filter/Reset outside the card — normalize grid columns used by mistake.
 */
.erp-filter-row2 > .col-12 {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none;
}

/* Same 34px band: inputs and action buttons share one baseline */
.erp-filter-row2 .erp-ctrl,
.erp-filter-row2 .erp-btn-filter,
.erp-filter-row2 .erp-btn-reset {
    align-self: flex-end;
}

@media (max-width: 575.98px) {
    .erp-filter-row2 {
        overflow-x: auto;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .erp-filter-row2__po {
        flex: 0 0 160px;
        width: 160px;
        max-width: 160px;
    }
}

/* Legacy class kept for any external use */
.erp-filter-po-type {
    flex: 0 0 180px;
    width: 180px;
    max-width: 180px;
    min-width: 0;
}

.erp-filter-search-grow {
    flex: 1 1 0;
    min-width: 0;
}

/* --- Tag strip ----------------------------------------------------------- */
.erp-filter-tags-panel {
    border-top: 0.5px solid var(--erp-filter-border);
    margin-top: 10px;
    padding-top: 10px;
}

.erp-filter-tags-panel.is-hidden {
    display: none !important;
}

.erp-filter-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.erp-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 8px 4px 10px;
    font-size: 12px;
    line-height: 1.2;
    color: #0c447c;
    background: #e6f1fb;
    border: 0.5px solid #b5d4f4;
    border-radius: 999px;
}

.erp-active-tag__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #0c447c;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.erp-active-tag__remove:hover {
    background: rgba(12, 68, 124, 0.12);
}

.erp-active-tag__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Buttons ------------------------------------------------------------- */
.erp-btn-filter,
.erp-btn-reset,
.erp-btn-clear-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 8px;
    white-space: nowrap;
    cursor: pointer;
    border: 0.5px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.erp-btn-filter {
    color: #fff;
    background: #1a6fc4;
    border-color: #1a6fc4;
}

.erp-btn-filter:hover {
    background: #155a9e;
    border-color: #155a9e;
    color: #fff;
}

.erp-btn-filter svg,
.erp-btn-reset svg {
    flex-shrink: 0;
}

.erp-btn-reset {
    color: var(--bs-secondary, #6c757d);
    background: transparent;
    border-color: var(--erp-filter-border);
}

.erp-btn-reset:hover {
    background: var(--bs-light, #f8f9fa);
    color: var(--bs-body-color);
}

.erp-btn-clear-all {
    color: var(--bs-secondary, #6c757d);
    background: transparent;
    border-color: var(--erp-filter-border);
}

.erp-btn-clear-all:hover {
    background: var(--bs-light, #f8f9fa);
    color: var(--bs-body-color);
}

/* Clear all (link style) */
.erp-filter-clear-all {
    font-size: 12px;
    color: #1a6fc4 !important;
}

.erp-filter-clear-all:hover {
    text-decoration: underline !important;
    color: #155a9e !important;
}

/* --- Summary cards row (RTL-safe grid) ----------------------------------- */
.erp-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .erp-summary-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .erp-summary-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.erp-summary-row__cell {
    min-width: 0;
}

.erp-summary-card {
    height: 100%;
    padding-block: 12px;
    padding-inline: 16px;
    background: #fff;
    border: 0.5px solid var(--erp-filter-border, rgba(0, 0, 0, 0.12));
    border-radius: 8px;
    box-shadow: none;
}

/* Subtle left-edge accents (RTL-safe); enterprise-style scan hierarchy */
.erp-summary-card--accent-info {
    border-inline-start: 3px solid rgba(13, 110, 253, 0.42);
    background-color: rgba(13, 110, 253, 0.045);
}

.erp-summary-card--accent-primary {
    border-inline-start: 3px solid rgba(13, 110, 253, 0.78);
    background-color: rgba(13, 110, 253, 0.07);
}

.erp-summary-card--accent-metric {
    border-inline-start: 3px solid rgba(33, 37, 41, 0.28);
    background-color: rgba(33, 37, 41, 0.04);
}

.erp-summary-card--accent-warning {
    border-inline-start: 3px solid rgba(186, 117, 23, 0.65);
    background-color: rgba(186, 117, 23, 0.06);
}

.erp-summary-card--accent-success {
    border-inline-start: 3px solid rgba(59, 109, 17, 0.6);
    background-color: rgba(59, 109, 17, 0.06);
}

.erp-summary-card--accent-danger {
    border-inline-start: 3px solid rgba(220, 53, 69, 0.65);
    background-color: rgba(220, 53, 69, 0.06);
}

.erp-summary-card--accent-danger .erp-summary-value.is-danger {
    font-weight: 600;
}

.erp-summary-label {
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 4px;
}

.erp-summary-value {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
    margin-bottom: 4px;
    word-break: break-word;
}

.erp-summary-value.is-neutral {
    color: var(--bs-body-color, #212529);
}

.erp-summary-value.is-info {
    color: #1a6fc4;
}

.erp-summary-value.is-primary {
    color: var(--bs-primary, #0d6efd);
}

.erp-summary-card--accent-primary .erp-summary-value.is-primary {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.erp-summary-card--accent-info .erp-summary-value.is-info {
    font-weight: 500;
}

.erp-summary-card--accent-warning .erp-summary-value.is-warning {
    font-weight: 600;
}

.erp-summary-card--accent-success .erp-summary-value.is-success {
    font-weight: 600;
}

.erp-summary-value.is-warning {
    color: #ba7517;
}

.erp-summary-value.is-danger {
    color: var(--bs-danger, #dc3545);
}

.erp-summary-value.is-success {
    color: #3b6d11;
}

.erp-summary-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 11px;
    line-height: 1.2;
    color: var(--bs-secondary-color, #6c757d);
}

.erp-summary-sub__text {
    min-width: 0;
}

.erp-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* --- Table toolbar (above responsive table, inside card) ------------------ */
.erp-table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-block-end: 12px;
    margin-block-end: 12px;
    border-block-end: 0.5px solid var(--erp-filter-border, rgba(0, 0, 0, 0.12));
}

.erp-table-toolbar--actions-only {
    justify-content: flex-end;
}

.erp-table-toolbar__start {
    flex: 1 1 auto;
    min-width: 0;
}

.erp-table-toolbar__end {
    flex: 0 0 auto;
}

.erp-table-toolbar__title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bs-body-color, #212529);
}

.erp-table-toolbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    height: 34px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1;
    border-radius: 8px;
    white-space: nowrap;
}

.erp-table-toolbar__btn i {
    font-size: 1rem;
    line-height: 1;
}

/* LPO list: Fiori-style view switcher (segmented control in table toolbar) */
.erp-lpo-view-switch .btn {
    min-width: 2.25rem;
    padding-inline: 0.5rem;
}

/* LPO list — card view (SAP-style tile) */
.erp-lpo-card-tile {
    border-color: rgba(0, 0, 0, 0.08) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.erp-lpo-card-tile:hover {
    box-shadow: 0 0.4rem 1.15rem rgba(0, 0, 0, 0.1) !important;
    border-color: rgba(13, 110, 253, 0.18) !important;
    cursor: pointer;
}

.erp-lpo-card-tile__body {
    padding: 1.35rem 1.4rem 1.25rem;
}

.erp-lpo-card-tile__footer {
    padding: 0.65rem 1.15rem;
    background: var(--bs-body-bg, #fff);
}

.erp-lpo-card-tile__elevated {
    z-index: 2;
}

.erp-lpo-card-tile__ref {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--bs-body-color, #212529);
}

.erp-lpo-card-tile__status-badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.erp-lpo-card-tile__date {
    font-size: 0.8125rem;
    font-weight: 400;
    opacity: 0.88;
}

.erp-lpo-card-tile__amount-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--bs-body-color, #212529);
}

.erp-lpo-card-tile__amount-ccy {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.2rem;
}

.erp-lpo-card-tile__meta {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.erp-lpo-card-tile__meta-line {
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--bs-secondary-color, #6c757d);
}

.erp-lpo-card-tile__meta-k {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-bottom: 0.1rem;
}

.erp-lpo-card-tile__meta-v {
    font-weight: 400;
    color: var(--bs-body-color, #212529);
    opacity: 0.82;
}

.erp-lpo-card-tile__type-badge {
    font-size: 0.7rem;
    font-weight: 600;
}

.erp-lpo-card-tile__attachments {
    margin-bottom: 0.15rem;
}

/* LPO list: monthly trend vertical column chart */
.erp-lpo-monthly-vchart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.erp-lpo-monthly-vchart__plot {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.35rem 0.65rem;
    min-height: 200px;
    padding-top: 0.25rem;
}

.erp-lpo-monthly-vchart__col {
    flex: 0 0 auto;
    width: 3rem;
    min-width: 2.5rem;
    max-width: 4.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .erp-lpo-monthly-vchart__col {
        width: 3.5rem;
        min-width: 3rem;
        max-width: 5rem;
    }
}

.erp-lpo-monthly-vchart__value {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.15;
    min-height: 2.5em;
    color: var(--bs-body-color, #212529);
}

.erp-lpo-monthly-vchart__bar-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    height: 132px;
    width: 100%;
    max-width: 2.25rem;
    margin-inline: auto;
}

@media (min-width: 768px) {
    .erp-lpo-monthly-vchart__bar-wrap {
        height: 160px;
        max-width: 2.5rem;
    }
}

.erp-lpo-monthly-vchart__bar {
    width: 100%;
    height: 100%;
    border-radius: 0.35rem 0.35rem 0.15rem 0.15rem;
    min-height: 0;
    transform-origin: bottom center;
}

/* Static bars when animation class not yet applied (e.g. hidden chart) */
.erp-lpo-monthly-vchart__plot:not(.erp-lpo-monthly-vchart__plot--animated) .erp-lpo-monthly-vchart__bar {
    transform: scaleY(var(--bar-scale, 0));
}

@keyframes erp-lpo-monthly-bar-in {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(var(--bar-scale, 0));
    }
}

.erp-lpo-monthly-vchart__plot--animated .erp-lpo-monthly-vchart__bar {
    animation: erp-lpo-monthly-bar-in 0.82s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--bar-i, 0) * 70ms);
}

.erp-lpo-monthly-vchart__label {
    font-size: 0.65rem;
    line-height: 1.15;
    margin-top: 0.35rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* LPO filters: min/max fill the amount column (50% each) */
.erp-lpo-amount-minmax-row {
    min-width: 0;
}

.erp-lpo-amount-minmax-row .col-6 {
    min-width: 0;
}

/* LPO list: Chart.js horizontal bar — top suppliers */
.erp-lpo-supplier-chart-panel {
    width: 100%;
}

.erp-lpo-supplier-chart-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    min-height: 200px;
    max-height: 280px;
}

.erp-lpo-supplier-chart-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Title + actions on one line with a small gap (avoid space-between “flying” refresh) */
.erp-table-toolbar--cluster {
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.erp-table-toolbar--cluster .erp-table-toolbar__start {
    flex: 0 1 auto;
}

.erp-table-toolbar--cluster .erp-table-toolbar__end {
    flex: 0 0 auto;
}

/* --- Sortable table headers -------------------------------------------- */
.erp-th-sortable {
    white-space: nowrap;
    vertical-align: middle;
}

.erp-th-sortable__link {
    max-width: 100%;
}

.erp-th-sortable__link:hover .erp-th-sortable__caret--muted {
    opacity: 0.65;
}

.erp-th-sortable__caret {
    flex-shrink: 0;
    font-size: 0.7rem;
    line-height: 1;
    opacity: 0.9;
}

.erp-th-sortable__caret--muted {
    opacity: 0.35;
}

/* --- Table pagination (summary + per-page + Bootstrap links) ---------------- */
.erp-table-pagination {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--erp-filter-border, rgba(0, 0, 0, 0.12));
}

@media (min-width: 768px) {
    .erp-table-pagination {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.erp-table-pagination__meta {
    flex: 1 1 auto;
    min-width: 0;
}

.erp-table-pagination__controls {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.erp-table-pagination__per-page {
    width: auto;
    min-width: 4.25rem;
}

.erp-table-pagination__links .pagination {
    margin-bottom: 0;
}

/* --- Row actions (compact icon toolbar, RTL-safe gap) -------------------- */
.erp-row-actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.erp-row-actions__form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.erp-action-btn {
    --erp-action-size: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--erp-action-size);
    min-width: var(--erp-action-size);
    height: var(--erp-action-size);
    min-height: var(--erp-action-size);
    padding: 0;
    line-height: 1;
    border-radius: 8px;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, border-color 0.12s ease,
        background-color 0.12s ease, color 0.12s ease;
}

.erp-action-btn i {
    font-size: 1rem;
    line-height: 1;
}

.erp-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.erp-action-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px rgba(26, 111, 196, 0.25);
}

.erp-row-actions__form .erp-action-btn:disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* SAP / Fiori-style: ⋮ always visible; view/edit/delete strip expands on row hover */
.erp-row-actions--sap {
    vertical-align: middle;
    gap: 0.15rem;
}

.erp-row-actions__sap-strip {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    max-width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition:
        max-width 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.18s ease;
    pointer-events: none;
}

.erp-po-list-table tbody tr:hover .erp-row-actions--sap .erp-row-actions__sap-strip,
.erp-po-list-table tbody tr:focus-within .erp-row-actions--sap .erp-row-actions__sap-strip,
.erp-pc-list-table tbody tr:hover .erp-row-actions--sap .erp-row-actions__sap-strip,
.erp-pc-list-table tbody tr:focus-within .erp-row-actions--sap .erp-row-actions__sap-strip,
.erp-lpo-card-tile:hover .erp-row-actions--sap .erp-row-actions__sap-strip {
    max-width: 12rem;
    opacity: 1;
    pointer-events: auto;
}

/* Coarse pointer / no hover: icons stay reachable without row hover */
@media (hover: none), (pointer: coarse) {
    .erp-po-list-table tbody tr .erp-row-actions--sap .erp-row-actions__sap-strip,
    .erp-pc-list-table tbody tr .erp-row-actions--sap .erp-row-actions__sap-strip,
    .erp-lpo-card-tile .erp-row-actions--sap .erp-row-actions__sap-strip {
        max-width: 12rem;
        opacity: 1;
        pointer-events: auto;
    }
}

.erp-row-actions__sap-hit {
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border-radius: 0.35rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    text-decoration: none;
    line-height: 1;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.erp-row-actions__sap-hit:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--bs-body-color, #212529);
}

.erp-row-actions__sap-hit:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.28);
}

.erp-row-actions__sap-hit--danger:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.22);
    color: var(--bs-danger, #dc3545);
}

.erp-row-actions__sap-hit i {
    font-size: 1rem;
    line-height: 1;
}

.erp-row-actions__sap-overflow {
    flex-shrink: 0;
}

.erp-row-actions__toggle--sap {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    margin: 0;
    border-radius: 0.35rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
    line-height: 1;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.erp-row-actions__toggle--sap:hover {
    background: rgba(0, 0, 0, 0.045);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--bs-body-color, #212529);
}

.erp-row-actions__toggle--sap:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.28);
}

.dropdown.show > .erp-row-actions__toggle--sap {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.28);
    color: var(--bs-primary, #0d6efd);
}

.erp-row-actions__toggle--sap i {
    font-size: 1.15rem;
    line-height: 1;
}

.erp-row-actions__menu--sap {
    min-width: 12rem;
    --bs-dropdown-padding-y: 0.35rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.1) !important;
}

.erp-row-actions__sap-item {
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.3;
    padding: 0.45rem 0.65rem;
    margin: 0 0.2rem;
    border-radius: 0.3rem;
    color: var(--bs-body-color, #212529);
}

.erp-row-actions__sap-item:hover,
.erp-row-actions__sap-item:focus {
    background: rgba(13, 110, 253, 0.07);
}

.erp-row-actions__sap-icon {
    opacity: 0.75;
    font-size: 1rem;
}

.erp-row-actions__sap-item--danger {
    color: var(--bs-danger, #dc3545);
}

.erp-row-actions__sap-item--danger:hover,
.erp-row-actions__sap-item--danger:focus {
    background: rgba(220, 53, 69, 0.08);
    color: var(--bs-danger, #dc3545);
}

/* Hide number input spinner arrows (WebKit / Chromium) */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* --- Navbar mega menu (wide grouped dropdowns) --------------------------- */
.erp-nav-mega {
    --erp-nav-mega-max-w: min(52rem, calc(100vw - 1.5rem));
    width: var(--erp-nav-mega-max-w);
    max-width: var(--erp-nav-mega-max-w);
    min-width: min(18rem, calc(100vw - 1.25rem));
    max-height: min(70vh, 34rem);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Beat .navbar .dropdown-menu rules — mega width must stay capped (same as Settings) */
.navbar .dropdown-menu.erp-nav-mega {
    width: min(52rem, calc(100vw - 1.5rem));
    max-width: min(52rem, calc(100vw - 1.5rem));
    box-sizing: border-box;
}

/* HR grid: 6 tiles in col-lg-4 (two rows × 3); extra height for two rows */
.erp-nav-mega.erp-nav-mega--hr-grid {
    max-height: min(78vh, 44rem);
}

@media (min-width: 992px) {
    .erp-nav-mega--hr-grid .erp-nav-mega__body > .row > .col-lg-4 {
        min-width: 0;
    }

    .erp-nav-mega--hr-grid .erp-nav-mega__column-inner {
        padding: 0.45rem 0.35rem;
    }
}

/* Equal-height columns inside mega menu (Payroll / Projects / etc.) */
.erp-nav-mega__body > .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
    align-items: stretch;
}

@media (min-width: 992px) {
    .erp-nav-mega__body > .row > [class*='col-lg-3'],
    .erp-nav-mega__body > .row > [class*='col-lg-4'],
    .erp-nav-mega__body > .row > [class*='col-lg-6'] {
        display: flex;
        flex-direction: column;
    }

    .erp-nav-mega__column-inner {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding: 0.5rem 0.25rem;
        border-radius: 10px;
        background: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.03));
    }
}

.erp-nav-mega__eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color);
}

.erp-nav-mega__title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
    margin-bottom: 0.35rem;
    padding-inline: 0.5rem;
}

.erp-nav-mega__item {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
    white-space: normal;
}

.erp-nav-mega__item i {
    vertical-align: -0.125em;
}

@media (min-width: 992px) {
    .erp-nav-mega__col-divider {
        border-inline-start: 1px solid var(--bs-border-color);
        padding-inline-start: 1rem !important;
    }
}

/* Purchase Orders list — fixed column widths + comfortable vs compact density */
.erp-po-list-table {
    table-layout: fixed;
    width: 100%;
    font-size: 0.875rem;
}

.erp-po-col--idx {
    width: 3%;
}

.erp-po-col--ref {
    width: 12%;
}

.erp-po-col--date {
    width: 9%;
}

.erp-po-col--supplier {
    width: 16%;
}

.erp-po-col--warehouse {
    width: 11%;
}

.erp-po-col--project {
    width: 11%;
}

.erp-po-col--status {
    width: 13%;
}

.erp-po-col--amount {
    width: 10%;
}

.erp-po-col--attach {
    width: 5%;
}

.erp-po-col--actions {
    width: 11%;
}

.erp-po-list-table td.erp-po-cell-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.erp-po-list-table td.erp-po-cell--status {
    white-space: normal;
    vertical-align: middle;
}

.erp-po-list-table td.erp-po-cell--amount {
    font-variant-numeric: tabular-nums;
}

.erp-po-list-table td.erp-po-cell--actions {
    overflow: visible;
    vertical-align: middle;
}

/* Purchase invoices (purchases/invoices) — 12 columns; shares density with .erp-po-list-table */
.erp-pinv-col--idx {
    width: 2%;
}

.erp-pinv-col--ref {
    width: 11%;
}

.erp-pinv-col--date {
    width: 9%;
}

.erp-pinv-col--supplier {
    width: 10%;
}

.erp-pinv-col--grn {
    width: 8%;
}

.erp-pinv-col--type {
    width: 5%;
}

.erp-pinv-col--total {
    width: 8%;
}

.erp-pinv-col--paid {
    width: 7%;
}

.erp-pinv-col--out {
    width: 8%;
}

.erp-pinv-col--status {
    width: 8%;
}

.erp-pinv-col--attach {
    width: 3%;
}

.erp-pinv-col--actions {
    width: 11%;
}

/* GRN list (inventory/grn) — fixed widths tuned for 8 columns */
.erp-grn-col--idx {
    width: 4%;
}

.erp-grn-col--ref {
    width: 14%;
}

.erp-grn-col--date {
    width: 10%;
}

.erp-grn-col--supplier {
    width: 17%;
}

.erp-grn-col--warehouse {
    width: 13%;
}

.erp-grn-col--status {
    width: 9%;
}

.erp-grn-col--invoiced {
    width: 8%;
}

.erp-grn-col--amount {
    width: 9%;
}

.erp-grn-col--attach {
    width: 4%;
}

.erp-grn-col--actions {
    width: 17%;
}

/* Material issues list (inventory/issues) — 8 columns */
.erp-issues-col--idx {
    width: 4%;
}

.erp-issues-col--issue {
    width: 12%;
}

.erp-issues-col--date {
    width: 9%;
}

.erp-issues-col--project {
    width: 21%;
}

.erp-issues-col--activity {
    width: 21%;
}

.erp-issues-col--status {
    width: 10%;
}

.erp-issues-col--attach {
    width: 4%;
}

.erp-issues-col--actions {
    width: 19%;
}

/* Projects list (projects/) — 9 columns */
.erp-projects-col--idx {
    width: 3%;
}

.erp-projects-col--code {
    width: 8%;
}

.erp-projects-col--name {
    width: 18%;
}

.erp-projects-col--customer {
    width: 14%;
}

.erp-projects-col--contract {
    width: 9%;
}

.erp-projects-col--dates {
    width: 16%;
}

.erp-projects-col--activities {
    width: 6%;
}

.erp-projects-col--status {
    width: 9%;
}

.erp-projects-col--actions {
    width: 17%;
}

/* Inventory items list (inventory/items) — 13 columns */
.erp-items-col--idx {
    width: 3%;
}

.erp-items-col--image {
    width: 4.5%;
}

.erp-items-col--code {
    width: 7%;
}

.erp-items-col--name {
    width: 14%;
}

.erp-items-col--sku {
    width: 7%;
}

.erp-items-col--barcode {
    width: 9%;
}

.erp-items-col--type {
    width: 7%;
}

.erp-items-col--unit {
    width: 6%;
}

.erp-items-col--category {
    width: 10%;
}

.erp-items-col--cost {
    width: 7.5%;
}

.erp-items-col--sale {
    width: 7.5%;
}

.erp-items-col--active {
    width: 5%;
}

.erp-items-col--actions {
    width: 12.5%;
}

/* Default row density = comfortable */
.erp-po-list-table thead th,
.erp-po-list-table tbody td {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

/* Column visibility (data-erp-col + .erp-col-hidden)
   Use display:none on <col> too — mixing visibility:collapse on col with display:none on cells
   breaks column grid in Chromium and can inflate <thead> row height. */
.erp-po-list-table col[data-erp-col].erp-col-hidden {
    display: none !important;
}

.erp-po-list-table th[data-erp-col].erp-col-hidden,
.erp-po-list-table td[data-erp-col].erp-col-hidden {
    display: none !important;
}

.erp-po-list-table thead th {
    line-height: 1.25;
}

.erp-po-list-table thead .erp-th-sortable__link {
    vertical-align: middle;
}

.erp-colvis-menu__label {
    cursor: pointer;
}

.erp-po-list-table .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.55em;
}

.erp-po-list-table .erp-action-btn {
    --erp-action-size: 32px;
}

.erp-po-list-table--compact,
html.erp-preload-po-table-compact #erp-lpo-table-fragment .erp-po-list-table,
html.erp-preload-invoice-table-compact #erp-invoice-table-fragment .erp-po-list-table,
html.erp-preload-item-categories-table-compact #erp-item-categories-table-fragment .erp-po-list-table,
html.erp-preload-items-table-compact #erp-items-table-fragment .erp-po-list-table,
html.erp-preload-projects-table-compact #erp-projects-table-fragment .erp-po-list-table,
html.erp-preload-issues-table-compact #erp-issues-table-fragment .erp-po-list-table,
html.erp-preload-grn-table-compact #erp-grn-table-fragment .erp-po-list-table,
.erp-pc-list-table--compact,
html.erp-preload-pc-table-compact #erp-pc-table-fragment .erp-pc-list-table {
    font-size: 0.8125rem;
}

.erp-po-list-table--compact thead th,
.erp-po-list-table--compact tbody td,
html.erp-preload-po-table-compact #erp-lpo-table-fragment .erp-po-list-table thead th,
html.erp-preload-po-table-compact #erp-lpo-table-fragment .erp-po-list-table tbody td,
html.erp-preload-invoice-table-compact #erp-invoice-table-fragment .erp-po-list-table thead th,
html.erp-preload-invoice-table-compact #erp-invoice-table-fragment .erp-po-list-table tbody td,
html.erp-preload-item-categories-table-compact #erp-item-categories-table-fragment .erp-po-list-table thead th,
html.erp-preload-item-categories-table-compact #erp-item-categories-table-fragment .erp-po-list-table tbody td,
html.erp-preload-items-table-compact #erp-items-table-fragment .erp-po-list-table thead th,
html.erp-preload-items-table-compact #erp-items-table-fragment .erp-po-list-table tbody td,
html.erp-preload-projects-table-compact #erp-projects-table-fragment .erp-po-list-table thead th,
html.erp-preload-projects-table-compact #erp-projects-table-fragment .erp-po-list-table tbody td,
html.erp-preload-issues-table-compact #erp-issues-table-fragment .erp-po-list-table thead th,
html.erp-preload-issues-table-compact #erp-issues-table-fragment .erp-po-list-table tbody td,
html.erp-preload-grn-table-compact #erp-grn-table-fragment .erp-po-list-table thead th,
html.erp-preload-grn-table-compact #erp-grn-table-fragment .erp-po-list-table tbody td,
.erp-pc-list-table--compact thead th,
.erp-pc-list-table--compact tbody td,
html.erp-preload-pc-table-compact #erp-pc-table-fragment .erp-pc-list-table thead th,
html.erp-preload-pc-table-compact #erp-pc-table-fragment .erp-pc-list-table tbody td {
    padding: 0.3rem 0.45rem;
    vertical-align: middle;
}

.erp-po-list-table--compact .badge,
html.erp-preload-po-table-compact #erp-lpo-table-fragment .erp-po-list-table .badge,
html.erp-preload-invoice-table-compact #erp-invoice-table-fragment .erp-po-list-table .badge,
html.erp-preload-item-categories-table-compact #erp-item-categories-table-fragment .erp-po-list-table .badge,
html.erp-preload-items-table-compact #erp-items-table-fragment .erp-po-list-table .badge,
html.erp-preload-projects-table-compact #erp-projects-table-fragment .erp-po-list-table .badge,
html.erp-preload-issues-table-compact #erp-issues-table-fragment .erp-po-list-table .badge,
html.erp-preload-grn-table-compact #erp-grn-table-fragment .erp-po-list-table .badge,
.erp-pc-list-table--compact .badge,
html.erp-preload-pc-table-compact #erp-pc-table-fragment .erp-pc-list-table .badge {
    font-size: 0.6875rem;
    padding: 0.2em 0.45em;
    line-height: 1.2;
}

.erp-po-list-table--compact .erp-action-btn,
html.erp-preload-po-table-compact #erp-lpo-table-fragment .erp-po-list-table .erp-action-btn,
html.erp-preload-invoice-table-compact #erp-invoice-table-fragment .erp-po-list-table .erp-action-btn,
html.erp-preload-item-categories-table-compact #erp-item-categories-table-fragment .erp-po-list-table .erp-action-btn,
html.erp-preload-items-table-compact #erp-items-table-fragment .erp-po-list-table .erp-action-btn,
html.erp-preload-projects-table-compact #erp-projects-table-fragment .erp-po-list-table .erp-action-btn,
html.erp-preload-issues-table-compact #erp-issues-table-fragment .erp-po-list-table .erp-action-btn,
html.erp-preload-grn-table-compact #erp-grn-table-fragment .erp-po-list-table .erp-action-btn,
.erp-pc-list-table--compact .erp-action-btn,
html.erp-preload-pc-table-compact #erp-pc-table-fragment .erp-pc-list-table .erp-action-btn {
    --erp-action-size: 28px;
}

.erp-po-list-table--compact .erp-purch-index-att-indicator .badge,
html.erp-preload-po-table-compact #erp-lpo-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
html.erp-preload-invoice-table-compact #erp-invoice-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
html.erp-preload-item-categories-table-compact #erp-item-categories-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
html.erp-preload-items-table-compact #erp-items-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
html.erp-preload-projects-table-compact #erp-projects-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
html.erp-preload-issues-table-compact #erp-issues-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
html.erp-preload-grn-table-compact #erp-grn-table-fragment .erp-po-list-table .erp-purch-index-att-indicator .badge,
.erp-pc-list-table--compact .erp-purch-index-att-indicator .badge,
html.erp-preload-pc-table-compact #erp-pc-table-fragment .erp-pc-list-table .erp-purch-index-att-indicator .badge {
    font-size: 0.65rem !important;
}

.erp-po-density-check {
    width: 1rem;
    flex-shrink: 0;
}

/* Progress certificates — enterprise grid: horizontal scroll, sticky first two columns, expandable detail rows */
.erp-pc-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.erp-pc-list-table {
    table-layout: auto;
    width: 100%;
    min-width: 52rem;
    font-size: 0.875rem;
    --erp-pc-proj-left: 8.75rem;
    border-collapse: separate;
    border-spacing: 0;
}

.erp-pc-list-table thead th,
.erp-pc-list-table tbody td {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
    position: relative;
    z-index: 1;
}

.erp-pc-list-table thead th {
    white-space: nowrap;
    line-height: 1.25;
    vertical-align: bottom;
}

.erp-pc-list-table thead th.erp-pc-clip-header .erp-th-sortable__link {
    max-width: 12rem;
    min-width: 0;
}

.erp-pc-list-table thead th.erp-pc-clip-header .erp-th-sortable__link > span:first-of-type {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.erp-pc-list-table th.erp-pc-num-col,
.erp-pc-list-table td.erp-pc-num {
    width: 7.75rem;
    min-width: 7.75rem;
    max-width: 9rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.erp-pc-list-table thead th.erp-pc-th--grand-start,
.erp-pc-list-table tbody td.erp-pc-cell--grand-start,
.erp-pc-list-table tfoot td:nth-child(12) {
    width: 9.5rem;
    min-width: 9.5rem;
    max-width: 10.5rem;
}

.erp-pc-list-table .erp-pc-col-cert {
    min-width: 7.5rem;
    max-width: 11rem;
}

.erp-pc-list-table .erp-pc-col-actions {
    width: 9.5rem;
    min-width: 9.5rem;
    max-width: 9.5rem;
    white-space: nowrap;
}

.erp-pc-list-table .erp-pc-col-expand {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.erp-pc-stick-cert,
.erp-pc-stick-proj {
    position: sticky;
    z-index: 20 !important;
    background-color: var(--bs-body-bg) !important;
    overflow: hidden;
    background-clip: padding-box;
}

.erp-pc-list-table thead .erp-pc-stick-cert,
.erp-pc-list-table thead .erp-pc-stick-proj {
    z-index: 30 !important;
    background-color: var(--bs-table-bg, var(--bs-body-bg)) !important;
}

.erp-pc-stick-cert {
    left: 0;
    width: 8.75rem;
    min-width: 8.75rem;
    max-width: 8.75rem;
    box-shadow: 4px 0 10px -6px rgba(0, 0, 0, 0.2);
}

.erp-pc-stick-proj {
    left: var(--erp-pc-proj-left);
    width: 14rem;
    min-width: 14rem;
    max-width: 14rem;
    box-shadow: 4px 0 10px -6px rgba(0, 0, 0, 0.18);
}

/* Fallback: keep first 2 key columns sticky even if class hooks are lost */
.erp-pc-list-table thead th:nth-child(3),
.erp-pc-list-table tbody tr.erp-pc-main-row td:nth-child(3) {
    position: sticky;
    left: 0;
    z-index: 20;
    background-color: var(--bs-body-bg);
}

.erp-pc-list-table thead th:nth-child(4),
.erp-pc-list-table tbody tr.erp-pc-main-row td:nth-child(4) {
    position: sticky;
    left: var(--erp-pc-proj-left);
    z-index: 20;
    background-color: var(--bs-body-bg);
}

.erp-pc-list-table thead th:nth-child(3),
.erp-pc-list-table thead th:nth-child(4) {
    z-index: 30;
    background-color: var(--bs-table-bg, var(--bs-body-bg));
}

.erp-pc-stick-cert::after,
.erp-pc-stick-proj::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: var(--bs-border-color-translucent);
}

.erp-pc-list-table tbody tr.erp-pc-main-row:hover .erp-pc-stick-cert,
.erp-pc-list-table tbody tr.erp-pc-main-row:hover .erp-pc-stick-proj {
    background-color: var(--bs-table-hover-bg, var(--bs-secondary-bg)) !important;
}

.erp-pc-list-table tbody tr.erp-pc-main-row > td:not(.erp-pc-stick-cert):not(.erp-pc-stick-proj) {
    z-index: 1 !important;
}

.erp-pc-expand-icon {
    display: inline-block;
    transition: transform 0.15s ease;
}

.erp-pc-expand-btn[aria-expanded='true'] .erp-pc-expand-icon {
    transform: rotate(90deg);
}

.erp-pc-detail-panel {
    border-top: 1px dashed var(--bs-border-color-translucent);
}

.erp-pc-detail-title {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #3f5d96;
    margin-bottom: 0.65rem;
}

.erp-pc-break-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(8rem, 1fr));
    gap: 0.6rem 0.85rem;
    align-items: start;
}

.erp-pc-break-item {
    min-width: 0;
}

.erp-pc-break-label {
    font-size: 12px;
    color: #555;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.erp-pc-break-value {
    font-family: var(--bs-font-monospace);
    font-size: 0.96rem;
    color: var(--bs-body-color);
    white-space: nowrap;
}

.erp-pc-break-total {
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(108, 134, 172, 0.2);
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.erp-pc-break-total__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #4e5f7f;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.erp-pc-break-total__value {
    font-family: var(--bs-font-monospace);
    font-size: 1.05rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .erp-pc-break-grid {
        grid-template-columns: repeat(3, minmax(8rem, 1fr));
    }
}

@media (max-width: 575.98px) {
    .erp-pc-break-grid {
        grid-template-columns: repeat(2, minmax(7rem, 1fr));
    }
}

/* Deduction / totals: column group separators */
.erp-pc-list-table thead th.erp-pc-th--deductions-start,
.erp-pc-list-table thead th.erp-pc-th--amounts-start,
.erp-pc-list-table thead th.erp-pc-th--grand-start,
.erp-pc-list-table tbody td.erp-pc-cell--deduction-start,
.erp-pc-list-table tbody td.erp-pc-cell--amounts-start,
.erp-pc-list-table tbody td.erp-pc-cell--grand-start {
    box-shadow: inset 1px 0 0 0 var(--bs-border-color-translucent);
}

.erp-pc-list-table td.erp-pc-cell-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.erp-pc-list-table td.erp-pc-cell--project {
    white-space: normal;
    word-break: break-word;
    vertical-align: middle;
    min-width: 9rem;
    max-width: 14rem;
}

.erp-pc-list-table thead th:nth-child(5),
.erp-pc-list-table tbody tr.erp-pc-main-row td:nth-child(5) {
    width: 12rem;
    min-width: 12rem;
    max-width: 12rem;
}

.erp-pc-list-table td.erp-pc-cell--project.erp-pc-stick-proj {
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-pc-list-table td.erp-pc-cell--amount {
    font-variant-numeric: tabular-nums;
}

.erp-pc-list-table td.erp-pc-cell--status {
    white-space: nowrap;
    vertical-align: middle;
}

.erp-pc-list-table td.erp-pc-cell--actions {
    overflow: visible;
    vertical-align: middle;
}

.erp-pc-list-table.table-hover > tbody > tr.erp-pc-main-row > * {
    transition: color 0.12s ease;
}

.erp-pc-list-table.table-hover > tbody > tr.erp-pc-main-row:hover > td.erp-pc-col-expand {
    box-shadow: inset 3px 0 0 0 var(--bs-primary);
}

.erp-pc-list-table tfoot .erp-pc-total-row > td {
    background: #f8fbff;
    border-top: 2px solid rgba(70, 108, 170, 0.45);
    font-weight: 700;
    position: sticky;
    bottom: 0;
    z-index: 15;
}

.erp-pc-list-table tfoot .erp-pc-total-row .font-monospace {
    font-size: 0.95rem;
}

/* Micro polish */
.erp-pc-detail-title {
    letter-spacing: 0.04em;
}

.erp-pc-detail-row > td {
    border-top: 1px solid rgba(108, 134, 172, 0.32) !important;
}

.erp-pc-list-table .erp-row-actions__toggle--sap {
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.erp-pc-list-table .erp-row-actions__toggle--sap:hover {
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.24);
    color: #2f66c7;
}
