#screen-inventory .inv-tabs-nav {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 1rem;
    padding-bottom: .25rem;
}

#screen-inventory .inv-tabs-nav::-webkit-scrollbar {
    display: none;
}

#screen-inventory .inv-tab-btn {
    padding: .55rem 1rem;
    font-size: clamp(13px, 2.2vw, 15px);
    font-weight: 600;
    color: var(--text1);
    background: var(--white);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

#screen-inventory .inv-tab-btn.active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
    font-weight: 600;
}

#screen-inventory .inv-tab-panel {
    display: none;
}

#screen-inventory .inv-tab-panel.active {
    display: block;
}

#screen-inventory .inv-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

#screen-inventory .inv-subheader-title {
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: .35rem;
}

#screen-inventory .inv-subheader-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

#screen-inventory .inv-subheader-count {
    font-size: 13px;
    font-weight: 600;
    background: var(--border-soft);
    color: var(--text1);
    padding: .1rem .5rem;
    border-radius: 999px;
    margin-right: .25rem;
}

#screen-inventory .inv-status-summary {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

#screen-inventory .inv-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--white);
    font-size: 13px;
    font-weight: 500;
    color: var(--text1);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

#screen-inventory .inv-pill.active {
    border-color: var(--primary);
    background: var(--primary-1);
    color: var(--primary);
    font-weight: 600;
}

#screen-inventory .inv-pill-count {
    font-size: 12px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

#screen-inventory .inv-filter-clear {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: .3rem .5rem;
    white-space: nowrap;
}

#screen-inventory .inv-filter-field-search {
    flex: 1 1 280px;
}

#screen-inventory .inv-modal-status-banner {
    display: flex;
    align-items: center;
    padding: .4rem .75rem;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: .75rem;
}

#screen-inventory .inv-doc-no {
    font-weight: 600;
    color: var(--black);
}

#screen-inventory .inv-supplier-name {
    font-weight: 500;
}

#screen-inventory .inv-line-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--border-soft);
    font-size: 12px;
    font-weight: 600;
    color: var(--text1);
}

#screen-inventory .inv-row-total {
    font-weight: 600;
    color: var(--black);
}

#screen-inventory .inv-pct {
    font-size: 11px;
    color: var(--text1);
    font-weight: 400;
}

#screen-inventory .inv-line-num {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text1);
    min-width: 22px;
}

#screen-inventory .inv-footer-total {
    font-weight: 600;
    color: var(--primary);
}

#screen-inventory .inv-lines-error {
    display: block;
    margin-bottom: .25rem;
}

#screen-inventory .inv-list-table {
    padding: 0;
}

#screen-inventory [data-panel="uoms"] {
    padding-inline: .35rem;
}

#screen-inventory [data-panel="uoms"] .inv-subheader {
    margin-bottom: 1rem;
    padding-inline: .35rem;
}

#screen-inventory [data-panel="uoms"] .inv-subheader-title {
    color: var(--black);
}

#screen-inventory [data-panel="uoms"] .inv-subheader-actions .btn {
    min-height: 40px;
    padding-inline: 1rem;
    border-radius: 999px;
}

#screen-inventory .inv-list-table[data-cols="uom"] {
    border: 1px solid var(--border-soft);
    border-radius: var(--table-radius);
    background: var(--white);
    overflow: hidden;
}

#screen-inventory .inv-list-table[data-cols="uom"] .table-body {
    padding-inline: .35rem;
    padding-block: .35rem;
}

#screen-inventory .inv-list-table[data-cols="uom"] .table-row {
    border-radius: calc(var(--table-radius) - 4px);
}

#screen-inventory .inv-list-table[data-cols="uom"] .table-row > div {
    text-align: right;
    justify-content: flex-start;
}

#screen-inventory [data-panel="categories"] {
    padding-inline: .35rem;
}

#screen-inventory [data-panel="categories"] .inv-subheader {
    margin-bottom: 1rem;
    padding-inline: .35rem;
}

#screen-inventory [data-panel="categories"] .inv-subheader-title {
    color: var(--black);
}

#screen-inventory [data-panel="categories"] .inv-subheader-actions .btn {
    min-height: 40px;
    padding-inline: 1rem;
    border-radius: 999px;
}

#screen-inventory .inv-list-table[data-cols="category"] {
    border: 1px solid var(--border-soft);
    border-radius: var(--table-radius);
    background: var(--white);
    overflow: hidden;
}

#screen-inventory .inv-list-table[data-cols="category"] .table-body {
    padding-inline: .35rem;
    padding-block: .35rem;
}

#screen-inventory .inv-list-table[data-cols="category"] .table-row {
    border-radius: calc(var(--table-radius) - 4px);
}

#screen-inventory .inv-list-table[data-cols="category"] .table-row > div {
    text-align: right;
    justify-content: flex-start;
}

#screen-inventory [data-panel="locations"],
#screen-inventory [data-panel="items"],
#screen-inventory [data-panel="suppliers"],
#screen-inventory [data-panel="orders"],
#screen-inventory [data-panel="receipts"],
#screen-inventory [data-panel="eventOps"] {
    padding-inline: .35rem;
}

#screen-inventory [data-panel="locations"] .inv-subheader,
#screen-inventory [data-panel="items"] .inv-subheader,
#screen-inventory [data-panel="suppliers"] .inv-subheader,
#screen-inventory [data-panel="orders"] .inv-subheader,
#screen-inventory [data-panel="receipts"] .inv-subheader,
#screen-inventory [data-panel="eventOps"] .inv-subheader {
    margin-bottom: 1rem;
    padding-inline: .35rem;
}

#screen-inventory [data-panel="locations"] .inv-subheader-title,
#screen-inventory [data-panel="items"] .inv-subheader-title,
#screen-inventory [data-panel="suppliers"] .inv-subheader-title,
#screen-inventory [data-panel="orders"] .inv-subheader-title,
#screen-inventory [data-panel="receipts"] .inv-subheader-title,
#screen-inventory [data-panel="eventOps"] .inv-subheader-title {
    color: var(--black);
}

#screen-inventory [data-panel="locations"] .inv-subheader-actions .btn,
#screen-inventory [data-panel="items"] .inv-subheader-actions .btn,
#screen-inventory [data-panel="suppliers"] .inv-subheader-actions .btn,
#screen-inventory [data-panel="orders"] .inv-subheader-actions .btn,
#screen-inventory [data-panel="receipts"] .inv-subheader-actions .btn,
#screen-inventory [data-panel="eventOps"] .inv-subheader-actions .btn {
    min-height: 40px;
    padding-inline: 1rem;
    border-radius: 999px;
}

#screen-inventory [data-panel="items"] .inv-filter-bar,
#screen-inventory [data-panel="suppliers"] .inv-filter-bar,
#screen-inventory [data-panel="orders"] .inv-filter-bar,
#screen-inventory [data-panel="receipts"] .inv-filter-bar,
#screen-inventory [data-panel="eventOps"] .inv-filter-bar,
#screen-inventory [data-panel="orders"] .inv-status-summary {
    padding-inline: .35rem;
    margin-bottom: 1rem;
}

#screen-inventory .inv-list-table[data-cols="location"],
#screen-inventory .inv-list-table[data-cols="item"],
#screen-inventory .inv-list-table[data-cols="supplier"],
#screen-inventory .inv-list-table[data-cols="order"],
#screen-inventory .inv-list-table[data-cols="receipt"],
#screen-inventory .inv-list-table[data-cols="event-ops"] {
    border: 1px solid var(--border-soft);
    border-radius: var(--table-radius);
    background: var(--white);
    overflow: hidden;
}

#screen-inventory .inv-list-table[data-cols="location"] .table-body,
#screen-inventory .inv-list-table[data-cols="item"] .table-body,
#screen-inventory .inv-list-table[data-cols="supplier"] .table-body,
#screen-inventory .inv-list-table[data-cols="order"] .table-body,
#screen-inventory .inv-list-table[data-cols="receipt"] .table-body,
#screen-inventory .inv-list-table[data-cols="event-ops"] .table-body {
    padding-inline: .35rem;
    padding-block: .35rem;
}

#screen-inventory .inv-list-table[data-cols="location"] .table-row,
#screen-inventory .inv-list-table[data-cols="item"] .table-row,
#screen-inventory .inv-list-table[data-cols="supplier"] .table-row,
#screen-inventory .inv-list-table[data-cols="order"] .table-row,
#screen-inventory .inv-list-table[data-cols="receipt"] .table-row,
#screen-inventory .inv-list-table[data-cols="event-ops"] .table-row {
    border-radius: calc(var(--table-radius) - 4px);
}

#screen-inventory .inv-list-table[data-cols="location"] .table-row > div,
#screen-inventory .inv-list-table[data-cols="item"] .table-row > div,
#screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div,
#screen-inventory .inv-list-table[data-cols="order"] .table-row > div,
#screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div,
#screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div,
#screen-inventory .inv-list-table[data-cols="location"] .table-head > div,
#screen-inventory .inv-list-table[data-cols="item"] .table-head > div,
#screen-inventory .inv-list-table[data-cols="supplier"] .table-head > div,
#screen-inventory .inv-list-table[data-cols="order"] .table-head > div,
#screen-inventory .inv-list-table[data-cols="receipt"] .table-head > div,
#screen-inventory .inv-list-table[data-cols="event-ops"] .table-head > div {
    text-align: right;
    justify-content: flex-start;
}

#screen-inventory .inv-list-table[data-cols="order"] .inv-row-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

#screen-inventory .inv-list-table[data-cols="order"] .inv-status,
#screen-inventory .inv-list-table[data-cols="receipt"] .inv-status,
#screen-inventory .inv-list-table[data-cols="event-ops"] .inv-status,
#screen-inventory .inv-list-table[data-cols="location"] .inv-status,
#screen-inventory .inv-list-table[data-cols="item"] .inv-status,
#screen-inventory .inv-list-table[data-cols="supplier"] .inv-status {
    white-space: nowrap;
}

#screen-inventory .inv-list-table[data-cols="order"] + .inv-list-footer {
    padding-inline: 1rem;
}

#screen-inventory .inv-filter-bar {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
    align-items: center;
}

#screen-inventory .inv-filter-bar .field {
    flex: 0 1 220px;
    min-width: 140px;
}

#screen-inventory .inv-filter-bar .field .input {
    height: 36px;
    font-size: 14px;
}

#screen-inventory .inv-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 2500;
    display: none;
    align-items: center;
    justify-content: center;
}

#screen-inventory .inv-modal-overlay.is-open {
    display: flex;
}

#screen-inventory .inv-modal {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    width: 94%;
    max-width: 720px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#screen-inventory .inv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #19548d;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px 12px 0 0;
}

#screen-inventory .inv-modal-title {
    font-size: clamp(16px, 2.5vw, 19px);
    font-weight: 600;
    color: var(--white);
}

#screen-inventory .inv-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: .25rem;
    color: var(--white);
    display: flex;
    align-items: center;
}

#screen-inventory .inv-modal-close svg {
    width: 20px;
    height: 20px;
}

#screen-inventory .inv-modal-body {
    padding: 1.25rem;
    flex: 1 1 auto;
    overflow-y: auto;
}

#screen-inventory .inv-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--border-soft);
}


#screen-inventory .inv-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 1rem;
}

#screen-inventory .inv-form-grid .field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

#screen-inventory .inv-form-grid .field.full-width {
    grid-column: 1 / -1;
}

#screen-inventory .inv-form-grid .label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text1);
}

#screen-inventory .inv-form-grid .input {
    height: 40px;
}

#screen-inventory .inv-form-grid textarea.input {
    height: auto;
    min-height: 60px;
    resize: vertical;
}

#screen-inventory .inv-form-grid .field.has-error .input {
    border-color: var(--red);
}

#screen-inventory .inv-form-grid .field.has-error .label {
    color: var(--red);
}

#screen-inventory .inv-lines-section {
    margin-top: 1rem;
    border-top: 1px solid var(--border-soft);
    padding-top: .75rem;
}

#screen-inventory .inv-lines-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#screen-inventory .inv-line-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto;
    gap: .5rem;
    align-items: end;
    padding: .35rem 0;
    border-bottom: 1px solid var(--table-border-row);
}

#screen-inventory .inv-line-row.inv-line-row-order {
    grid-template-columns: 28px 1.4fr .9fr .9fr .8fr .8fr .7fr auto;
}

#screen-inventory .inv-line-row .field {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

#screen-inventory .inv-line-row .label {
    font-size: 11px;
    color: var(--text1);
}

#screen-inventory .inv-line-row .input {
    height: 34px;
    font-size: 13px;
}

#screen-inventory .inv-remove-line {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--red);
    padding: .25rem;
    display: flex;
    align-items: center;
    align-self: center;
}

#screen-inventory .inv-remove-line svg {
    width: 18px;
    height: 18px;
}

#screen-inventory .inv-status {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

#screen-inventory .inv-status-draft {
    background: #fef3c7;
    color: #92400e;
}

#screen-inventory .inv-status-sent {
    background: #dbeafe;
    color: #1e40af;
}

#screen-inventory .inv-status-partial {
    background: #ede9fe;
    color: #5b21b6;
}

#screen-inventory .inv-status-received {
    background: #d1fae5;
    color: #065f46;
}

#screen-inventory .inv-status-posted {
    background: #d1fae5;
    color: #065f46;
}

#screen-inventory .inv-status-active {
    background: #d1fae5;
    color: #065f46;
}

#screen-inventory .inv-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

#screen-inventory .inv-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem 1.5rem;
    margin-bottom: 1rem;
}

#screen-inventory .inv-detail-item {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

#screen-inventory .inv-detail-label {
    font-size: 12px;
    color: var(--text1);
    font-weight: 500;
}

#screen-inventory .inv-detail-value {
    font-size: 14px;
    color: var(--black);
    font-weight: 400;
}

#screen-inventory .inv-detail-highlight {
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}

#screen-inventory .inv-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    font-size: 13px;
    color: var(--text1);
    border-top: 1px solid var(--border-soft);
    font-weight: 500;
}

#screen-inventory .inv-row-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

#screen-inventory .inv-row-btn {
    background: none;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    cursor: pointer;
    padding: .3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text1);
    transition: color 0.15s, border-color 0.15s;
}

#screen-inventory .inv-row-btn svg {
    width: 15px;
    height: 15px;
}

#screen-inventory .inv-row-btn-send {
    color: var(--primary);
    border-color: var(--primary-2);
}

#screen-inventory .inv-line-total {
    display: flex;
    align-items: center;
    height: 34px;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    padding: 0 .25rem;
}

#screen-inventory .inv-line-total-field {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

#screen-inventory .inv-order-total-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: .75rem .25rem;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    border-top: 2px solid var(--border-soft);
    margin-top: .5rem;
}

#screen-inventory .inv-order-total-value {
    color: var(--primary);
    font-size: 16px;
}

#screen-inventory .inv-field-error {
    font-size: 12px;
    color: var(--red);
    min-height: 16px;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) {
    max-width: 1120px;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-modal-body {
    padding: 1.4rem 1.45rem 1.2rem;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem 1.15rem;
    margin-bottom: 1.15rem;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-item {
    gap: .32rem;
    padding: .85rem .95rem;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: #fafbfc;
    min-width: 0;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-label {
    font-size: 11px;
    font-weight: 600;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-value {
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] {
    margin-top: .35rem;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--white);
    overflow: hidden;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-head {
    padding: .9rem 1rem;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-body {
    padding: .45rem .55rem .6rem;
    gap: .25rem;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row {
    min-height: 54px;
    padding: .85rem .7rem;
    border: 1px solid transparent;
    border-radius: 12px;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div {
    min-width: 0;
    padding-inline: .25rem;
    line-height: 1.45;
    word-break: break-word;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div:first-child,
#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div:nth-child(3),
#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div:last-child {
    align-items: flex-start;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-modal-footer {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: .6rem;
    padding: .95rem 1.25rem 1.05rem;
}

#screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-modal-footer .btn {
    min-height: 40px;
    padding-inline: .95rem;
}

#screen-inventory .inv-modal:has(#inv-eo-period-close) {
    width: min(96vw, 1120px);
    max-width: 1120px;
}

#screen-inventory .inv-modal:has(#inv-eo-period-close) .inv-modal-body {
    padding: 1.1rem 1.2rem 1rem;
}

#screen-inventory .inv-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

#screen-inventory .inv-confirm-overlay.is-open {
    display: flex;
}

#screen-inventory .inv-confirm-box {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

#screen-inventory .inv-confirm-msg {
    font-size: 15px;
    color: var(--black);
    margin-bottom: 1rem;
    font-weight: 500;
}

#screen-inventory .inv-confirm-actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
}

#screen-inventory .inv-lines-table-head {
    display: none;
}

#screen-inventory #inv-eo-period-result {
    margin-top: .85rem;
}

#screen-inventory #inv-eo-period-result .table-empty {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: #fafbfc;
    line-height: 1.55;
    text-align: right;
}

@media (min-width: 901px) {
    #screen-inventory .inv-tabs-nav {
        margin-top: 35px;
    }

    #screen-inventory .inv-modal-header {
        padding-top: calc(1rem - 5px);
        padding-bottom: calc(1rem - 5px);
    }

    #screen-inventory [data-panel="uoms"] {
        padding-inline: .75rem;
    }

    #screen-inventory [data-panel="categories"] {
        padding-inline: .75rem;
    }

    #screen-inventory [data-panel="locations"],
    #screen-inventory [data-panel="items"],
    #screen-inventory [data-panel="suppliers"],
    #screen-inventory [data-panel="orders"],
    #screen-inventory [data-panel="receipts"],
    #screen-inventory [data-panel="eventOps"] {
        padding-inline: .75rem;
    }

    #screen-inventory [data-panel="uoms"] .inv-subheader {
        padding-inline: .5rem;
        margin-bottom: 1.1rem;
    }

    #screen-inventory [data-panel="categories"] .inv-subheader {
        padding-inline: .5rem;
        margin-bottom: 1.1rem;
    }

    #screen-inventory [data-panel="locations"] .inv-subheader,
    #screen-inventory [data-panel="items"] .inv-subheader,
    #screen-inventory [data-panel="suppliers"] .inv-subheader,
    #screen-inventory [data-panel="orders"] .inv-subheader,
    #screen-inventory [data-panel="receipts"] .inv-subheader,
    #screen-inventory [data-panel="eventOps"] .inv-subheader {
        padding-inline: .5rem;
        margin-bottom: 1.1rem;
    }

    #screen-inventory [data-panel="items"] .inv-filter-bar,
    #screen-inventory [data-panel="suppliers"] .inv-filter-bar,
    #screen-inventory [data-panel="orders"] .inv-filter-bar,
    #screen-inventory [data-panel="receipts"] .inv-filter-bar,
    #screen-inventory [data-panel="eventOps"] .inv-filter-bar,
    #screen-inventory [data-panel="orders"] .inv-status-summary {
        padding-inline: .5rem;
    }

    #screen-inventory .inv-line-row .label {
        display: none;
    }

    #screen-inventory .inv-list-table .table-head,
    #screen-inventory .inv-list-table .table-row {
        display: grid;
    }

    #screen-inventory .inv-list-table .table-head {
        color: #94a3b8;
        font-weight: 700;
        letter-spacing: 0.05em;
        font-size: 0.75rem;
        line-height: 1rem;
        padding: 15px;
        background: #fafbfb;
        border-bottom: 1px solid #f1f5f9;
        border-radius: var(--table-radius) var(--table-radius) 0 0;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-head {
        padding: 1rem 1.4rem;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-head {
        padding: 1rem 1.4rem;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-head,
    #screen-inventory .inv-list-table[data-cols="item"] .table-head,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-head,
    #screen-inventory .inv-list-table[data-cols="order"] .table-head,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-head,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-head {
        padding: 1rem 1.4rem;
    }

    #screen-inventory .inv-list-table .table-head > div {
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: .5rem;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-head > div {
        min-height: 24px;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-head > div {
        min-height: 24px;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-head > div,
    #screen-inventory .inv-list-table[data-cols="item"] .table-head > div,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-head > div,
    #screen-inventory .inv-list-table[data-cols="order"] .table-head > div,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-head > div,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-head > div {
        min-height: 24px;
    }

    #screen-inventory .inv-list-table .table-body {
        display: grid;
        grid-auto-rows: minmax(42px, auto);
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-body {
        gap: .25rem;
        padding: .5rem .8rem .7rem;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-body {
        gap: .25rem;
        padding: .5rem .8rem .7rem;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-body,
    #screen-inventory .inv-list-table[data-cols="item"] .table-body,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-body,
    #screen-inventory .inv-list-table[data-cols="order"] .table-body,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-body,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-body {
        gap: .25rem;
        padding: .5rem .8rem .7rem;
    }

    #screen-inventory .inv-list-table:not([data-cols="order-lines"]):not([data-cols="receipt-lines"]):not([data-cols="event-lines"]):not([data-cols="event-shortage"]) .table-body {
        gap: 0;
        padding: 0;
    }

    #screen-inventory .inv-list-table .table-row > div {
        padding: 0;
        display: flex;
        align-items: center;
        min-width: 0;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row {
        min-height: 56px;
        padding: .95rem 1.05rem;
        border: 1px solid transparent;
        border-bottom: none;
        align-items: center;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row {
        min-height: 56px;
        padding: .95rem 1.05rem;
        border: 1px solid transparent;
        border-bottom: none;
        align-items: center;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row {
        min-height: 56px;
        padding: .95rem 1.05rem;
        border: 1px solid transparent;
        border-bottom: none;
        align-items: center;
    }

    #screen-inventory .inv-list-table:not([data-cols="order-lines"]):not([data-cols="receipt-lines"]):not([data-cols="event-lines"]):not([data-cols="event-shortage"]) .table-row {
        border-radius: 0;
        border-inline: none;
        border-top: none;
        border-bottom: 1px solid var(--table-border-row);
    }

    #screen-inventory .inv-list-table:not([data-cols="order-lines"]):not([data-cols="receipt-lines"]):not([data-cols="event-lines"]):not([data-cols="event-shortage"]) .table-row:last-child {
        border-bottom: none;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div {
        padding-inline: .35rem;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div {
        padding-inline: .35rem;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div {
        padding-inline: .35rem;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:first-child {
        font-weight: 700;
        color: var(--black);
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:first-child {
        font-weight: 700;
        color: var(--black);
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:first-child {
        font-weight: 700;
        color: var(--black);
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:nth-child(2) {
        color: var(--text1);
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:nth-child(2) {
        color: var(--text1);
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:nth-child(2) {
        color: var(--text1);
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:last-child {
        justify-content: flex-end;
        padding-inline-start: .75rem;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:last-child {
        justify-content: flex-end;
        padding-inline-start: .75rem;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:last-child {
        justify-content: flex-end;
        padding-inline-start: .75rem;
    }

    #screen-inventory .inv-list-table[data-cols="policy"] .table-head,
    #screen-inventory .inv-list-table[data-cols="policy"] .table-row {
        grid-template-columns: 1fr 1fr;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-head,
    #screen-inventory .inv-list-table[data-cols="uom"] .table-row {
        grid-template-columns: .8fr 1fr .6fr;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-head,
    #screen-inventory .inv-list-table[data-cols="category"] .table-row {
        grid-template-columns: 1.5fr .8fr .6fr;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-head,
    #screen-inventory .inv-list-table[data-cols="location"] .table-row {
        grid-template-columns: 1.2fr .8fr .6fr .6fr;
    }

    #screen-inventory .inv-list-table[data-cols="item"] .table-head,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row {
        grid-template-columns: .8fr 1.2fr .9fr .7fr .5fr;
    }

    #screen-inventory .inv-list-table[data-cols="supplier"] .table-head,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row {
        grid-template-columns: 1.3fr 1fr 1fr .6fr;
    }

    #screen-inventory .inv-list-table[data-cols="order"] {
        --inv-order-grid-cols: minmax(116px, 1fr) minmax(180px, 1.5fr) minmax(108px, .9fr) minmax(108px, .9fr) 78px minmax(122px, 1fr) 104px 112px;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .table-head,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row {
        grid-template-columns: var(--inv-order-grid-cols);
        width: 100%;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .table-head > div,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div {
        min-width: 0;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .table-head > div:nth-child(5),
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(5),
    #screen-inventory .inv-list-table[data-cols="order"] .table-head > div:nth-child(7),
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(7) {
        justify-content: center;
        text-align: center;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .table-head > div:nth-child(6),
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(6),
    #screen-inventory .inv-list-table[data-cols="order"] .table-head > div:nth-child(8),
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(8) {
        justify-content: flex-end;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(5) .inv-line-count,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(6) .inv-row-total,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(7) .inv-status {
        margin-inline: 0;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .inv-row-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: .35rem;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .inv-row-btn {
        flex: 0 0 auto;
    }

    #screen-inventory .inv-list-table[data-cols="receipt"] .table-head,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row {
        grid-template-columns: .9fr 1.1fr .9fr .7fr .7fr .8fr;
    }

    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-head,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row {
        grid-template-columns: .95fr .85fr .55fr .55fr .55fr .55fr .55fr .55fr .7fr .6fr .9fr .9fr;
    }

    #screen-inventory .inv-list-table[data-cols="order-lines"] .table-head,
    #screen-inventory .inv-list-table[data-cols="order-lines"] .table-row {
        grid-template-columns: 1.1fr .6fr .7fr .6fr .6fr .6fr .7fr .6fr;
    }

    #screen-inventory .inv-list-table[data-cols="event-lines"] .table-head,
    #screen-inventory .inv-list-table[data-cols="event-lines"] .table-row {
        grid-template-columns: 1.1fr .6fr .7fr .5fr .5fr .5fr .5fr .5fr .5fr .5fr .5fr .6fr .6fr;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-head,
    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row {
        grid-template-columns: 1.25fr .75fr .95fr .55fr .55fr .55fr .55fr .55fr .55fr .55fr .55fr .7fr .7fr 1fr;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage"] .table-head,
    #screen-inventory .inv-list-table[data-cols="event-shortage"] .table-row {
        grid-template-columns: 1.2fr .7fr .8fr .6fr .6fr .7fr .6fr .6fr;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] {
        border: none;
        background: transparent;
        overflow: visible;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-head,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row {
        grid-template-columns: minmax(90px, .9fr) minmax(88px, .8fr) minmax(190px, 1.45fr) minmax(72px, .55fr) minmax(180px, 1.25fr) minmax(70px, .58fr) minmax(70px, .58fr) minmax(70px, .58fr) minmax(70px, .58fr);
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-head {
        padding: 0 .95rem .45rem;
        background: transparent;
        border-bottom: none;
        color: var(--text2);
        font-size: 11px;
        line-height: 1.3;
        letter-spacing: 0;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-head > div {
        min-height: auto;
        font-weight: 600;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-body {
        display: grid;
        gap: .75rem;
        padding: 0;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row {
        min-height: 0;
        gap: .8rem 1rem;
        padding: 1rem 1.1rem;
        border: 1px solid var(--border-soft);
        border-radius: 18px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
        align-items: start;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div {
        display: block;
        min-width: 0;
        padding: 0;
        line-height: 1.55;
        color: var(--black);
        text-align: right;
        word-break: break-word;
    }

    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:nth-child(3),
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:nth-child(5),
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:last-child {
        font-weight: 600;
    }

    #screen-inventory .inv-list-table[data-cols="receipt-lines"] .table-head,
    #screen-inventory .inv-list-table[data-cols="receipt-lines"] .table-row {
        grid-template-columns: 1.2fr .7fr .7fr .8fr .8fr .7fr;
    }

    #screen-inventory .inv-lines-table-head {
        display: grid;
        grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto;
        gap: .5rem;
        padding: .25rem 0;
        font-size: 12px;
        font-weight: 600;
        color: var(--text1);
        border-bottom: 1px solid var(--border-soft);
        margin-bottom: .25rem;
    }

    #screen-inventory .inv-lines-table-head.inv-lines-table-head-order {
        grid-template-columns: 28px 1.4fr .9fr .9fr .8fr .8fr .7fr auto;
    }
}

@media (max-width: 900px) {
    #screen-inventory .inv-form-grid {
        grid-template-columns: 1fr;
    }

    #screen-inventory .inv-modal-header {
        border-radius: 0;
        padding: 1rem 1rem .95rem;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100vh;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-modal-body {
        padding: 1rem .95rem .9rem;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-grid {
        grid-template-columns: 1fr;
        gap: .65rem;
        margin-bottom: 1rem;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-item {
        padding: .8rem .85rem;
        gap: .28rem;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-detail-value {
        line-height: 1.55;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] {
        border: none;
        background: transparent;
        overflow: visible;
        margin-top: .2rem;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-body {
        display: grid;
        gap: .8rem;
        padding: 0;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row {
        gap: .6rem;
        padding: .9rem .9rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .85rem;
        padding: 0;
        text-align: right;
        word-break: break-word;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div::before {
        margin-left: 0;
        display: block;
        flex: 0 0 78px;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
        color: var(--text2);
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div:first-child,
    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-list-table[data-cols="event-lines"] .table-row > div:nth-child(3) {
        font-size: 14px;
        font-weight: 600;
        color: var(--black);
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-modal-footer {
        justify-content: stretch;
        padding: .9rem .95rem 1rem;
        gap: .55rem;
    }

    #screen-inventory .inv-modal:has(#inv-eo-close-btn) .inv-modal-footer .btn {
        flex: 1 1 calc(50% - .3rem);
        justify-content: center;
        min-height: 42px;
        margin: 0;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn),
    #screen-inventory .inv-modal:has(#inv-po-save-btn),
    #screen-inventory .inv-modal:has(#inv-po-update-btn) {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100vh;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-modal-body,
    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-modal-body,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-modal-body {
        padding: 1rem .95rem .9rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-modal-status-banner,
    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-modal-status-banner,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-modal-status-banner {
        margin-bottom: .9rem;
        justify-content: center;
        padding: .65rem .9rem;
        border-radius: 14px;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-grid {
        grid-template-columns: 1fr;
        gap: .65rem;
        margin-bottom: 1rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-item {
        gap: .28rem;
        padding: .8rem .85rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: #fafbfc;
        min-width: 0;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-label {
        font-size: 11px;
        font-weight: 600;
        color: var(--text1);
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-value {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.55;
        word-break: break-word;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-highlight {
        font-size: 18px;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-item:has(.inv-detail-highlight),
    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-detail-item:has(.inv-status) {
        background: var(--white);
        border-color: var(--primary-2);
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] {
        border: none;
        background: transparent;
        overflow: visible;
        margin-top: .15rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-body {
        display: grid;
        gap: .8rem;
        padding: 0;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-row {
        gap: .62rem;
        padding: .9rem .9rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-row > div {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .85rem;
        padding: 0;
        text-align: right;
        line-height: 1.45;
        word-break: break-word;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-row > div::before {
        margin-left: 0;
        display: block;
        flex: 0 0 78px;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
        color: var(--text2);
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-row > div:first-child,
    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-row > div:nth-child(3),
    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .table-row > div:nth-child(7) {
        font-size: 14px;
        font-weight: 600;
        color: var(--black);
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-list-table[data-cols="order-lines"] .inv-pct {
        display: inline-block;
        margin-top: .15rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-order-total-bar,
    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-order-total-bar,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-order-total-bar {
        justify-content: space-between;
        padding: .95rem 1rem;
        margin-top: .85rem;
        border: 1px solid var(--primary-2);
        border-radius: 16px;
        background: #f8fbff;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-order-total-value,
    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-order-total-value,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-order-total-value {
        font-size: 18px;
        font-weight: 700;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-form-grid,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-form-grid {
        gap: .7rem;
        margin-bottom: .95rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-form-grid .field,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-form-grid .field {
        gap: .35rem;
        padding: .8rem .85rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: #fafbfc;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-lines-section,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-lines-section {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-lines-title,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-lines-title {
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
        margin-bottom: .75rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-lines-title .btn,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-lines-title .btn {
        width: 100%;
        justify-content: center;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-line-row.inv-line-row-order,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-line-row.inv-line-row-order {
        grid-template-columns: 1fr;
        gap: .7rem;
        padding: .95rem .9rem;
        margin-bottom: .8rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-line-row.inv-line-row-order .field,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-line-row.inv-line-row-order .field {
        grid-column: 1 / -1;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-line-row.inv-line-row-order .inv-line-num,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-line-row.inv-line-row-order .inv-line-num {
        justify-content: flex-start;
        padding: 0;
        font-size: 13px;
        font-weight: 700;
        color: var(--primary);
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-line-total-field,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-line-total-field {
        padding: .65rem .75rem;
        border: 1px solid var(--border-soft);
        border-radius: 14px;
        background: #fafbfc;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-line-total,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-line-total {
        height: auto;
        padding: 0;
        font-size: 15px;
    }

    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-remove-line,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-remove-line {
        justify-content: center;
        width: 100%;
        min-height: 40px;
        border: 1px dashed #f1b7b7;
        border-radius: 12px;
        background: #fff7f7;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-modal-footer,
    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-modal-footer,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-modal-footer {
        justify-content: stretch;
        padding: .9rem .95rem 1rem;
        gap: .55rem;
    }

    #screen-inventory .inv-modal:has(#inv-po-close-btn) .inv-modal-footer .btn,
    #screen-inventory .inv-modal:has(#inv-po-save-btn) .inv-modal-footer .btn,
    #screen-inventory .inv-modal:has(#inv-po-update-btn) .inv-modal-footer .btn {
        flex: 1 1 100%;
        justify-content: center;
        min-height: 44px;
        margin: 0;
    }

    #screen-inventory [data-panel="uoms"] {
        padding-inline: 0;
    }

    #screen-inventory [data-panel="categories"] {
        padding-inline: 0;
    }

    #screen-inventory [data-panel="locations"],
    #screen-inventory [data-panel="items"],
    #screen-inventory [data-panel="suppliers"],
    #screen-inventory [data-panel="orders"],
    #screen-inventory [data-panel="receipts"],
    #screen-inventory [data-panel="eventOps"] {
        padding-inline: 0;
    }

    #screen-inventory [data-panel="uoms"] .inv-subheader {
        gap: .75rem;
        margin-bottom: .9rem;
        padding-inline: .1rem;
    }

    #screen-inventory [data-panel="categories"] .inv-subheader {
        gap: .75rem;
        margin-bottom: .9rem;
        padding-inline: .1rem;
    }

    #screen-inventory [data-panel="locations"] .inv-subheader,
    #screen-inventory [data-panel="items"] .inv-subheader,
    #screen-inventory [data-panel="suppliers"] .inv-subheader,
    #screen-inventory [data-panel="orders"] .inv-subheader,
    #screen-inventory [data-panel="receipts"] .inv-subheader,
    #screen-inventory [data-panel="eventOps"] .inv-subheader {
        gap: .75rem;
        margin-bottom: .9rem;
        padding-inline: .1rem;
    }

    #screen-inventory [data-panel="uoms"] .inv-subheader-actions .btn {
        width: 100%;
        justify-content: center;
    }

    #screen-inventory [data-panel="categories"] .inv-subheader-actions .btn {
        width: 100%;
        justify-content: center;
    }

    #screen-inventory [data-panel="locations"] .inv-subheader-actions .btn,
    #screen-inventory [data-panel="items"] .inv-subheader-actions .btn,
    #screen-inventory [data-panel="suppliers"] .inv-subheader-actions .btn,
    #screen-inventory [data-panel="orders"] .inv-subheader-actions .btn,
    #screen-inventory [data-panel="receipts"] .inv-subheader-actions .btn,
    #screen-inventory [data-panel="eventOps"] .inv-subheader-actions .btn {
        width: 100%;
        justify-content: center;
    }

    #screen-inventory [data-panel="items"] .inv-filter-bar,
    #screen-inventory [data-panel="suppliers"] .inv-filter-bar,
    #screen-inventory [data-panel="orders"] .inv-filter-bar,
    #screen-inventory [data-panel="receipts"] .inv-filter-bar,
    #screen-inventory [data-panel="eventOps"] .inv-filter-bar,
    #screen-inventory [data-panel="orders"] .inv-status-summary {
        padding-inline: .1rem;
    }

    #screen-inventory .inv-line-row {
        grid-template-columns: 1fr 1fr;
        gap: .4rem;
        padding: .5rem 0;
    }

    #screen-inventory .inv-line-row.inv-line-row-order {
        grid-template-columns: 1fr 1fr;
    }

    #screen-inventory .inv-line-row.inv-line-row-order .inv-line-num {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding: .25rem 0 0;
        font-size: 13px;
    }

    #screen-inventory .inv-status-summary {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: .25rem;
    }

    #screen-inventory .inv-line-row .field:first-child,
    #screen-inventory .inv-line-row .inv-line-num + .field {
        grid-column: 1 / -1;
    }

    #screen-inventory .inv-detail-grid {
        grid-template-columns: 1fr;
    }

    #screen-inventory .inv-modal {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }

    #screen-inventory .inv-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #screen-inventory .inv-filter-bar .field {
        flex: 1 1 100%;
    }

    #screen-inventory .inv-subheader {
        flex-direction: column;
        align-items: stretch;
    }

    #screen-inventory .inv-subheader-actions {
        justify-content: flex-start;
    }

    #screen-inventory .inv-list-table .table-row {
        display: flex;
        flex-direction: column;
        padding: 0;
        border-bottom: 1px solid var(--table-border-row);
        gap: .25rem;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] {
        border: none;
        background: transparent;
        overflow: visible;
    }

    #screen-inventory .inv-list-table[data-cols="category"] {
        border: none;
        background: transparent;
        overflow: visible;
    }

    #screen-inventory .inv-list-table[data-cols="location"],
    #screen-inventory .inv-list-table[data-cols="item"],
    #screen-inventory .inv-list-table[data-cols="supplier"],
    #screen-inventory .inv-list-table[data-cols="order"],
    #screen-inventory .inv-list-table[data-cols="receipt"],
    #screen-inventory .inv-list-table[data-cols="event-ops"],
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] {
        border: none;
        background: transparent;
        overflow: visible;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-body {
        display: grid;
        gap: .85rem;
        padding: 0;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-body {
        display: grid;
        gap: .85rem;
        padding: 0;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-body,
    #screen-inventory .inv-list-table[data-cols="item"] .table-body,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-body,
    #screen-inventory .inv-list-table[data-cols="order"] .table-body,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-body,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-body,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-body {
        display: grid;
        gap: .85rem;
        padding: 0;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row {
        gap: .7rem;
        padding: .9rem .95rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row {
        gap: .7rem;
        padding: .9rem .95rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row {
        gap: .7rem;
        padding: .9rem .95rem;
        border: 1px solid var(--border-soft);
        border-radius: 16px;
        background: var(--white);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .9rem;
        padding: 0;
        line-height: 1.45;
        text-align: right;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .9rem;
        padding: 0;
        line-height: 1.45;
        text-align: right;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: .9rem;
        padding: 0;
        line-height: 1.45;
        text-align: right;
    }

    #screen-inventory .inv-list-table .table-row > div::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text1);
        font-size: 12px;
        margin-left: .5rem;
        display: inline;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div::before {
        margin-left: 0;
        display: block;
        flex: 0 0 72px;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
        color: var(--text2);
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div::before {
        margin-left: 0;
        display: block;
        flex: 0 0 72px;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
        color: var(--text2);
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div::before,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div::before,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div::before,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div::before,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div::before,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div::before,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div::before {
        margin-left: 0;
        display: block;
        flex: 0 0 72px;
        font-size: 11px;
        line-height: 1.2;
        font-weight: 500;
        color: var(--text2);
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:nth-child(2) {
        font-size: 15px;
        font-weight: 600;
        color: var(--black);
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:nth-child(2) {
        font-size: 15px;
        font-weight: 600;
        color: var(--black);
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:nth-child(2),
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:first-child,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:nth-child(2) {
        font-size: 15px;
        font-weight: 600;
        color: var(--black);
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:last-child {
        align-items: center;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:last-child {
        align-items: center;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:last-child,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:last-child {
        align-items: center;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row > div:last-child::before {
        align-self: flex-start;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row > div:last-child::before {
        align-self: flex-start;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row > div:last-child::before,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row > div:last-child::before,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row > div:last-child::before,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row > div:last-child::before,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row > div:last-child::before,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row > div:last-child::before,
    #screen-inventory .inv-list-table[data-cols="event-shortage-period"] .table-row > div:last-child::before {
        align-self: flex-start;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row .inv-status {
        margin-inline-start: auto;
        white-space: nowrap;
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row .inv-status {
        margin-inline-start: auto;
        white-space: nowrap;
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row .inv-status,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row .inv-status,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row .inv-status,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row .inv-status,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row .inv-status,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row .inv-status {
        margin-inline-start: auto;
        white-space: nowrap;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .inv-row-actions {
        justify-content: flex-end;
        width: 100%;
    }

    #screen-inventory .inv-list-table[data-cols="order"] .inv-row-btn {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 10px;
    }

    #screen-inventory .inv-list-table[data-cols="order"] + .inv-list-footer {
        margin-top: .25rem;
        padding: .85rem .3rem 0;
        border-top: none;
    }

    #screen-inventory .inv-list-table .table-head {
        display: none;
    }
}

@media (hover: hover) {
    #screen-inventory .inv-tab-btn:hover {
        color: var(--primary);
        background: var(--white);
        border-color: var(--primary-2);
    }

    #screen-inventory .inv-tab-btn.active:hover {
        color: var(--white);
        background: var(--primary);
        border-color: var(--primary);
    }

    #screen-inventory .inv-list-table .table-row:hover {
        background: var(--table-hover-bg);
        cursor: pointer;
    }

    #screen-inventory .inv-list-table[data-cols="uom"] .table-row:hover {
        border-color: var(--primary-2);
        background: var(--table-hover-bg);
    }

    #screen-inventory .inv-list-table[data-cols="category"] .table-row:hover {
        border-color: var(--primary-2);
        background: var(--table-hover-bg);
    }

    #screen-inventory .inv-list-table[data-cols="location"] .table-row:hover,
    #screen-inventory .inv-list-table[data-cols="item"] .table-row:hover,
    #screen-inventory .inv-list-table[data-cols="supplier"] .table-row:hover,
    #screen-inventory .inv-list-table[data-cols="order"] .table-row:hover,
    #screen-inventory .inv-list-table[data-cols="receipt"] .table-row:hover,
    #screen-inventory .inv-list-table[data-cols="event-ops"] .table-row:hover {
        border-color: var(--primary-2);
        background: var(--table-hover-bg);
    }

    #screen-inventory .inv-modal-close:hover {
        color: var(--white);
        opacity: 0.88;
    }

    #screen-inventory .inv-remove-line:hover {
        color: #b91c1c;
    }

    #screen-inventory .inv-row-btn:hover {
        color: var(--primary);
        border-color: var(--primary-2);
    }

    #screen-inventory .inv-row-btn-send:hover {
        background: var(--primary-1);
    }

    #screen-inventory .inv-pill:hover {
        border-color: var(--primary-2);
        background: var(--primary-1);
    }

    #screen-inventory .inv-filter-clear:hover {
        text-decoration: underline;
    }
}
