
    .wcv3-page {
        min-height: 100%;
        padding: clamp(14px, 1.6vw, 24px);
        background: var(--corex-bg);
        color: var(--corex-text);
    }

    .wcv3-page *,
    .wcv3-page *::before,
    .wcv3-page *::after {
        box-sizing: border-box;
    }

    .wcv3-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;
        margin-bottom: 14px;
    }

    .wcv3-eyebrow,
    .wcv3-section-title small,
    .wcv3-modal header small,
    .wcv3-item-search-head small {
        color: var(--corex-primary-dark);
        font-size: .68rem;
        font-weight: 850;
        letter-spacing: .1em;
    }

    .wcv3-header h1 {
        margin: 4px 0 0;
        font-size: clamp(1.7rem, 2.5vw, 2.2rem);
    }

    .wcv3-header p {
        max-width: 760px;
        margin: 7px 0 0;
        color: var(--corex-muted);
    }

    .wcv3-header-actions {
        display: flex;
        gap: 8px;
    }

    .wcv3-button {
        min-height: 40px;
        padding: 0 15px;
        border-radius: var(--corex-button-radius);
        font: inherit;
        font-weight: 780;
        cursor: pointer;
    }

    .wcv3-button.primary {
        border: 1px solid var(--corex-primary);
        background: var(--corex-primary);
        color: #fff;
    }

    .wcv3-button.secondary {
        border: 1px solid var(--corex-border);
        background: var(--corex-surface);
        color: var(--corex-text);
    }

    .wcv3-button:disabled {
        opacity: .55;
        cursor: default;
    }

    .wcv3-state {
        min-height: 270px;
        display: grid;
        place-items: center;
        align-content: center;
        gap: 10px;
        padding: 30px;
        border: 1px solid var(--corex-border);
        border-radius: 15px;
        background: var(--corex-surface);
        box-shadow: var(--corex-shadow);
        text-align: center;
    }

    .wcv3-state span {
        color: var(--corex-muted);
    }

    .wcv3-state.denied strong {
        color: var(--corex-danger);
    }

    .wcv3-spinner {
        width: 30px;
        height: 30px;
        border: 3px solid var(--corex-border);
        border-top-color: var(--corex-primary);
        border-radius: 50%;
        animation: wcv3-spin .75s linear infinite;
    }

    @keyframes wcv3-spin {
        to {
            transform: rotate(360deg);
        }
    }

    .wcv3-message {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 12px;
        padding: 11px 13px;
        border: 1px solid var(--corex-border);
        border-radius: 10px;
        background: var(--corex-surface);
    }

    .wcv3-message.success {
        color: var(--corex-success);
    }

    .wcv3-message.error {
        color: var(--corex-danger);
    }

    .wcv3-message button {
        border: 0;
        background: transparent;
        color: inherit;
        font-size: 1.25rem;
        cursor: pointer;
    }

    .wcv3-kpis {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 12px;
    }

    .wcv3-kpis article {
        min-width: 0;
        display: grid;
        gap: 5px;
        padding: 14px;
        border: 1px solid var(--corex-border);
        border-radius: 13px;
        background: var(--corex-surface);
        box-shadow: var(--corex-shadow);
    }

    .wcv3-kpis small {
        color: var(--corex-muted);
        font-size: .67rem;
        font-weight: 800;
    }

    .wcv3-kpis strong {
        font-size: 1.45rem;
        line-height: 1;
    }

    .wcv3-kpis span {
        color: var(--corex-muted);
        font-size: .72rem;
    }

    .wcv3-actions-card,
    .wcv3-card {
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid var(--corex-border);
        border-radius: 14px;
        background: var(--corex-surface);
        box-shadow: var(--corex-shadow);
    }

    .wcv3-section-title {
        min-height: 65px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 14px;
        border-bottom: 1px solid var(--corex-border);
    }

    .wcv3-section-title h2 {
        margin: 3px 0 0;
        font-size: 1rem;
    }

    .wcv3-section-title > span {
        color: var(--corex-muted);
        font-size: .75rem;
    }

    .wcv3-action-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 9px;
        padding: 12px;
    }

    .wcv3-action-grid button {
        min-width: 0;
        display: grid;
        grid-template-columns: 38px 1fr;
        grid-template-rows: auto auto;
        gap: 2px 9px;
        align-items: center;
        min-height: 72px;
        padding: 10px;
        border: 1px solid var(--corex-border);
        border-radius: 10px;
        background: var(--corex-surface-2);
        color: var(--corex-text);
        text-align: left;
        font: inherit;
        cursor: pointer;
    }

    .wcv3-action-grid button:hover {
        border-color: var(--corex-primary);
    }

    .wcv3-action-grid b {
        grid-row: 1 / span 2;
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 9px;
        background: color-mix(in srgb, var(--corex-primary) 12%, var(--corex-surface));
        color: var(--corex-primary-dark);
        font-size: 1.2rem;
    }

    .wcv3-action-grid strong {
        align-self: end;
    }

    .wcv3-action-grid span {
        align-self: start;
        color: var(--corex-muted);
        font-size: .7rem;
    }

    .wcv3-tabs {
        display: flex;
        gap: 5px;
        margin-bottom: 10px;
        padding: 5px;
        border: 1px solid var(--corex-border);
        border-radius: 12px;
        background: var(--corex-surface);
        box-shadow: var(--corex-shadow);
    }

    .wcv3-tabs button {
        min-height: 37px;
        padding: 0 13px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: var(--corex-muted);
        font: inherit;
        font-weight: 760;
        cursor: pointer;
    }

    .wcv3-tabs button.active {
        background: color-mix(in srgb, var(--corex-primary) 12%, var(--corex-surface));
        color: var(--corex-primary-dark);
    }

    .wcv3-filter {
        display: grid;
        grid-template-columns: minmax(260px, 1fr) minmax(180px, 250px) auto;
        gap: 8px;
        margin-bottom: 10px;
        padding: 10px;
        border: 1px solid var(--corex-border);
        border-radius: 12px;
        background: var(--corex-surface);
        box-shadow: var(--corex-shadow);
    }

    .wcv3-filter input,
    .wcv3-filter select,
    .wcv3-filter button,
    .wcv3-form-grid input,
    .wcv3-form-grid select,
    .wcv3-form-grid textarea,
    .wcv3-item-search > input,
    .wcv3-line-table input {
        min-height: 39px;
        border: 1px solid var(--corex-border);
        border-radius: 8px;
        background: var(--corex-surface-2);
        color: var(--corex-text);
        font: inherit;
    }

    .wcv3-filter input,
    .wcv3-form-grid input,
    .wcv3-form-grid select,
    .wcv3-form-grid textarea,
    .wcv3-item-search > input {
        width: 100%;
        padding: 8px 10px;
    }

    .wcv3-filter select {
        padding: 0 9px;
    }

    .wcv3-filter button {
        padding: 0 13px;
        color: var(--corex-text);
        cursor: pointer;
    }

    .wcv3-table-wrap {
        width: 100%;
        overflow: auto;
    }

    .wcv3-table {
        width: 100%;
        border-collapse: collapse;
        font-size: .77rem;
    }

    .wcv3-table.materials {
        min-width: 1680px;
    }

    .wcv3-table.stock {
        min-width: 1150px;
    }

    .wcv3-table.history {
        min-width: 1750px;
    }

    .wcv3-table th,
    .wcv3-table td {
        padding: 10px 11px;
        border-bottom: 1px solid var(--corex-border);
        text-align: left;
        vertical-align: middle;
        white-space: nowrap;
    }

    .wcv3-table th {
        color: var(--corex-muted);
        background: var(--corex-surface-2);
        font-size: .66rem;
        font-weight: 850;
    }

    .wcv3-table tbody tr:hover {
        background: color-mix(in srgb, var(--corex-primary) 4%, transparent);
    }

    .wcv3-table .num,
    .wcv3-line-table .num {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .wcv3-description {
        max-width: 320px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .wcv3-code {
        color: var(--corex-primary-dark);
    }

    .wcv3-ref {
        color: var(--corex-primary-dark);
        font-weight: 850;
        letter-spacing: .02em;
        white-space: nowrap;
    }

    .wcv3-blend-badge {
        display: inline-flex;
        align-items: center;
        min-height: 23px;
        padding: 0 8px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--corex-primary) 10%, var(--corex-surface));
        color: var(--corex-primary-dark);
        font-size: .68rem;
        font-weight: 850;
        white-space: nowrap;
    }

    .blend-check {
        align-self: end;
        padding: 8px 10px;
        border: 1px solid var(--corex-border);
        border-radius: 9px;
        background: var(--corex-surface-2);
    }

    .blend-check small {
        display: block;
        margin-left: 25px;
    }

    .history-blend {
        margin-left: 6px;
    }

    .wcv3-nonstock-panel {
        display: grid;
        gap: 10px;
        padding: 13px 14px;
        border-top: 1px solid var(--corex-border);
        background: color-mix(in srgb, var(--corex-primary) 4%, var(--corex-surface));
    }

    .wcv3-nonstock-panel > div:first-child {
        display: grid;
        gap: 3px;
    }

    .wcv3-nonstock-panel small {
        color: var(--corex-primary-dark);
        font-size: .67rem;
        font-weight: 850;
        letter-spacing: .09em;
    }

    .wcv3-nonstock-panel strong {
        font-size: .78rem;
    }

    .wcv3-nonstock-list {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }

    .wcv3-nonstock-list span {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 9px;
        border: 1px solid var(--corex-border);
        border-radius: 9px;
        background: var(--corex-surface);
        font-size: .72rem;
    }

    .wcv3-nonstock-list em {
        color: var(--corex-primary-dark);
        font-style: normal;
        font-weight: 800;
    }

    .wcv3-status,
    .wcv3-tx {
        display: inline-flex;
        min-height: 23px;
        align-items: center;
        padding: 0 8px;
        border-radius: 999px;
        font-size: .68rem;
        font-weight: 800;
    }

    .wcv3-status.active,
    .wcv3-tx.receive {
        color: #147542;
        background: #e7f7ed;
    }

    .wcv3-status.inactive,
    .wcv3-tx.issue {
        color: #b53a3a;
        background: #ffe8e8;
    }

    .wcv3-tx.transfer {
        color: #6746b5;
        background: #efeaff;
    }

    .wcv3-tx.adjustment {
        color: #a36300;
        background: #fff0d7;
    }

    .wcv3-empty {
        height: 95px;
        color: var(--corex-muted);
        text-align: center !important;
    }

    .wcv3-modal-backdrop {
        position: fixed;
        inset: 0;
        z-index: 5000;
        display: grid;
        place-items: center;
        padding: 16px;
        background: rgba(7, 15, 27, .58);
        backdrop-filter: blur(3px);
    }

    .wcv3-modal {
        max-height: 94vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: 1px solid var(--corex-border);
        border-radius: 16px;
        background: var(--corex-surface);
        color: var(--corex-text);
        box-shadow: 0 26px 80px rgba(0,0,0,.28);
    }

    .wcv3-modal.material-modal {
        width: min(900px, 96vw);
    }

    .wcv3-modal.document-modal {
        width: min(1480px, 98vw);
    }

    .wcv3-modal header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--corex-border);
    }

    .wcv3-modal header h2 {
        margin: 3px 0 0;
        font-size: 1.15rem;
    }

    .wcv3-modal-close {
        width: 36px;
        height: 36px;
        border: 1px solid var(--corex-border);
        border-radius: 9px;
        background: var(--corex-surface-2);
        color: var(--corex-muted);
        font-size: 1.35rem;
        cursor: pointer;
    }

    .wcv3-modal-error {
        margin: 12px 16px 0;
        padding: 10px 12px;
        border: 1px solid color-mix(in srgb, var(--corex-danger) 42%, var(--corex-border));
        border-radius: 9px;
        background: color-mix(in srgb, var(--corex-danger) 8%, var(--corex-surface));
        color: var(--corex-danger);
    }

    .wcv3-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 16px;
        overflow-y: auto;
    }

    .wcv3-form-grid.header-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 12px;
    }

    .wcv3-form-grid label {
        min-width: 0;
        display: grid;
        gap: 5px;
    }

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

    .wcv3-form-grid label > span {
        color: var(--corex-muted);
        font-size: .74rem;
        font-weight: 760;
    }

    .wcv3-form-grid label.required > span::after {
        content: " *";
        color: var(--corex-danger);
    }

    .wcv3-form-grid label small {
        color: var(--corex-muted);
        font-size: .68rem;
    }

    .wcv3-form-grid input:disabled {
        opacity: .72;
        cursor: not-allowed;
    }

    .wcv3-check {
        align-self: end;
        display: flex !important;
        align-items: center;
        gap: 8px !important;
        min-height: 39px;
    }

    .wcv3-check input {
        width: 17px;
        min-height: auto;
        height: 17px;
        margin: 0;
    }

    .wcv3-permission-fieldset {
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .wcv3-permission-fieldset:disabled {
        opacity: .92;
    }

    .wcv3-permission-fieldset:disabled input,
    .wcv3-permission-fieldset:disabled select,
    .wcv3-permission-fieldset:disabled textarea,
    .wcv3-permission-fieldset:disabled button {
        cursor: not-allowed;
    }

    .wcv3-document-body {
        min-height: 0;
        overflow-y: auto;
    }

    .wcv3-document-header {
        border-bottom: 1px solid var(--corex-border);
        background: var(--corex-surface);
    }

    .wcv3-item-search {
        padding: 12px;
        border-bottom: 1px solid var(--corex-border);
        background: var(--corex-surface-2);
    }

    .wcv3-item-search-head {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 8px;
    }

    .wcv3-item-search-head > div {
        display: grid;
        gap: 2px;
    }

    .wcv3-item-search-head > span {
        color: var(--corex-muted);
        font-size: .72rem;
        font-weight: 750;
    }

    .wcv3-search-results {
        display: grid;
        gap: 6px;
        max-height: 245px;
        margin-top: 7px;
        overflow-y: auto;
    }

    .wcv3-search-results button {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 9px 11px;
        border: 1px solid var(--corex-border);
        border-radius: 9px;
        background: var(--corex-surface);
        color: var(--corex-text);
        text-align: left;
        font: inherit;
        cursor: pointer;
    }

    .wcv3-search-results button:hover {
        border-color: var(--corex-primary);
    }

    .wcv3-search-results button > span {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .wcv3-search-results button small {
        max-width: 850px;
        overflow: hidden;
        color: var(--corex-muted);
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wcv3-search-results button b {
        flex: 0 0 auto;
        color: var(--corex-primary-dark);
    }

    .wcv3-search-empty {
        padding: 12px;
        color: var(--corex-muted);
        text-align: center;
    }

    .wcv3-lines {
        background: var(--corex-surface);
    }

    .wcv3-line-table {
        width: 100%;
        min-width: 1250px;
        border-collapse: collapse;
        font-size: .75rem;
    }

    .wcv3-line-table.issue-lines {
        min-width: 1480px;
    }

    .wcv3-line-table.issue-lines th:first-child,
    .wcv3-line-table.issue-lines td:first-child {
        min-width: 78px;
    }

    .wcv3-line-table.transfer-lines,
    .wcv3-line-table.adjustment-lines {
        min-width: 1050px;
    }

    .wcv3-line-table th,
    .wcv3-line-table td {
        padding: 8px;
        border-bottom: 1px solid var(--corex-border);
        vertical-align: middle;
        text-align: left;
    }

    .wcv3-line-table th {
        color: var(--corex-muted);
        background: var(--corex-surface-2);
        font-size: .66rem;
        font-weight: 850;
        white-space: nowrap;
    }

    .wcv3-line-table td:first-child {
        min-width: 135px;
    }

    .wcv3-line-table td:first-child small {
        display: block;
        margin-top: 2px;
        color: var(--corex-muted);
    }

    .wcv3-line-table .desc-cell {
        min-width: 300px;
        max-width: 380px;
    }

    .wcv3-line-table input {
        width: 100%;
        min-width: 90px;
        padding: 6px 8px;
    }

    .wcv3-line-table .availability {
        min-width: 130px;
        font-weight: 800;
    }

    /* Goods Issue: keep headers visually aligned with the values/controls below. */
    .wcv3-line-table.issue-lines th.issue-available-col,
    .wcv3-line-table.issue-lines td.availability {
        text-align: center !important;
    }

    .wcv3-line-table.issue-lines th.issue-qty-col,
    .wcv3-line-table.issue-lines td.issue-qty-cell {
        text-align: center !important;
    }

    .wcv3-line-table.issue-lines td.issue-qty-cell input {
        display: block;
        margin-inline: auto;
    }

    .wcv3-line-table .positive {
        color: var(--corex-success);
        font-weight: 850;
    }

    .wcv3-line-table .negative {
        color: var(--corex-danger);
        font-weight: 850;
    }

    .remove-line {
        width: 31px;
        height: 31px;
        border: 1px solid color-mix(in srgb, var(--corex-danger) 30%, var(--corex-border));
        border-radius: 8px;
        background: color-mix(in srgb, var(--corex-danger) 7%, var(--corex-surface));
        color: var(--corex-danger);
        font-size: 1.05rem;
        cursor: pointer;
    }

    .wcv3-lines-empty {
        min-height: 100px;
        display: grid;
        place-items: center;
        color: var(--corex-muted);
    }

    .wcv3-document-totals {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding: 12px;
        border-top: 1px solid var(--corex-border);
        background: var(--corex-surface-2);
    }

    .wcv3-document-totals > div {
        min-width: 145px;
        display: grid;
        gap: 3px;
        padding: 9px 11px;
        border: 1px solid var(--corex-border);
        border-radius: 9px;
        background: var(--corex-surface);
    }

    .wcv3-document-totals span {
        color: var(--corex-muted);
        font-size: .68rem;
        font-weight: 750;
    }

    .wcv3-document-totals strong {
        font-size: 1rem;
        text-align: right;
    }

    .wcv3-modal footer {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding: 12px 16px;
        border-top: 1px solid var(--corex-border);
        background: var(--corex-surface-2);
    }


    .wcv3-source-badge {
        display: inline-flex;
        align-items: center;
        min-height: 22px;
        padding: 3px 8px;
        border: 1px solid var(--corex-border);
        border-radius: 999px;
        background: var(--corex-surface-2);
        color: var(--corex-muted);
        font-size: .63rem;
        font-weight: 850;
        letter-spacing: .02em;
        white-space: nowrap;
    }

    .wcv3-source-badge.consumable {
        color: var(--corex-primary-dark);
        border-color: color-mix(in srgb, var(--corex-primary) 35%, var(--corex-border));
        background: color-mix(in srgb, var(--corex-primary) 7%, var(--corex-surface));
    }

    .wcv3-source-badge.blend {
        color: var(--corex-warning);
        border-color: color-mix(in srgb, var(--corex-warning) 35%, var(--corex-border));
        background: color-mix(in srgb, var(--corex-warning) 7%, var(--corex-surface));
    }

    .wcv3-source-badge.spare {
        color: var(--corex-info, var(--corex-primary-dark));
        border-color: color-mix(in srgb, var(--corex-primary) 28%, var(--corex-border));
    }

    .wcv3-source-badge.asset {
        color: var(--corex-success);
        border-color: color-mix(in srgb, var(--corex-success) 35%, var(--corex-border));
        background: color-mix(in srgb, var(--corex-success) 7%, var(--corex-surface));
    }

    .wcv3-source-badge.equipment {
        color: var(--corex-danger);
        border-color: color-mix(in srgb, var(--corex-danger) 30%, var(--corex-border));
        background: color-mix(in srgb, var(--corex-danger) 6%, var(--corex-surface));
    }

    .wcv3-identity,
    .wcv3-result-main small,
    .wcv3-field-hint {
        display: block;
        margin-top: 3px;
        color: var(--corex-muted);
        font-size: .68rem;
        line-height: 1.35;
    }

    .wcv3-search-guidance {
        padding: 10px 12px;
        color: var(--corex-muted);
        background: var(--corex-surface-2);
        border: 1px dashed var(--corex-border);
        border-radius: 9px;
        font-size: .74rem;
    }

    .wcv3-result-main {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .wcv3-result-main strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wcv3-result-stock {
        margin-left: auto;
        display: grid;
        justify-items: end;
        gap: 1px;
        color: var(--corex-muted);
        font-size: .66rem;
        white-space: nowrap;
    }

    .wcv3-result-stock strong {
        color: var(--corex-text);
        font-size: .76rem;
    }

    .wcv3-button.print-action,
    .wcv3-history-actions {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .wcv3-edit-mini {
        min-height: 30px;
        padding: 0 10px;
        border: 1px solid var(--corex-border);
        border-radius: 7px;
        background: var(--corex-surface);
        color: var(--corex-primary-dark);
        font: inherit;
        font-size: .7rem;
        font-weight: 800;
        cursor: pointer;
    }

    .wcv3-edit-mini:hover {
        border-color: var(--corex-primary);
        background: color-mix(in srgb, var(--corex-primary) 8%, var(--corex-surface));
    }

    .wcv3-edit-lock-note {
        margin: 12px;
        padding: 14px;
        border: 1px solid var(--corex-border);
        border-radius: 10px;
        background: color-mix(in srgb, var(--corex-primary) 5%, var(--corex-surface));
    }

    .wcv3-edit-lock-note > div {
        display: grid;
        gap: 4px;
    }

    .wcv3-edit-lock-note strong {
        color: var(--corex-primary-dark);
    }

    .wcv3-edit-lock-note span {
        color: var(--corex-muted);
        font-size: .75rem;
    }

    .wcv3-edit-lock-note.full-edit {
        border-color: color-mix(in srgb, var(--corex-primary) 30%, var(--corex-border));
        background: color-mix(in srgb, var(--corex-primary) 7%, var(--corex-surface));
    }

    .wcv3-edit-lock-note.full-edit strong {
        color: var(--corex-primary-dark);
    }

    .wcv3-print-mini {
        border-color: color-mix(in srgb, var(--corex-primary) 35%, var(--corex-border));
    }

    .wcv3-print-sheet {
        display: none;
    }

    @page {
        size: A4 landscape;
        margin: 8mm;
    }

    @page transferNotePage {
        size: A4 portrait;
        margin: 8mm;
    }

    @media print {
        body * {
            visibility: hidden !important;
        }

        /* Keep only the print document and flatten its application wrappers.
           Hidden app content still occupies print layout and can create blank pages. */
        body:has(.wcv3-print-sheet) {
            margin: 0 !important;
            padding: 0 !important;
            height: auto !important;
            min-height: 0 !important;
            overflow: visible !important;
        }

        body:has(.wcv3-print-sheet) *:not(.wcv3-print-sheet):not(.wcv3-print-sheet *):not(:has(.wcv3-print-sheet)) {
            display: none !important;
        }

        body:has(.wcv3-print-sheet) *:has(.wcv3-print-sheet) {
            display: contents !important;
            visibility: visible !important;
        }

        .wcv3-print-sheet,
        .wcv3-print-sheet * {
            visibility: visible !important;
        }

        .wcv3-print-sheet {
            position: relative !important;
            inset: auto !important;
            display: block !important;
            width: 100%;
            height: auto !important;
            min-height: 0 !important;
            box-sizing: border-box;
            padding: 0;
            margin: 0;
            background: #fff;
            color: #111827;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 9pt;
            break-after: avoid-page;
            page-break-after: avoid;
        }

        .wcv3-transfer-note {
            page: transferNotePage;
        }

        .wcv3-print-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 18px;
            padding: 2mm 0 3mm;
        }

        .wcv3-print-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .wcv3-print-logo {
            display: block;
            width: 42mm;
            max-width: 190px;
            height: 16mm;
            object-fit: contain;
            object-position: left center;
        }

        .wcv3-print-brand > div:last-child,
        .wcv3-print-number {
            display: grid;
            gap: 2px;
        }

        .wcv3-print-brand strong {
            font-size: 12pt;
        }

        .wcv3-print-brand span {
            color: #4b5563;
            font-size: 9pt;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .08em;
        }

        .wcv3-print-number {
            justify-items: end;
            text-align: right;
        }

        .wcv3-print-number span,
        .wcv3-print-meta span,
        .wcv3-print-summary span,
        .wcv3-print-signatures span {
            color: #6b7280;
            font-size: 7.5pt;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .05em;
        }

        .wcv3-print-number strong {
            font-size: 13pt;
        }

        .wcv3-print-number small {
            color: #4b5563;
            font-size: 8pt;
        }

        .wcv3-print-rule {
            height: 2px;
            margin-bottom: 3mm;
            background: #111827;
        }

        .wcv3-print-meta {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            border: 1px solid #d1d5db;
            border-radius: 6px;
            overflow: hidden;
        }

        .wcv3-print-meta > div {
            min-height: 14mm;
            display: grid;
            align-content: center;
            gap: 2px;
            padding: 2.5mm 3mm;
            border-right: 1px solid #e5e7eb;
            border-bottom: 1px solid #e5e7eb;
        }

        .wcv3-print-meta > div:nth-child(3n) {
            border-right: 0;
        }

        .wcv3-print-meta > div:nth-last-child(-n+3) {
            border-bottom: 0;
        }

        .wcv3-print-meta strong {
            font-size: 9pt;
            word-break: break-word;
        }

        .wcv3-print-meta small {
            color: #6b7280;
            font-size: 7.5pt;
        }

        .wcv3-print-materials {
            margin-top: 4mm;
        }

        .wcv3-print-section-title {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 2mm;
        }

        .wcv3-print-section-title strong {
            font-size: 10pt;
        }

        .wcv3-print-section-title span {
            color: #6b7280;
            font-size: 8pt;
        }

        .wcv3-print-materials table {
            width: 100%;
            border-collapse: collapse;
            table-layout: auto;
            background: #fff !important;
            color: #111827 !important;
            color-scheme: light;
        }

        .wcv3-print-sheet .wcv3-print-materials table,
        .wcv3-print-sheet .wcv3-print-materials thead,
        .wcv3-print-sheet .wcv3-print-materials tbody,
        .wcv3-print-sheet .wcv3-print-materials tr,
        .wcv3-print-sheet .wcv3-print-materials th,
        .wcv3-print-sheet .wcv3-print-materials td {
            background-color: #fff !important;
            color: #111827 !important;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }

        .wcv3-print-sheet .wcv3-print-materials th,
        .wcv3-print-sheet .wcv3-print-materials td {
            padding: 2mm 1.7mm;
            border: 1px solid #d1d5db;
            vertical-align: top;
            text-align: left;
        }

        .wcv3-print-sheet .wcv3-print-materials th {
            background: #f3f4f6 !important;
            color: #374151;
            font-size: 7pt;
            font-weight: 800;
            white-space: nowrap;
            -webkit-print-color-adjust: exact;
            print-color-adjust: exact;
        }

        .wcv3-print-sheet .wcv3-print-materials td {
            font-size: 7.5pt;
        }

        .wcv3-print-materials td small {
            display: block;
            margin-top: 1mm;
            color: #6b7280;
            font-size: 6.8pt;
            line-height: 1.25;
        }

        .wcv3-print-materials .num {
            text-align: right;
            white-space: nowrap;
        }

        .wcv3-print-summary {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 4mm;
            margin-top: 4mm;
            page-break-inside: avoid;
        }

        .wcv3-print-remarks {
            min-height: 18mm;
            display: grid;
            align-content: start;
            gap: 2mm;
            padding: 3mm;
            border: 1px solid #d1d5db;
            border-radius: 6px;
        }

        .wcv3-print-totals {
            display: grid;
            grid-template-columns: repeat(2, minmax(28mm, auto));
            border: 1px solid #d1d5db;
            border-radius: 6px;
            overflow: hidden;
        }

        .wcv3-print-totals > div {
            display: grid;
            align-content: center;
            justify-items: end;
            gap: 2px;
            padding: 2.5mm 3mm;
            border-left: 1px solid #e5e7eb;
        }

        .wcv3-print-totals > div:first-child {
            border-left: 0;
        }

        .wcv3-print-totals strong {
            font-size: 10pt;
        }

        .wcv3-print-signatures {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 5mm;
            margin-top: 8mm;
            page-break-inside: avoid;
        }

        .wcv3-transfer-note .wcv3-print-signatures {
            margin-top: 5mm;
        }

        .wcv3-print-signatures > div {
            min-height: 20mm;
            display: grid;
            align-content: start;
            gap: 2mm;
            padding-top: 2mm;
            border-top: 1px solid #9ca3af;
        }

        .wcv3-print-signatures strong {
            min-height: 5mm;
        }

        .wcv3-print-signatures i {
            margin-top: auto;
            color: #9ca3af;
            font-size: 7pt;
            font-style: normal;
        }

        .wcv3-print-footer-note {
            margin-top: 5mm;
            padding-top: 2mm;
            border-top: 1px solid #e5e7eb;
            color: #9ca3af;
            font-size: 6.8pt;
            text-align: center;
        }
    }


    /* =========================================================
       v3.5 Professional data tables
       UI only — no workflow/calculation changes.
       ========================================================= */

    .wcv3-tabs button {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

    .wcv3-tab-count {
        min-width: 22px;
        height: 22px;
        display: inline-grid;
        place-items: center;
        padding: 0 6px;
        border-radius: 999px;
        background: color-mix(in srgb, var(--corex-border) 55%, transparent);
        color: var(--corex-muted);
        font-size: .64rem;
        font-weight: 850;
        line-height: 1;
    }

    .wcv3-tabs button.active .wcv3-tab-count {
        background: color-mix(in srgb, var(--corex-primary) 18%, var(--corex-surface));
        color: var(--corex-primary-dark);
    }

    .wcv3-data-title {
        min-height: 72px;
    }

    .wcv3-data-title p {
        margin: 4px 0 0;
        color: var(--corex-muted);
        font-size: .72rem;
        line-height: 1.35;
    }

    .wcv3-table-meta {
        flex: 0 0 auto;
        min-width: 82px;
        display: grid;
        gap: 1px;
        padding: 7px 10px;
        border: 1px solid var(--corex-border);
        border-radius: 9px;
        background: var(--corex-surface-2);
        text-align: right;
    }

    .wcv3-table-meta strong {
        font-size: .95rem;
        font-variant-numeric: tabular-nums;
    }

    .wcv3-table-meta span {
        color: var(--corex-muted);
        font-size: .63rem;
        font-weight: 700;
    }

    .wcv3-professional-table-wrap {
        position: relative;
        max-height: min(62vh, 690px);
        overflow: auto;
        scrollbar-gutter: stable;
    }

    .wcv3-table.professional {
        border-collapse: separate;
        border-spacing: 0;
        table-layout: fixed;
        font-size: .76rem;
    }

    .wcv3-table.materials.professional {
        min-width: 1440px;
    }

    .wcv3-material-stock-cell {
        padding: 7px 8px !important;
    }

    .wcv3-material-stock-box {
        min-width: 112px;
        display: grid;
        justify-items: end;
        gap: 2px;
        padding: 7px 9px;
        border: 1px solid color-mix(in srgb, var(--corex-accent) 36%, var(--corex-border));
        border-radius: 8px;
        background: color-mix(in srgb, var(--corex-accent) 8%, var(--corex-surface));
        box-shadow: inset 3px 0 0 color-mix(in srgb, var(--corex-accent) 72%, transparent);
    }

    .wcv3-material-stock-box > small {
        color: var(--corex-muted);
        font-size: .56rem;
        font-weight: 850;
        letter-spacing: .08em;
    }

    .wcv3-material-stock-box > strong {
        color: var(--corex-text);
        font-size: .95rem;
        font-weight: 920;
        line-height: 1.05;
        white-space: nowrap;
    }

    .wcv3-material-stock-box > strong span {
        color: var(--corex-muted);
        font-size: .62rem;
        font-weight: 760;
    }

    .wcv3-material-stock-box > em {
        color: var(--corex-muted);
        font-size: .56rem;
        font-style: normal;
        line-height: 1.1;
        white-space: nowrap;
    }

    .wcv3-material-stock-cell.is-low .wcv3-material-stock-box,
    .wcv3-material-stock-cell.is-out .wcv3-material-stock-box {
        border-color: color-mix(in srgb, #d93025 48%, var(--corex-border));
        background: color-mix(in srgb, #d93025 8%, var(--corex-surface));
        box-shadow: inset 3px 0 0 #d93025;
    }

    .wcv3-material-stock-cell.is-out .wcv3-material-stock-box > strong,
    .wcv3-material-stock-cell.is-low .wcv3-material-stock-box > strong {
        color: #b42318;
    }

    .wcv3-stock-limit-cell {
        display: grid;
        gap: 3px;
        min-width: 0;
        text-align: right;
    }

    .wcv3-stock-limit-value {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        min-width: 0;
    }

    .wcv3-stock-limit-value strong {
        color: var(--corex-text);
        font-weight: 850;
        white-space: nowrap;
    }

    .wcv3-stock-limit-value strong small {
        color: var(--corex-muted);
        font-size: .72em;
        font-weight: 720;
    }

    .wcv3-stock-limit-cell > span {
        color: var(--corex-muted);
        font-size: .62rem;
        line-height: 1.15;
    }

    .wcv3-stock-limit-cell.is-low {
        margin: -4px -6px;
        padding: 5px 6px;
        border: 1px solid color-mix(in srgb, #d93025 40%, var(--corex-border));
        border-radius: 7px;
        background: color-mix(in srgb, #d93025 7%, var(--corex-surface));
    }

    .wcv3-minimum-alert {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        min-height: 21px;
        padding: 0 6px;
        border: 1px solid color-mix(in srgb, #d93025 42%, var(--corex-border));
        border-radius: 999px;
        background: color-mix(in srgb, #d93025 10%, var(--corex-surface));
        color: #b42318;
        font-size: .58rem;
        font-weight: 900;
        letter-spacing: .025em;
        line-height: 1;
        white-space: nowrap;
    }

    .wcv3-minimum-alert svg {
        width: 12px;
        height: 12px;
        flex: 0 0 auto;
    }

    .wcv3-table.stock.professional {
        min-width: 1080px;
    }

    .wcv3-table.history.professional {
        min-width: 1540px;
    }

    .wcv3-table.professional th {
        position: sticky;
        top: 0;
        z-index: 4;
        height: 39px;
        padding: 9px 12px;
        border-bottom: 1px solid var(--corex-border);
        background: color-mix(in srgb, var(--corex-surface-2) 94%, var(--corex-surface));
        color: var(--corex-muted);
        font-size: .65rem;
        font-weight: 850;
        letter-spacing: .025em;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .wcv3-table.professional td {
        padding: 10px 12px;
        border-bottom: 1px solid color-mix(in srgb, var(--corex-border) 72%, transparent);
        vertical-align: middle;
        white-space: normal;
    }

    .wcv3-table.professional tbody tr:nth-child(even) {
        background: color-mix(in srgb, var(--corex-surface-2) 36%, transparent);
    }

    .wcv3-table.professional tbody tr:hover {
        background: color-mix(in srgb, var(--corex-primary) 6%, var(--corex-surface));
    }

    .wcv3-table.materials.professional th:nth-child(1),
    .wcv3-table.materials.professional td:nth-child(1) { width: 115px; }

    .wcv3-table.materials.professional th:nth-child(2),
    .wcv3-table.materials.professional td:nth-child(2) { width: 135px; }

    .wcv3-table.materials.professional th:nth-child(3),
    .wcv3-table.materials.professional td:nth-child(3) { width: 250px; }

    .wcv3-table.materials.professional th:nth-child(4),
    .wcv3-table.materials.professional td:nth-child(4) { width: 160px; }

    .wcv3-table.materials.professional th:nth-child(5),
    .wcv3-table.materials.professional td:nth-child(5) { width: 150px; }

    .wcv3-table.materials.professional th:nth-child(6),
    .wcv3-table.materials.professional td:nth-child(6) { width: 145px; }

    .wcv3-table.materials.professional th:nth-child(7),
    .wcv3-table.materials.professional td:nth-child(7),
    .wcv3-table.materials.professional th:nth-child(8),
    .wcv3-table.materials.professional td:nth-child(8),
    .wcv3-table.materials.professional th:nth-child(9),
    .wcv3-table.materials.professional td:nth-child(9) { width: 125px; }

    .wcv3-table.materials.professional th:nth-child(10),
    .wcv3-table.materials.professional td:nth-child(10),
    .wcv3-table.materials.professional th:nth-child(11),
    .wcv3-table.materials.professional td:nth-child(11) { width: 95px; }

    .wcv3-table.materials.professional th:nth-child(12),
    .wcv3-table.materials.professional td:nth-child(12) { width: 90px; }

    .wcv3-material-edit {
        min-height: 31px;
        padding: 0 11px;
        border: 1px solid var(--corex-border);
        border-radius: 7px;
        background: var(--corex-surface);
        color: var(--corex-primary-dark);
        font: inherit;
        font-size: .7rem;
        font-weight: 820;
        cursor: pointer;
        transition:
            border-color .15s ease,
            background .15s ease,
            transform .15s ease;
    }

    .wcv3-material-edit:hover {
        border-color: var(--corex-primary);
        background: color-mix(in srgb, var(--corex-primary) 8%, var(--corex-surface));
        transform: translateY(-1px);
    }

    .wcv3-table.stock.professional th:nth-child(1),
    .wcv3-table.stock.professional td:nth-child(1) { width: 120px; }

    .wcv3-table.stock.professional th:nth-child(2),
    .wcv3-table.stock.professional td:nth-child(2) { width: 145px; }

    .wcv3-table.stock.professional th:nth-child(3),
    .wcv3-table.stock.professional td:nth-child(3) { width: 270px; }

    .wcv3-table.stock.professional th:nth-child(4),
    .wcv3-table.stock.professional td:nth-child(4) { width: 170px; }

    .wcv3-table.stock.professional th:nth-child(5),
    .wcv3-table.stock.professional td:nth-child(5),
    .wcv3-table.stock.professional th:nth-child(6),
    .wcv3-table.stock.professional td:nth-child(6),
    .wcv3-table.stock.professional th:nth-child(7),
    .wcv3-table.stock.professional td:nth-child(7) { width: 135px; }

    .wcv3-table.stock.professional th:nth-child(8),
    .wcv3-table.stock.professional td:nth-child(8) { width: 120px; }

    .wcv3-table.history.professional th:nth-child(1),
    .wcv3-table.history.professional td:nth-child(1) { width: 170px; }

    .wcv3-table.history.professional th:nth-child(2),
    .wcv3-table.history.professional td:nth-child(2) { width: 125px; }

    .wcv3-table.history.professional th:nth-child(3),
    .wcv3-table.history.professional td:nth-child(3) { width: 150px; }

    .wcv3-table.history.professional th:nth-child(4),
    .wcv3-table.history.professional td:nth-child(4) { width: 245px; }

    .wcv3-table.history.professional th:nth-child(5),
    .wcv3-table.history.professional td:nth-child(5) { width: 185px; }

    .wcv3-table.history.professional th:nth-child(6),
    .wcv3-table.history.professional td:nth-child(6),
    .wcv3-table.history.professional th:nth-child(7),
    .wcv3-table.history.professional td:nth-child(7) { width: 125px; }

    .wcv3-table.history.professional th:nth-child(8),
    .wcv3-table.history.professional td:nth-child(8) { width: 145px; }

    .wcv3-table.history.professional th:nth-child(9),
    .wcv3-table.history.professional td:nth-child(9) { width: 165px; }

    .wcv3-table.history.professional th:nth-child(10),
    .wcv3-table.history.professional td:nth-child(10) { width: 125px; }

    .wcv3-table.history.professional th:nth-child(11),
    .wcv3-table.history.professional td:nth-child(11) { width: 115px; }

    .wcv3-item-key,
    .wcv3-cell-stack,
    .wcv3-value-cell {
        min-width: 0;
        display: grid;
        gap: 3px;
    }

    .wcv3-item-key {
        justify-items: start;
    }

    .wcv3-cell-main,
    .wcv3-part-no {
        color: var(--corex-text);
        font-weight: 760;
        line-height: 1.3;
    }

    .wcv3-cell-sub {
        color: var(--corex-muted);
        font-size: .67rem;
        font-weight: 600;
        line-height: 1.3;
    }

    .clamp-2 {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .wcv3-ref-pill,
    .wcv3-soft-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 22px;
        padding: 0 7px;
        border: 1px solid var(--corex-border);
        border-radius: 999px;
        background: var(--corex-surface-2);
        color: var(--corex-primary-dark);
        font-size: .64rem;
        font-weight: 850;
        white-space: nowrap;
    }

    .wcv3-spec-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .wcv3-spec-grid > span {
        min-width: 0;
        display: grid;
        gap: 2px;
        padding: 6px 7px;
        border: 1px solid color-mix(in srgb, var(--corex-border) 75%, transparent);
        border-radius: 7px;
        background: color-mix(in srgb, var(--corex-surface-2) 55%, transparent);
    }

    .wcv3-spec-grid small {
        color: var(--corex-muted);
        font-size: .56rem;
        font-weight: 800;
    }

    .wcv3-spec-grid b {
        overflow: hidden;
        font-size: .67rem;
        font-weight: 760;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wcv3-value-cell {
        justify-items: end;
        text-align: right;
    }

    .wcv3-value-cell strong {
        font-size: .79rem;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    .wcv3-value-cell strong small {
        color: var(--corex-muted);
        font-size: .6rem;
        font-weight: 700;
    }

    .wcv3-value-cell span {
        color: var(--corex-muted);
        font-size: .63rem;
        line-height: 1.25;
        white-space: nowrap;
    }

    .wcv3-low-stock-text {
        color: var(--corex-danger) !important;
        font-weight: 800;
    }

    .wcv3-badge-stack {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        align-items: center;
    }

    .transaction-cell strong {
        color: var(--corex-primary-dark);
    }

    .wcv3-history-actions {
        flex-wrap: wrap;
    }


    /* =========================================================
       COREX WHM Consumables v3.9 Premium Center
       Visual redesign only. Business logic remains unchanged.
       ========================================================= */

    .wcv3-page {
        /*
            v3.11
            Premium layout follows the active COREX system theme.
            Icon palette stays intentionally fixed.
        */
        --cx9-blue: var(--corex-primary);
        --cx9-blue-2: var(--corex-primary-dark);
        --cx9-text: var(--corex-text);
        --cx9-muted: var(--corex-muted);
        --cx9-border: var(--corex-border);
        --cx9-card: var(--corex-surface);
        --cx9-page: var(--corex-bg);
        --cx9-soft: var(--corex-surface-2);
        --cx9-shadow: var(--corex-shadow);

        /* Fixed icon palette - does not change with theme */
        --cx9-icon-blue: #3283ef;
        --cx9-icon-green: #27ae60;
        --cx9-icon-amber: #f5a623;
        --cx9-icon-red: #e94444;
        --cx9-icon-violet: #8b5ee8;
        --cx9-icon-cyan: #199ca1;

        padding: 0;
        background: var(--cx9-page);
        color: var(--cx9-text);
    }

    .cx9-page-header {
        min-height: 82px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        padding: 16px 24px;
        border-bottom: 1px solid var(--cx9-border);
        background: var(--cx9-card);
    }

    .cx9-title-wrap {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 13px;
    }

    .cx9-title-icon {
        width: 46px;
        height: 46px;
        flex: 0 0 auto;
        display: grid;
        place-items: center;
        border-radius: 13px;
        background: #eef5ff;
        color: var(--cx9-blue);
    }

    .cx9-title-icon svg {
        width: 27px;
        height: 27px;
    }

    .cx9-kicker {
        display: none;
    }

    .cx9-title-wrap h1 {
        margin: 0;
        color: var(--cx9-text);
        font-size: 1.65rem;
        font-weight: 800;
        letter-spacing: -.035em;
        line-height: 1.12;
    }

    .cx9-title-wrap p {
        margin: 5px 0 0;
        color: var(--cx9-muted);
        font-size: .82rem;
        font-weight: 520;
    }

    .cx9-header-actions {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .cx9-context-chip,
    .cx9-add-material {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border-radius: 9px;
        font: inherit;
        font-size: .74rem;
        font-weight: 720;
        white-space: nowrap;
    }

    .cx9-context-chip {
        padding: 0 12px;
        border: 1px solid var(--cx9-border);
        background: var(--cx9-card);
        color: #34435a;
    }

    .cx9-context-chip svg {
        width: 17px;
        height: 17px;
        color: #66758a;
    }

    .cx9-add-material {
        padding: 0 14px;
        border: 1px solid var(--cx9-blue);
        background: var(--cx9-blue);
        color: #fff;
        cursor: pointer;
        box-shadow: 0 5px 14px rgba(23, 104, 232, .16);
    }

    .cx9-add-material:hover {
        background: #0f5fdc;
    }

    .cx9-add-material svg {
        width: 17px;
        height: 17px;
    }

    .wcv3-message {
        margin: 14px 22px 0;
        border-color: var(--cx9-border);
        border-radius: 9px;
        background: var(--cx9-card);
    }

    .cx9-nav {
        min-height: 58px;
        display: flex;
        align-items: stretch;
        gap: 4px;
        padding: 0 22px;
        overflow-x: auto;
        border-bottom: 1px solid var(--cx9-border);
        background: var(--cx9-card);
        scrollbar-width: thin;
    }

    .cx9-nav-item,
    .cx9-nav-action {
        position: relative;
        flex: 0 0 auto;
        min-height: 58px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 0 13px;
        border: 0;
        background: transparent;
        color: #445267;
        font: inherit;
        font-size: .75rem;
        font-weight: 720;
        cursor: pointer;
        white-space: nowrap;
    }

    .cx9-nav-item svg,
    .cx9-nav-action svg {
        width: 17px;
        height: 17px;
    }

    .cx9-nav-item:hover,
    .cx9-nav-action:hover {
        color: var(--cx9-blue);
        background: #f8fbff;
    }

    .cx9-nav-item.active {
        color: var(--cx9-blue);
    }

    .cx9-nav-item.active::after {
        content: "";
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 0;
        height: 3px;
        border-radius: 3px 3px 0 0;
        background: var(--cx9-blue);
    }

    .cx9-nav-badge {
        min-width: 20px;
        height: 20px;
        display: inline-grid;
        place-items: center;
        padding: 0 5px;
        border-radius: 999px;
        background: #fff0f0;
        color: #e33434;
        font-size: .62rem;
        font-weight: 850;
    }

    .cx9-kpi-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
        padding: 16px 22px 0;
    }

    .cx9-kpi-card {
        min-width: 0;
        min-height: 122px;
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        align-items: center;
        gap: 13px;
        padding: 17px;
        border: 1px solid var(--cx9-border);
        border-radius: 11px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .cx9-kpi-icon {
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border-radius: 11px;
    }

    .cx9-kpi-icon svg {
        width: 27px;
        height: 27px;
    }

    .cx9-kpi-icon.blue {
        background: #eaf3ff;
        color: #3283ef;
    }

    .cx9-kpi-icon.green {
        background: #eaf8f0;
        color: #27ae60;
    }

    .cx9-kpi-icon.amber {
        background: #fff4dd;
        color: #f5a623;
    }

    .cx9-kpi-icon.red {
        background: #ffeded;
        color: #e94444;
    }

    .cx9-kpi-icon.violet {
        background: #f1ebff;
        color: #8b5ee8;
    }

    .cx9-kpi-card > div:last-child {
        min-width: 0;
        display: grid;
        gap: 3px;
    }

    .cx9-kpi-card span {
        color: #425067;
        font-size: .73rem;
        font-weight: 700;
    }

    .cx9-kpi-card strong {
        overflow: hidden;
        color: var(--cx9-text);
        font-size: 1.35rem;
        font-weight: 830;
        letter-spacing: -.025em;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    .cx9-kpi-card small {
        color: #8792a4;
        font-size: .65rem;
        font-weight: 560;
    }

    .cx9-overview-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.72fr) minmax(330px, .78fr);
        gap: 12px;
        padding: 12px 22px 0;
    }

    .cx9-panel {
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--cx9-border);
        border-radius: 11px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .cx9-panel-head {
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 15px;
        border-bottom: 1px solid var(--cx9-border);
    }

    .cx9-panel-head > div {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .cx9-panel-head h2 {
        margin: 0;
        color: var(--cx9-text);
        font-size: .9rem;
        font-weight: 800;
        letter-spacing: -.01em;
    }

    .cx9-panel-icon {
        width: 23px;
        height: 23px;
        display: grid;
        place-items: center;
    }

    .cx9-panel-icon svg {
        width: 20px;
        height: 20px;
    }

    .cx9-panel-icon.amber {
        color: #f2a51a;
    }

    .cx9-link-button {
        border: 0;
        background: transparent;
        color: var(--cx9-blue);
        font: inherit;
        font-size: .69rem;
        font-weight: 800;
        cursor: pointer;
    }

    .cx9-link-button:hover {
        text-decoration: underline;
    }

    .cx9-table-scroll {
        width: 100%;
        overflow-x: auto;
    }

    .cx9-table {
        width: 100%;
        min-width: 860px;
        border-collapse: collapse;
        table-layout: auto;
        color: #23324a;
        font-size: .68rem;
    }

    .cx9-table.recent {
        min-width: 1120px;
    }

    .cx9-table th,
    .cx9-table td {
        padding: 9px 11px;
        border-bottom: 1px solid #edf0f5;
        text-align: left;
        vertical-align: middle;
        white-space: nowrap;
    }

    .cx9-table th {
        background: #fafbfd;
        color: #405069;
        font-size: .62rem;
        font-weight: 800;
    }

    .cx9-table tbody tr:hover {
        background: #fbfdff;
    }

    .cx9-table .num {
        text-align: right;
        font-variant-numeric: tabular-nums;
    }

    .cx9-table .strong {
        font-weight: 800;
        color: var(--cx9-text);
    }

    .cx9-item-link {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--cx9-blue);
        font: inherit;
        font-weight: 820;
        cursor: pointer;
    }

    .cx9-item-code {
        color: var(--cx9-blue);
        font-weight: 820;
    }

    .cx9-two-line {
        max-width: 230px;
        display: grid;
        gap: 2px;
    }

    .cx9-two-line.compact {
        max-width: 150px;
    }

    .cx9-two-line strong {
        overflow: hidden;
        color: var(--cx9-text);
        font-size: .68rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cx9-two-line span,
    .cx9-desc {
        overflow: hidden;
        color: #6d7b8f;
        font-size: .64rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cx9-stock-state,
    .cx9-tx-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 22px;
        padding: 0 7px;
        border-radius: 6px;
        font-size: .61rem;
        font-weight: 800;
        white-space: nowrap;
    }

    .cx9-stock-state.low {
        background: #fff2df;
        color: #e48a00;
        border: 1px solid #ffdba6;
    }

    .cx9-stock-state.out {
        background: #ffeded;
        color: #e13838;
        border: 1px solid #ffcaca;
    }

    .cx9-tx-badge.receive {
        background: #e8f8ef;
        color: #168a4e;
    }

    .cx9-tx-badge.issue {
        background: #eaf3ff;
        color: #1768e8;
    }

    .cx9-tx-badge.transfer {
        background: #f2edff;
        color: #7950cf;
    }

    .cx9-tx-badge.adjustment {
        background: #fff1df;
        color: #dd8500;
    }

    .cx9-table-footer {
        min-height: 35px;
        display: flex;
        align-items: center;
        padding: 0 12px;
        color: #7b8798;
        font-size: .63rem;
    }

    .cx9-quick-panel .cx9-panel-head {
        border-bottom: 0;
        padding-bottom: 8px;
    }

    .cx9-quick-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        padding: 0 12px 12px;
    }

    .cx9-quick-action {
        min-height: 76px;
        display: grid;
        grid-template-columns: 43px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 10px;
        border: 1px solid var(--cx9-border);
        border-radius: 9px;
        background: #fff;
        color: var(--cx9-text);
        text-align: left;
        font: inherit;
        cursor: pointer;
        transition:
            border-color .15s ease,
            transform .15s ease,
            box-shadow .15s ease;
    }

    .cx9-quick-action:hover {
        border-color: #c9d9f2;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(34, 78, 136, .06);
    }

    .cx9-quick-icon {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 10px;
    }

    .cx9-quick-icon svg {
        width: 22px;
        height: 22px;
    }

    .cx9-quick-icon.green {
        background: #eaf8f0;
        color: #22a65c;
    }

    .cx9-quick-icon.blue {
        background: #eaf3ff;
        color: #1768e8;
    }

    .cx9-quick-icon.violet {
        background: #f2edff;
        color: #7750d4;
    }

    .cx9-quick-icon.amber {
        background: #fff1df;
        color: #e58d0d;
    }

    .cx9-quick-icon.cyan {
        background: #e8f8f8;
        color: #199ca1;
    }

    .cx9-quick-icon.red {
        background: #ffeded;
        color: #e13f3f;
    }

    .cx9-quick-action > span:last-child {
        min-width: 0;
        display: grid;
        gap: 3px;
    }

    .cx9-quick-action strong {
        color: var(--cx9-text);
        font-size: .73rem;
        font-weight: 800;
    }

    .cx9-quick-action small {
        color: #79869a;
        font-size: .62rem;
        font-weight: 560;
    }

    .cx9-recent-panel {
        margin: 12px 22px 22px;
    }

    .cx9-filterbar {
        display: grid;
        grid-template-columns: minmax(280px, 1fr) minmax(190px, 250px) max-content;
        gap: 8px;
        margin: 14px 22px 10px;
        padding: 10px;
        border: 1px solid var(--cx9-border);
        border-radius: 10px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .cx9-filter-actions {
        display: flex;
        align-items: stretch;
        justify-content: flex-end;
        gap: 8px;
        min-width: max-content;
    }

    .cx9-export {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 0 12px;
        border: 1px solid color-mix(in srgb, var(--corex-accent) 45%, var(--cx9-border));
        border-radius: 8px;
        background: color-mix(in srgb, var(--corex-accent) 9%, var(--cx9-card));
        color: var(--cx9-text);
        font: inherit;
        font-size: .68rem;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
    }

    .cx9-export:hover {
        background: color-mix(in srgb, var(--corex-accent) 15%, var(--cx9-card));
        border-color: color-mix(in srgb, var(--corex-accent) 62%, var(--cx9-border));
    }

    .cx9-export svg {
        width: 15px;
        height: 15px;
        color: var(--corex-accent);
        flex: 0 0 auto;
    }

    .cx9-search-box {
        min-width: 0;
        display: grid;
        grid-template-columns: 18px minmax(0, 1fr);
        align-items: center;
        gap: 7px;
        min-height: 38px;
        padding: 0 10px;
        border: 1px solid var(--cx9-border);
        border-radius: 8px;
        background: #fff;
        color: #8290a4;
    }

    .cx9-search-box svg {
        width: 17px;
        height: 17px;
    }

    .cx9-search-box input {
        min-width: 0;
        width: 100%;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--cx9-text);
        font: inherit;
        font-size: .7rem;
    }

    .cx9-filterbar select,
    .cx9-refresh {
        min-height: 38px;
        border: 1px solid var(--cx9-border);
        border-radius: 8px;
        background: #fff;
        color: #34435a;
        font: inherit;
        font-size: .68rem;
        font-weight: 650;
    }

    .cx9-filterbar select {
        padding: 0 9px;
    }

    .cx9-refresh {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 11px;
        cursor: pointer;
    }

    .cx9-refresh svg {
        width: 15px;
        height: 15px;
    }

    .cx9-tab-card {
        margin: 0 22px 22px;
        border-color: var(--cx9-border);
        border-radius: 11px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .wcv3-data-card {
        margin: 0 22px 22px;
        border-color: var(--cx9-border);
        border-radius: 11px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .wcv3-data-title {
        background: #fff;
    }

    .wcv3-data-title small {
        color: var(--cx9-blue);
    }

    .wcv3-data-title h2 {
        color: var(--cx9-text);
    }

    .wcv3-data-title p {
        color: var(--cx9-muted);
    }

    .wcv3-table.professional th {
        background: #fafbfd;
        color: #405069;
    }

    .wcv3-table.professional td {
        border-bottom-color: #edf0f5;
        color: #26354b;
    }

    .wcv3-table.professional tbody tr:nth-child(even) {
        background: #fcfdff;
    }

    .wcv3-table.professional tbody tr:hover {
        background: #f8fbff;
    }

    .wcv3-code,
    .wcv3-ref-pill,
    .wcv3-part-no,
    .transaction-cell strong {
        color: var(--cx9-blue);
    }

    .cx9-lowstock-full {
        min-width: 1160px;
    }

    .cx9-empty {
        height: 92px;
        color: #8490a2;
        text-align: center !important;
    }

    .cx9-ref-no {
        color: #34435a;
        font-size: .66rem;
        font-weight: 780;
    }

    .cx9-table .positive {
        color: #169a57;
        font-weight: 820;
    }

    .cx9-table .negative {
        color: #e13b3b;
        font-weight: 820;
    }

    .cx9-table .neutral {
        color: #475569;
        font-weight: 760;
    }

    /* Align popups with the same premium visual language. */
    .wcv3-modal-backdrop {
        background: rgba(14, 27, 47, .52);
    }

    .wcv3-modal {
        border-color: #dfe5ee;
        border-radius: 13px;
        background: #fff;
        color: var(--cx9-text);
        box-shadow: 0 24px 70px rgba(15, 30, 55, .22);
    }

    .wcv3-modal header,
    .wcv3-modal footer {
        background: #fff;
        border-color: #e7ebf2;
    }

    .wcv3-modal header small {
        color: var(--cx9-blue);
    }

    .wcv3-modal header h2 {
        color: var(--cx9-text);
    }

    .wcv3-button.primary {
        border-color: var(--cx9-blue);
        background: var(--cx9-blue);
        color: #fff;
    }

    .wcv3-button.primary:hover {
        background: #0f5fdc;
    }

    .wcv3-form-grid input,
    .wcv3-form-grid select,
    .wcv3-form-grid textarea,
    .wcv3-item-search > input,
    .wcv3-line-table input,
    .wcv3-line-table select {
        border-color: #dfe5ee;
        background: #fff;
        color: var(--cx9-text);
    }

    .wcv3-item-search,
    .wcv3-document-totals,
    .wcv3-modal footer {
        background: #fafbfd;
    }



    /* =========================================================
       v3.11 - COREX System Theme Binding
       Layout stays premium; surfaces/controls follow system theme.
       Icons keep a fixed palette.
       ========================================================= */

    .wcv3-page,
    .wcv3-page * {
        scrollbar-color:
            color-mix(in srgb, var(--corex-muted) 42%, transparent)
            var(--corex-surface-2);
    }

    .cx9-page-header,
    .cx9-nav,
    .cx9-kpi-card,
    .cx9-panel,
    .cx9-filterbar,
    .wcv3-data-card,
    .cx9-tab-card,
    .wcv3-card,
    .wcv3-modal,
    .wcv3-modal header,
    .wcv3-modal footer {
        background: var(--corex-surface);
        border-color: var(--corex-border);
        color: var(--corex-text);
        box-shadow: var(--corex-shadow);
    }

    .wcv3-page,
    .wcv3-document-body,
    .wcv3-modal-body,
    .wcv3-item-search,
    .wcv3-document-totals {
        background: var(--corex-bg);
        color: var(--corex-text);
    }

    .cx9-title-wrap h1,
    .cx9-kpi-card strong,
    .cx9-panel-head h2,
    .cx9-quick-action strong,
    .cx9-two-line strong,
    .cx9-table .strong,
    .wcv3-data-title h2,
    .wcv3-cell-main,
    .wcv3-part-no,
    .wcv3-value-cell strong,
    .wcv3-modal header h2,
    .wcv3-modal label > span,
    .wcv3-modal strong {
        color: var(--corex-text);
    }

    .cx9-title-wrap p,
    .cx9-kpi-card small,
    .cx9-two-line span,
    .cx9-desc,
    .cx9-table-footer,
    .cx9-quick-action small,
    .wcv3-data-title p,
    .wcv3-cell-sub,
    .wcv3-field-hint,
    .wcv3-modal small,
    .wcv3-modal .hint {
        color: var(--corex-muted);
    }

    .cx9-context-chip,
    .cx9-quick-action,
    .cx9-search-box,
    .cx9-filterbar select,
    .cx9-refresh,
    .wcv3-material-edit,
    .wcv3-edit-mini,
    .wcv3-print-mini,
    .wcv3-button.secondary,
    .wcv3-button.ghost,
    .wcv3-modal input,
    .wcv3-modal select,
    .wcv3-modal textarea,
    .wcv3-item-search > input,
    .wcv3-line-table input,
    .wcv3-line-table select,
    .wcv3-form-grid input,
    .wcv3-form-grid select,
    .wcv3-form-grid textarea {
        background: var(--corex-surface);
        border-color: var(--corex-border);
        color: var(--corex-text);
    }

    .cx9-search-box input {
        background: transparent;
        color: var(--corex-text);
    }

    .cx9-search-box input::placeholder,
    .wcv3-modal input::placeholder,
    .wcv3-modal textarea::placeholder,
    .wcv3-item-search > input::placeholder {
        color: color-mix(in srgb, var(--corex-muted) 78%, transparent);
        opacity: 1;
    }

    /*
       Native dropdown menu follows COREX surface/text colors.
       This applies to Add Material, Goods Issue, Receive, Transfer,
       Adjustment, filters and WHM Unit dropdowns.
    */
    .wcv3-page select,
    .wcv3-modal select,
    .cx9-filterbar select {
        background-color: var(--corex-surface);
        color: var(--corex-text);
        border-color: var(--corex-border);
    }

    .wcv3-page select option,
    .wcv3-modal select option,
    .cx9-filterbar select option,
    .wcv3-page datalist option {
        background: var(--corex-surface);
        color: var(--corex-text);
    }

    .wcv3-page select:focus,
    .wcv3-page input:focus,
    .wcv3-page textarea:focus,
    .wcv3-modal select:focus,
    .wcv3-modal input:focus,
    .wcv3-modal textarea:focus {
        outline: none;
        border-color: var(--corex-primary);
        box-shadow:
            0 0 0 2px
            color-mix(in srgb, var(--corex-primary) 18%, transparent);
    }

    .cx9-table th,
    .wcv3-table.professional th,
    .wcv3-line-table th {
        background: var(--corex-surface-2);
        border-color: var(--corex-border);
        color: var(--corex-muted);
    }

    .cx9-table td,
    .wcv3-table.professional td,
    .wcv3-line-table td {
        background: var(--corex-surface);
        border-color: var(--corex-border);
        color: var(--corex-text);
    }

    .cx9-table tbody tr:hover td,
    .wcv3-table.professional tbody tr:hover td,
    .wcv3-line-table tbody tr:hover td {
        background:
            color-mix(
                in srgb,
                var(--corex-primary) 6%,
                var(--corex-surface));
    }

    .wcv3-table.professional tbody tr:nth-child(even) td,
    .cx9-table tbody tr:nth-child(even) td {
        background:
            color-mix(
                in srgb,
                var(--corex-surface-2) 48%,
                var(--corex-surface));
    }

    .cx9-table tbody tr:nth-child(even):hover td,
    .wcv3-table.professional tbody tr:nth-child(even):hover td {
        background:
            color-mix(
                in srgb,
                var(--corex-primary) 6%,
                var(--corex-surface));
    }

    .cx9-add-material,
    .wcv3-button.primary {
        background: var(--corex-primary);
        border-color: var(--corex-primary);
        color: #fff;
    }

    .cx9-add-material:hover,
    .wcv3-button.primary:hover {
        background: var(--corex-primary-dark);
        border-color: var(--corex-primary-dark);
    }

    .cx9-nav-item,
    .cx9-nav-action {
        color: var(--corex-text);
    }

    .cx9-nav-item:hover,
    .cx9-nav-action:hover {
        background:
            color-mix(
                in srgb,
                var(--corex-primary) 6%,
                var(--corex-surface));
        color: var(--corex-primary);
    }

    .cx9-nav-item.active {
        color: var(--corex-primary);
    }

    .cx9-nav-item.active::after {
        background: var(--corex-primary);
    }

    .cx9-link-button,
    .cx9-item-link,
    .cx9-item-code,
    .wcv3-code,
    .wcv3-ref-pill,
    .transaction-cell strong {
        color: var(--corex-primary);
    }

    .wcv3-table-meta,
    .wcv3-spec-grid > span,
    .wcv3-ref-pill,
    .wcv3-soft-badge,
    .wcv3-edit-lock-note,
    .wcv3-nonstock-panel {
        background: var(--corex-surface-2);
        border-color: var(--corex-border);
        color: var(--corex-text);
    }

    .wcv3-modal-backdrop {
        background: rgba(8, 15, 28, .58);
    }

    .wcv3-modal footer,
    .wcv3-item-search,
    .wcv3-document-totals {
        background: var(--corex-surface-2);
        border-color: var(--corex-border);
    }

    .wcv3-modal input:disabled,
    .wcv3-modal select:disabled,
    .wcv3-modal textarea:disabled,
    .wcv3-modal input[readonly] {
        background:
            color-mix(
                in srgb,
                var(--corex-surface-2) 78%,
                var(--corex-surface));
        color: var(--corex-muted);
        opacity: 1;
    }

    /* Fixed icon palette - intentionally independent from system theme */
    .cx9-title-icon {
        background: #eef5ff;
        color: var(--cx9-icon-blue);
    }

    .cx9-kpi-icon.blue,
    .cx9-quick-icon.blue {
        background: #eaf3ff;
        color: var(--cx9-icon-blue);
    }

    .cx9-kpi-icon.green,
    .cx9-quick-icon.green {
        background: #eaf8f0;
        color: var(--cx9-icon-green);
    }

    .cx9-kpi-icon.amber,
    .cx9-quick-icon.amber {
        background: #fff4dd;
        color: var(--cx9-icon-amber);
    }

    .cx9-kpi-icon.red,
    .cx9-quick-icon.red {
        background: #ffeded;
        color: var(--cx9-icon-red);
    }

    .cx9-kpi-icon.violet,
    .cx9-quick-icon.violet {
        background: #f1ebff;
        color: var(--cx9-icon-violet);
    }

    .cx9-quick-icon.cyan {
        background: #e8f8f8;
        color: var(--cx9-icon-cyan);
    }

    /* Navigation SVG icons remain fixed as requested */
    .cx9-nav-item svg,
    .cx9-nav-action svg {
        color: #64748b;
    }

    .cx9-nav-item.active svg {
        color: #1768e8;
    }

    /* Semantic status colors remain fixed for instant recognition */
    .cx9-stock-state.low {
        background: #fff2df;
        border-color: #ffdba6;
        color: #e48a00;
    }

    .cx9-stock-state.out {
        background: #ffeded;
        border-color: #ffcaca;
        color: #e13838;
    }

    .cx9-tx-badge.receive {
        background: #e8f8ef;
        color: #168a4e;
    }

    .cx9-tx-badge.issue {
        background: #eaf3ff;
        color: #1768e8;
    }

    .cx9-tx-badge.transfer {
        background: #f2edff;
        color: #7950cf;
    }

    .cx9-tx-badge.adjustment {
        background: #fff1df;
        color: #dd8500;
    }

    .cx9-table .positive {
        color: var(--corex-success);
    }

    .cx9-table .negative {
        color: var(--corex-danger);
    }



    /* v3.13 - Material visibility in WHM Report */
    .report-visibility-check {
        min-height: 58px;
    }

    .report-visibility-check small {
        display: block;
        margin-top: 2px;
        color: var(--corex-muted);
        font-size: .62rem;
        font-weight: 560;
    }

    /* =========================================================
       v3.14 - Pending WHM Report Issue Requests
       ========================================================= */

    .cx9-nav-badge.pending {
        background: #fff3d8;
        color: #c97700;
    }

    .cx14-pending-card {
        overflow: hidden;
    }

    .cx14-pending-head-actions {
        display: flex;
        align-items: center;
        gap: 9px;
    }

    .cx14-pending-note {
        margin: 0 14px 12px;
        padding: 9px 11px;
        border: 1px solid
            color-mix(
                in srgb,
                var(--corex-warning) 34%,
                var(--corex-border));
        border-radius: 8px;
        background:
            color-mix(
                in srgb,
                var(--corex-warning) 7%,
                var(--corex-surface));
        color: var(--corex-muted);
        font-size: .68rem;
        line-height: 1.45;
    }

    .cx14-pending-table {
        min-width: 1080px;
    }

    .cx14-report-no {
        color: var(--corex-primary);
        font-weight: 850;
    }

    .cx14-pending-status {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 24px;
        padding: 0 8px;
        border-radius: 999px;
        font-size: .62rem;
        font-weight: 820;
        white-space: nowrap;
    }

    .cx14-pending-status.pending {
        border: 1px solid #f3cc78;
        background: #fff3d8;
        color: #a95f00;
    }

    .cx14-pending-status.processing {
        border: 1px solid #b9d2ff;
        background: #eaf3ff;
        color: #1768e8;
    }

    .cx14-open-request {
        min-height: 32px;
        padding: 0 11px;
        border: 1px solid var(--corex-primary);
        border-radius: 8px;
        background: var(--corex-primary);
        color: #fff;
        font: inherit;
        font-size: .65rem;
        font-weight: 800;
        cursor: pointer;
        white-space: nowrap;
    }

    .cx14-open-request:hover {
        background: var(--corex-primary-dark);
        border-color: var(--corex-primary-dark);
    }

    .cx14-open-request:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

    @media (max-width: 700px) {
        .cx14-pending-head-actions {
            width: 100%;
            align-items: stretch;
            flex-direction: column;
        }
    }

    /* =========================================================
       v3.12 - Reusable Shipped To Directory
       ========================================================= */

    .wcv3-shipped-to-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 38px;
        gap: 6px;
        align-items: stretch;
    }

    .wcv3-shipped-to-row select {
        min-width: 0;
        width: 100%;
    }

    .wcv3-recipient-add {
        width: 38px;
        min-height: 38px;
        display: grid;
        place-items: center;
        border: 1px solid var(--corex-border);
        border-radius: var(--corex-button-radius);
        background: var(--corex-primary);
        color: #fff;
        font: inherit;
        font-size: 1.25rem;
        font-weight: 800;
        line-height: 1;
        cursor: pointer;
    }

    .wcv3-recipient-add:hover {
        background: var(--corex-primary-dark);
        border-color: var(--corex-primary-dark);
    }

    .wcv3-recipient-backdrop {
        position: fixed;
        inset: 0;
        z-index: 10050;
        display: grid;
        place-items: center;
        padding: 18px;
        background: rgba(8, 15, 28, .58);
    }

    .wcv3-recipient-modal {
        width: min(620px, calc(100vw - 28px));
        max-height: min(760px, calc(100vh - 36px));
        display: grid;
        grid-template-rows: auto auto auto minmax(0, 1fr);
        overflow: hidden;
        border: 1px solid var(--corex-border);
        border-radius: 13px;
        background: var(--corex-surface);
        color: var(--corex-text);
        box-shadow: var(--corex-shadow);
    }

    .wcv3-recipient-modal > header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        padding: 16px 17px;
        border-bottom: 1px solid var(--corex-border);
        background: var(--corex-surface);
    }

    .wcv3-recipient-modal header > div {
        min-width: 0;
        display: grid;
        gap: 3px;
    }

    .wcv3-recipient-modal header small {
        color: var(--corex-primary);
        font-size: .62rem;
        font-weight: 850;
        letter-spacing: .08em;
    }

    .wcv3-recipient-modal header h3 {
        margin: 0;
        color: var(--corex-text);
        font-size: 1rem;
        font-weight: 820;
    }

    .wcv3-recipient-modal header p {
        margin: 2px 0 0;
        color: var(--corex-muted);
        font-size: .69rem;
    }

    .wcv3-recipient-modal header > button {
        width: 32px;
        height: 32px;
        border: 1px solid var(--corex-border);
        border-radius: 8px;
        background: var(--corex-surface);
        color: var(--corex-muted);
        font: inherit;
        font-size: 1.1rem;
        cursor: pointer;
    }

    .wcv3-recipient-error {
        margin: 12px 14px 0;
        padding: 9px 10px;
        border: 1px solid color-mix(in srgb, var(--corex-danger) 38%, var(--corex-border));
        border-radius: 8px;
        background: color-mix(in srgb, var(--corex-danger) 8%, var(--corex-surface));
        color: var(--corex-danger);
        font-size: .7rem;
        font-weight: 700;
    }

    .wcv3-recipient-create {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 14px;
        border-bottom: 1px solid var(--corex-border);
    }

    .wcv3-recipient-create input {
        min-width: 0;
        min-height: 40px;
        padding: 0 11px;
        border: 1px solid var(--corex-border);
        border-radius: 8px;
        background: var(--corex-surface);
        color: var(--corex-text);
        font: inherit;
        font-size: .73rem;
    }

    .wcv3-recipient-create input:focus {
        outline: none;
        border-color: var(--corex-primary);
        box-shadow:
            0 0 0 2px
            color-mix(in srgb, var(--corex-primary) 18%, transparent);
    }

    .wcv3-recipient-create button {
        min-width: 86px;
        min-height: 40px;
        padding: 0 14px;
        border: 1px solid var(--corex-primary);
        border-radius: 8px;
        background: var(--corex-primary);
        color: #fff;
        font: inherit;
        font-size: .72rem;
        font-weight: 800;
        cursor: pointer;
    }

    .wcv3-recipient-create button:disabled {
        opacity: .6;
        cursor: wait;
    }

    .wcv3-recipient-list {
        min-height: 0;
        overflow: auto;
        padding: 10px 14px 14px;
        background: var(--corex-surface);
    }

    .wcv3-recipient-list-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 5px 2px 9px;
    }

    .wcv3-recipient-list-head strong {
        color: var(--corex-text);
        font-size: .72rem;
    }

    .wcv3-recipient-list-head span {
        color: var(--corex-muted);
        font-size: .64rem;
    }

    .wcv3-recipient-item {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 34px;
        gap: 6px;
        padding: 5px 0;
        border-bottom: 1px solid
            color-mix(in srgb, var(--corex-border) 72%, transparent);
    }

    .wcv3-recipient-name,
    .wcv3-recipient-remove {
        min-height: 36px;
        border: 1px solid var(--corex-border);
        border-radius: 7px;
        background: var(--corex-surface-2);
        color: var(--corex-text);
        font: inherit;
        cursor: pointer;
    }

    .wcv3-recipient-name {
        padding: 0 10px;
        text-align: left;
        font-size: .72rem;
        font-weight: 720;
    }

    .wcv3-recipient-name:hover {
        border-color: var(--corex-primary);
        color: var(--corex-primary);
    }

    .wcv3-recipient-remove {
        color: var(--corex-danger);
        font-size: 1rem;
        font-weight: 800;
    }

    .wcv3-recipient-remove:hover {
        border-color: var(--corex-danger);
        background:
            color-mix(
                in srgb,
                var(--corex-danger) 7%,
                var(--corex-surface));
    }

    .wcv3-recipient-empty {
        min-height: 90px;
        display: grid;
        place-items: center;
        color: var(--corex-muted);
        font-size: .7rem;
        text-align: center;
    }

    .cx9-unit-store-button {
        appearance: none;
        cursor: pointer;
        font: inherit;
    }

    .wcv3-report-request-banner {
        display: grid;
        gap: 12px;
        margin-bottom: 14px;
        padding: 14px 16px;
        color: var(--corex-text);
        background: var(--corex-primary-light, var(--corex-surface-soft));
        border: 1px solid var(--corex-border);
        border-left: 4px solid var(--corex-primary);
        border-radius: 14px;
    }

    .wcv3-report-request-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .wcv3-report-request-title span {
        color: var(--corex-primary);
        font-size: 11px;
        font-weight: 850;
        letter-spacing: .08em;
    }

    .wcv3-report-request-title strong {
        font-size: 18px;
    }

    .wcv3-report-request-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .wcv3-report-request-grid > div {
        display: grid;
        gap: 3px;
        padding: 9px 10px;
        background: var(--corex-surface);
        border: 1px solid var(--corex-border);
        border-radius: 10px;
    }

    .wcv3-report-request-grid small {
        color: var(--corex-muted);
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .wcv3-report-request-banner p {
        margin: 0;
        color: var(--corex-muted);
        line-height: 1.45;
    }

    .wcv3-line-table .report-qty-col,
    .wcv3-line-table .report-qty-cell {
        background: var(--corex-surface-soft);
        font-weight: 800;
        white-space: nowrap;
    }

    @media (max-width: 900px) {
        .wcv3-report-request-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 560px) {
        .wcv3-report-request-grid {
            grid-template-columns: 1fr;
        }
    }

    /* Goods Issue / Report Issue Request - Client Report line selector */
    .manual-client-col {
        width: 76px;
        min-width: 76px;
        text-align: center !important;
        color: var(--corex-primary-dark) !important;
        font-weight: 900 !important;
    }

    .manual-client-cell {
        width: 76px;
        min-width: 76px;
        text-align: center !important;
    }

    .manual-client-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 32px;
        padding: 4px 6px;
        border: 1px solid var(--corex-border);
        border-radius: 8px;
        background: var(--corex-surface-2);
        color: var(--corex-text);
        font-size: .64rem;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
    }

    .manual-client-toggle input {
        width: 16px !important;
        min-width: 16px !important;
        height: 16px;
        min-height: 16px !important;
        margin: 0;
        padding: 0;
        cursor: pointer;
        accent-color: var(--corex-primary);
    }

    .wcv3-modal.issue-wide-modal {
        width: calc(100vw - 8px) !important;
        max-width: none !important;
        margin-inline: 4px !important;
    }

    .wcv3-modal.issue-wide-modal .wcv3-lines {
        width: 100%;
        overflow-x: hidden !important;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed;
        font-size: .70rem;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines th,
    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines td {
        padding: 6px 5px;
        min-width: 0 !important;
        overflow-wrap: anywhere;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines input {
        width: 100%;
        min-width: 0 !important;
        padding: 5px 6px;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines .desc-cell {
        min-width: 0 !important;
        max-width: none !important;
        white-space: normal;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines .availability {
        min-width: 0 !important;
        white-space: nowrap;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines td:first-child {
        min-width: 0 !important;
    }

    /* v3.10 - Wider Goods Issue workspace */
    .wcv3-modal.issue-wide-modal {
        width: calc(100vw - 10px);
        max-width: 1880px;
        max-height: 97vh;
    }

    .wcv3-modal.issue-wide-modal .wcv3-document-body {
        max-height: calc(97vh - 118px);
    }

    .wcv3-modal.issue-wide-modal .wcv3-form-grid.header-grid {
        gap: 11px;
        padding: 12px 14px;
    }

    .wcv3-modal.issue-wide-modal .wcv3-item-search {
        padding-left: 14px;
        padding-right: 14px;
    }

    .wcv3-modal.issue-wide-modal .wcv3-line-table.issue-lines {
        width: 100%;
        min-width: 0;
    }

    @media (max-width: 1200px) {
        .wcv3-kpis {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

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

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

    @media (max-width: 760px) {
        .wcv3-header {
            flex-direction: column;
        }

        .wcv3-header-actions {
            width: 100%;
        }

        .wcv3-header-actions .wcv3-button {
            flex: 1;
        }

        .wcv3-kpis,
        .wcv3-action-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

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

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

        .wcv3-form-grid label.wide {
            grid-column: auto;
        }

        .wcv3-document-totals {
            flex-wrap: wrap;
        }
    }

    @media (max-width: 480px) {
        .wcv3-page {
            padding: 10px;
        }

        .wcv3-kpis,
        .wcv3-action-grid {
            grid-template-columns: 1fr;
        }

        .wcv3-header-actions {
            flex-direction: column;
        }
    }

    @media (max-width: 1320px) {
        .cx9-kpi-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .cx9-overview-grid {
            grid-template-columns: 1fr;
        }

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

    @media (max-width: 850px) {
        .cx9-page-header {
            align-items: flex-start;
            flex-direction: column;
            padding: 14px 16px;
        }

        .cx9-header-actions {
            width: 100%;
        }

        .cx9-context-chip,
        .cx9-add-material {
            flex: 1;
            justify-content: center;
        }

        .cx9-nav {
            padding: 0 12px;
        }

        .cx9-kpi-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            padding: 12px 14px 0;
        }

        .cx9-overview-grid {
            padding: 10px 14px 0;
        }

        .cx9-recent-panel,
        .wcv3-data-card,
        .cx9-tab-card {
            margin-left: 14px;
            margin-right: 14px;
        }

        .cx9-filterbar {
            grid-template-columns: 1fr;
            margin-left: 14px;
            margin-right: 14px;
        }

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

    @media (max-width: 520px) {
        .cx9-title-wrap h1 {
            font-size: 1.35rem;
        }

        .cx9-title-icon {
            width: 42px;
            height: 42px;
        }

        .cx9-header-actions {
            flex-direction: column;
        }

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

        .cx9-quick-grid {
            grid-template-columns: 1fr;
        }
    }


    /* =========================================================
       v3.20 - Unified Page Edges / Desktop Alignment
       Visual layout only.
       Every major block follows one shared left/right gutter.
       ========================================================= */

    .wcv3-page {
        --cx20-page-gutter: 18px;

        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding:
            14px
            var(--cx20-page-gutter)
            22px !important;

        overflow-x: clip;
        background: var(--cx9-page);
    }

    /*
        Header + tabs now start and end on exactly the same vertical
        lines as the KPI cards, overview panels and recent transactions.
    */
    .cx9-page-header,
    .cx9-nav {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .cx9-page-header {
        min-height: 78px;
        padding: 15px 18px;
        border: 1px solid var(--cx9-border);
        border-radius: 12px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .cx9-nav {
        min-height: 52px;
        margin-top: 10px;
        padding: 0 10px;
        border: 1px solid var(--cx9-border);
        border-radius: 10px;
        background: var(--cx9-card);
        box-shadow: var(--cx9-shadow);
    }

    .cx9-nav-item,
    .cx9-nav-action {
        min-height: 52px;
    }

    /*
        Remove the old nested 22px side padding/margins.
        The page gutter above is now the single source of alignment.
    */
    .cx9-kpi-grid {
        width: 100%;
        max-width: 100%;
        padding:
            12px
            0
            0;
    }

    .cx9-overview-grid {
        width: 100%;
        max-width: 100%;
        padding:
            12px
            0
            0;
    }

    .cx9-recent-panel {
        width: 100%;
        max-width: 100%;
        margin:
            12px
            0
            0;
    }

    .cx9-filterbar {
        width: 100%;
        max-width: 100%;
        margin:
            12px
            0
            10px;
    }

    .wcv3-data-card,
    .cx9-tab-card {
        width: 100%;
        max-width: 100%;
        margin:
            0
            0
            18px;
    }

    .wcv3-message {
        width: 100%;
        max-width: 100%;
        margin:
            10px
            0
            0;
    }

    /*
        Shared Client Reports component follows the same page edge.
        No independent side offset is allowed.
    */
    .wcv3-page .cr16-shell {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin:
            12px
            0
            0;
    }

    /*
        Keep all direct cards/grids from creating a fractional overflow.
    */
    .cx9-kpi-grid > *,
    .cx9-overview-grid > *,
    .cx9-panel,
    .cx9-tab-card,
    .wcv3-data-card {
        min-width: 0;
    }

    /*
        Cleaner bottom edge: all overview blocks end on the same line.
    */
    .cx9-overview-grid + .cx9-recent-panel {
        margin-top: 12px;
    }

    /* Medium screens keep exactly one shared gutter. */
    @media (max-width: 850px) {
        .wcv3-page {
            --cx20-page-gutter: 12px;

            padding:
                12px
                var(--cx20-page-gutter)
                18px !important;
        }

        .cx9-page-header {
            padding:
                14px
                14px;
        }

        .cx9-nav {
            padding:
                0
                8px;
        }

        .cx9-kpi-grid,
        .cx9-overview-grid {
            padding-left: 0;
            padding-right: 0;
        }

        .cx9-recent-panel,
        .wcv3-data-card,
        .cx9-tab-card,
        .cx9-filterbar {
            margin-left: 0;
            margin-right: 0;
        }
    }

    /* Small screens use the same principle with a smaller gutter. */
    @media (max-width: 520px) {
        .wcv3-page {
            --cx20-page-gutter: 8px;

            padding:
                8px
                var(--cx20-page-gutter)
                14px !important;
        }

        .cx9-page-header,
        .cx9-nav {
            border-radius: 9px;
        }
    }



    /* =========================================================
       v3.12 - Modal safety + viewport scrolling
       - Backdrop clicks never close data-entry popups.
       - Header/footer stay visible.
       - Long popup content scrolls vertically inside the modal.
       - Wide tables scroll horizontally inside their own wrapper,
         never on the application/page viewport.
       ========================================================= */

    .wcv3-modal-backdrop,
    .wcv3-recipient-backdrop {
        overflow: hidden;
        overscroll-behavior: none;
    }

    .wcv3-modal {
        width: min(1480px, calc(100vw - 32px));
        max-width: calc(100vw - 32px);
        max-height: calc(100dvh - 32px);
        min-width: 0;
        min-height: 0;
    }

    .wcv3-modal.material-modal {
        width: min(900px, calc(100vw - 32px));
    }

    .wcv3-modal.document-modal,
    .wcv3-modal.issue-wide-modal {
        width: min(1480px, calc(100vw - 32px));
    }

    .wcv3-modal > header,
    .wcv3-modal > footer {
        flex: 0 0 auto;
        position: relative;
        z-index: 3;
    }

    /* Add Material uses the form grid itself as the scrollable body. */
    .wcv3-modal > .wcv3-form-grid.material-form {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    /* Receive / Issue / Transfer / Adjustment body. */
    .wcv3-document-body {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        min-height: 0;
        max-width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }

    .wcv3-document-header,
    .wcv3-item-search,
    .wcv3-lines,
    .wcv3-document-totals {
        min-width: 0;
        max-width: 100%;
    }

    .wcv3-lines {
        width: 100%;
        overflow: hidden;
    }

    .wcv3-lines > .wcv3-table-wrap {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .wcv3-line-table {
        max-width: none;
    }

    /* Keep totals visible as part of the scrollable document content,
       while the action footer remains fixed at the bottom of the modal. */
    .wcv3-document-totals {
        position: relative;
        z-index: 1;
    }

    /* Recipient manager: backdrop is inert; only explicit buttons close it. */
    .wcv3-recipient-modal {
        max-width: calc(100vw - 32px);
        max-height: calc(100dvh - 32px);
        min-width: 0;
        min-height: 0;
    }

    @media (max-width: 700px) {
        .wcv3-modal-backdrop,
        .wcv3-recipient-backdrop {
            padding: 8px;
        }

        .wcv3-modal,
        .wcv3-modal.material-modal,
        .wcv3-modal.document-modal,
        .wcv3-modal.issue-wide-modal,
        .wcv3-recipient-modal {
            width: calc(100vw - 16px);
            max-width: calc(100vw - 16px);
            max-height: calc(100dvh - 16px);
        }
    }


    /* =========================================================
       v3.13 - HARD FIX: transaction modal vertical scrolling
       The modal gets a real viewport height and the fieldset body
       is the only flex region allowed to grow/shrink and scroll.
       This prevents added item rows from disappearing behind the
       fixed action footer and keeps every row editable.
       ========================================================= */

    .wcv3-modal.document-modal,
    .wcv3-modal.issue-wide-modal {
        height: calc(100dvh - 32px);
        max-height: calc(100dvh - 32px);
        overflow: hidden !important;
    }

    .wcv3-modal.document-modal > .wcv3-document-body,
    .wcv3-modal.issue-wide-modal > .wcv3-document-body {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: 0 !important;
        max-height: none !important;
        width: 100%;
        overflow-y: scroll !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        -webkit-overflow-scrolling: touch;
    }

    .wcv3-modal.document-modal > header,
    .wcv3-modal.document-modal > footer,
    .wcv3-modal.issue-wide-modal > header,
    .wcv3-modal.issue-wide-modal > footer {
        flex: 0 0 auto !important;
    }

    .wcv3-document-body > .wcv3-document-header,
    .wcv3-document-body > .wcv3-item-search,
    .wcv3-document-body > .wcv3-lines,
    .wcv3-document-body > .wcv3-document-totals {
        flex: none;
        min-height: auto;
    }

    .wcv3-document-body .wcv3-lines {
        overflow: visible !important;
    }

    .wcv3-document-body .wcv3-table-wrap {
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: visible !important;
    }

    /* Make sure the last item row/totals are never covered by footer. */
    .wcv3-document-totals {
        margin-bottom: 8px;
    }

    @media (max-width: 700px) {
        .wcv3-modal.document-modal,
        .wcv3-modal.issue-wide-modal {
            height: calc(100dvh - 16px);
            max-height: calc(100dvh - 16px);
        }
    }


    /* FINAL Goods Issue desktop width override */
    @media (min-width: 1100px) {
        .wcv3-modal.issue-wide-modal {
            width: calc(100vw - 4px) !important;
            max-width: none !important;
            margin: 2px !important;
        }

        .wcv3-modal.issue-wide-modal .wcv3-lines {
            overflow-x: hidden !important;
        }

        .wcv3-modal.issue-wide-modal table.wcv3-line-table.issue-lines {
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            table-layout: fixed !important;
        }

        .wcv3-modal.issue-wide-modal table.wcv3-line-table.issue-lines th,
        .wcv3-modal.issue-wide-modal table.wcv3-line-table.issue-lines td {
            min-width: 0 !important;
            padding-left: 4px !important;
            padding-right: 4px !important;
        }

        .wcv3-modal.issue-wide-modal table.wcv3-line-table.issue-lines input {
            min-width: 0 !important;
        }
    }


    /* =========================================================
       WHM Report Issue Request - compact professional popup
       Keeps the normal manual Goods Issue layout unchanged.
       ========================================================= */

    .wcv3-modal.report-issue-modal {
        width: min(1280px, calc(100vw - 72px)) !important;
        max-width: 1280px !important;
        height: min(760px, calc(100dvh - 72px)) !important;
        max-height: calc(100dvh - 72px) !important;
        margin: auto !important;
        overflow: hidden !important;
        border-radius: 16px;
    }

    .wcv3-modal.report-issue-modal > header {
        min-height: 58px;
        padding: 9px 14px;
    }

    .wcv3-modal.report-issue-modal > header h2 {
        margin-top: 2px;
        font-size: 1rem;
    }

    .wcv3-modal.report-issue-modal > .wcv3-document-body {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-banner {
        gap: 7px;
        margin: 10px 12px 8px;
        padding: 9px 10px;
        border-radius: 11px;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-title strong {
        font-size: .95rem;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-grid > div {
        gap: 2px;
        padding: 6px 8px;
        border-radius: 8px;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-grid small {
        font-size: .58rem;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-grid strong {
        overflow: hidden;
        font-size: .72rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wcv3-modal.report-issue-modal .wcv3-report-request-banner p {
        font-size: .67rem;
        line-height: 1.3;
    }

    .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px 9px;
        padding: 9px 12px;
    }

    .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid label > span {
        font-size: .64rem;
    }

    .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid input,
    .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid select,
    .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid textarea {
        min-height: 34px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid textarea {
        min-height: 54px;
    }

    .wcv3-modal.report-issue-modal .wcv3-field-hint {
        margin-top: 2px;
        font-size: .60rem;
    }

    .wcv3-modal.report-issue-modal .wcv3-item-search {
        padding: 8px 10px;
    }

    .wcv3-modal.report-issue-modal .wcv3-item-search-head {
        margin-bottom: 5px;
    }

    .wcv3-modal.report-issue-modal .wcv3-search-results {
        max-height: 170px;
    }

    .wcv3-modal.report-issue-modal .wcv3-table-wrap {
        overflow-x: auto !important;
    }

    .wcv3-modal.report-issue-modal table.wcv3-line-table.issue-lines {
        width: max-content;
        min-width: 1460px;
        font-size: .69rem;
        table-layout: auto;
    }

    .wcv3-modal.report-issue-modal table.wcv3-line-table.issue-lines th,
    .wcv3-modal.report-issue-modal table.wcv3-line-table.issue-lines td {
        padding: 6px;
    }

    .wcv3-modal.report-issue-modal table.wcv3-line-table.issue-lines input {
        min-width: 78px;
        padding: 5px 6px;
    }

    .wcv3-modal.report-issue-modal .wcv3-document-totals {
        padding: 8px 10px;
        margin-bottom: 0;
    }

    .wcv3-modal.report-issue-modal > footer {
        padding: 8px 12px;
    }

    @media (max-width: 900px) {
        .wcv3-modal.report-issue-modal {
            width: calc(100vw - 24px) !important;
            max-width: calc(100vw - 24px) !important;
            height: calc(100dvh - 24px) !important;
            max-height: calc(100dvh - 24px) !important;
        }

        .wcv3-modal.report-issue-modal .wcv3-report-request-grid,
        .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    @media (max-width: 560px) {
        .wcv3-modal.report-issue-modal {
            width: calc(100vw - 12px) !important;
            max-width: calc(100vw - 12px) !important;
            height: calc(100dvh - 12px) !important;
            max-height: calc(100dvh - 12px) !important;
        }

        .wcv3-modal.report-issue-modal .wcv3-report-request-grid,
        .wcv3-modal.report-issue-modal .wcv3-form-grid.header-grid {
            grid-template-columns: 1fr;
        }
    }

    .cx9-header-export {
        min-height: 40px;
        align-self: center;
    }

    .cx9-export:disabled {
        opacity: .58;
        cursor: not-allowed;
        transform: none;
    }

    .wcv3-page button:focus-visible,
    .wcv3-page a:focus-visible,
    .wcv3-page input:focus-visible,
    .wcv3-page select:focus-visible,
    .wcv3-page textarea:focus-visible,
    .wcv3-modal button:focus-visible,
    .wcv3-modal input:focus-visible,
    .wcv3-modal select:focus-visible,
    .wcv3-modal textarea:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--corex-accent) 48%, transparent);
        outline-offset: 2px;
    }

    @media (prefers-reduced-motion: reduce) {
        .wcv3-page *,
        .wcv3-modal *,
        .wcv3-modal-backdrop * {
            scroll-behavior: auto !important;
            animation-duration: .01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: .01ms !important;
        }
    }


/* Consumables loading progress. Theme colors follow the user's selection. */
.wcv3-page .wcv3-load-progress {
    width: min(100%, 380px);
    margin-top: 8px;
}
.wcv3-page .wcv3-load-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    text-align: left;
}
.wcv3-page .wcv3-load-caption strong {
    color: var(--corex-primary);
    font-variant-numeric: tabular-nums;
}
.wcv3-page .wcv3-load-progress progress {
    display: block;
    appearance: none;
    width: 100%;
    height: 9px;
    border: 0;
    border-radius: 99px;
    overflow: hidden;
    background: var(--corex-border);
    accent-color: var(--corex-primary);
}
.wcv3-page .wcv3-load-progress progress::-webkit-progress-bar {
    background: var(--corex-border);
    border-radius: 99px;
}
.wcv3-page .wcv3-load-progress progress::-webkit-progress-value {
    background: var(--corex-primary);
    border-radius: 99px;
    transition: width .2s ease;
}
.wcv3-page .wcv3-load-progress progress::-moz-progress-bar {
    background: var(--corex-primary);
    border-radius: 99px;
}
.wcv3-page .wcv3-load-progress small {
    display: block;
    margin-top: 8px;
    color: var(--corex-muted);
    font-size: .75rem;
}
