﻿.inventory-receipt-modal-root {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.inventory-receipt-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 44, 0.34);
    backdrop-filter: blur(2px);
}

.inventory-receipt-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    bottom: 24px;
    left: 24px;
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #f7f9fc;
    box-shadow: 0 24px 60px rgba(19, 34, 55, 0.22);
}

.inventory-receipt-import-modal {
    left: 50%;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: min(1500px, calc(100vw - 40px));
    transform: translateX(-50%);
}

.inventory-import-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.inventory-import-section {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.inventory-import-draft-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 88px;
}

.inventory-import-draft-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 14px;
}

.inventory-import-section h3 {
    margin: 0;
    font-size: 15px;
}

.inventory-import-mapping {
    border: 1px solid #d8e4f4;
    border-radius: 8px;
    overflow: hidden;
}

.inventory-import-mapping-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.inventory-import-mapping-head h3 {
    margin: 0 0 4px;
    color: #0b1734;
    font-size: 15px;
    font-weight: 800;
}

.inventory-import-mapping-head p {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.inventory-import-mapping-head strong {
    color: #475467;
}

.inventory-import-price-copy {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #d8e4f4;
    border-radius: 8px;
    background: #f8fbff;
}

.inventory-import-price-copy-title {
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.inventory-import-price-copy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
}

.inventory-import-price-copy label {
    display: grid;
    gap: 4px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.inventory-import-price-copy select {
    width: 100%;
    height: 32px;
    border: 1px solid #cad5e6;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    padding: 0 8px;
    font-size: 12px;
}

.inventory-import-price-copy select:focus {
    border-color: #1f6feb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.inventory-import-sheet-wrap {
    flex: 1;
    min-height: 0;
    max-height: min(62vh, 680px);
    overflow: auto;
    border: 1px solid #d8e4f4;
    border-radius: 8px;
    background: #fff;
}

.inventory-import-sheet {
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.inventory-import-sheet-cell {
    width: 210px;
    min-width: 210px;
    max-width: 210px;
    height: 40px;
    padding: 8px 10px;
    border-right: 1px solid #e5edf7;
    border-bottom: 1px solid #edf1f7;
    color: #344054;
    font-size: 12px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inventory-import-sheet-cell:last-child {
    border-right: none;
}

.inventory-import-sheet-select-row th,
.inventory-import-sheet-header-row th {
    position: sticky;
    z-index: 2;
}

.inventory-import-sheet-select-row th {
    top: 0;
    height: 48px;
    background: #fff;
}

.inventory-import-sheet-header-row th {
    top: 48px;
    background: #f3f6fb;
    color: #667085;
    font-weight: 800;
}

.inventory-import-sheet-select-cell select {
    width: 100%;
    height: 30px;
    border: 1px solid #cad5e6;
    border-radius: 6px;
    background: #fff;
    color: #344054;
    padding: 0 8px;
    font-size: 12px;
}

.inventory-import-sheet-select-cell select:focus {
    border-color: #1f6feb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.inventory-import-map-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 220px minmax(180px, 1.2fr);
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-top: 1px solid #edf1f7;
    font-size: 13px;
}

.inventory-import-map-row:first-child {
    border-top: none;
}

.inventory-import-map-row select {
    height: 30px;
    border: 1px solid #cad5e6;
    border-radius: 6px;
}

.inventory-import-status {
    display: flex;
    gap: 10px;
    color: #475467;
    font-size: 13px;
}

.inventory-import-cashbox-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #b7cff6;
    border-radius: 8px;
    background: #eef6ff;
}

.inventory-import-cashbox-panel.is-muted {
    border-color: #d8e4f4;
    background: #f8fbff;
}

.inventory-import-cashbox-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.inventory-import-no-cashbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #0b1734;
    font-size: 14px;
    font-weight: 800;
}

.inventory-import-no-cashbox input {
    width: 18px;
    height: 18px;
    accent-color: #1f6feb;
}

.inventory-import-cashbox-note {
    color: #475467;
    font-size: 12px;
    font-weight: 600;
}

.inventory-import-cashbox-select {
    display: grid;
    gap: 5px;
    color: #344054;
    font-size: 12px;
    font-weight: 800;
}

.inventory-import-cashbox-select.disabled {
    opacity: 0.58;
}

.inventory-import-cashbox-select select {
    width: 100%;
    height: 34px;
    border: 1px solid #b7cff6;
    border-radius: 6px;
    background: #fff;
    color: #1d2c42;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 700;
}

.inventory-import-issues {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid #ffd1d1;
    border-radius: 8px;
    background: #fff6f6;
    color: #8a1f1f;
    font-size: 12px;
}

.inventory-import-preview-table {
    max-height: 360px;
    overflow: auto;
    border: 1px solid #d8e4f4;
    border-radius: 8px;
}

.inventory-import-draft-section .inventory-import-preview-table {
    flex: 1;
    min-height: 0;
    max-height: none;
}

.inventory-import-preview-table table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
}

.inventory-import-preview-table .inventory-import-draft-table {
    width: max-content;
    min-width: 100%;
    table-layout: fixed;
}

.inventory-import-preview-table th,
.inventory-import-preview-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf1f7;
    font-size: 12px;
    text-align: left;
}

.inventory-import-preview-table th {
    background: #f3f6fb;
    color: #475467;
}

.inventory-import-draft-table th {
    position: relative;
    height: 34px;
    white-space: nowrap;
}

.inventory-import-draft-table th span {
    display: block;
    padding-right: 8px;
}

.inventory-import-draft-table th span,
.inventory-import-draft-table td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-import-column-resizer {
    position: absolute;
    top: 8px;
    right: -4px;
    bottom: 8px;
    z-index: 3;
    width: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: col-resize;
}

.inventory-import-column-resizer::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 3px;
    bottom: 2px;
    width: 1px;
    background: #d8e4f4;
}

.inventory-import-column-resizer:hover::after,
.inventory-import-column-resizing .inventory-import-column-resizer::after {
    background: #1f6feb;
}

.inventory-import-column-resizing {
    cursor: col-resize;
    user-select: none;
}

.inventory-import-preview-table tr.has-error td {
    background: #fff1f1;
}

.inventory-import-preview-table tr.has-warning td {
    background: #fff8e6;
}

.inventory-import-line-input {
    width: 72px;
    height: 30px;
    padding: 4px 8px;
    border: 1px solid #cbd8ea;
    border-radius: 6px;
    font-size: 12px;
}

.inventory-import-line-input:focus {
    border-color: #1f6feb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.inventory-import-line-category {
    width: 100%;
    height: 30px;
    padding: 4px 8px;
    border: 1px solid #cbd8ea;
    border-radius: 6px;
    background: #fff;
    color: #1d2b4f;
    font-size: 12px;
    font-weight: 700;
}

.inventory-import-line-category:focus {
    border-color: #1f6feb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.inventory-import-line-delete {
    width: 28px;
    height: 28px;
    border: 1px solid #f2c6c6;
    border-radius: 6px;
    background: #fff7f7;
    color: #b42318;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.inventory-import-line-delete:hover {
    background: #fee4e2;
    border-color: #fda29b;
}

.inventory-receipt-modal-head {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dde6f2;
    padding: 0 20px 0 22px;
    background: #fff;
}

.inventory-receipt-modal-head h2 {
    margin: 0;
    color: #0b1734;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
}

.inventory-receipt-modal-head button {
    width: 36px;
    height: 36px;
    border: 1px solid #d5dfec;
    border-radius: 7px;
    background: #fff;
    color: #33415c;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.inventory-receipt-modal-body {
    flex: 1;
    overflow: auto;
    padding: 16px 14px 120px;
}

.inventory-receipt-compose-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 304px;
    grid-template-areas:
        "supplier supplier"
        "meta meta"
        "warehouse warehouse"
        "products totals"
        "products comment"
        "cash cash"
        "status status";
    align-content: start;
    gap: 16px 24px;
    padding: 20px 22px 96px;
}

.inventory-publication-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #41516b;
    font-size: 12px;
    font-weight: 600;
}

.inventory-publication-field.hidden {
    display: none;
}

.inventory-import-create-supplier-btn {
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    color: #1a6ef5;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.inventory-import-create-supplier-btn:hover {
    text-decoration: underline;
}

.inventory-publication-field label,
.inventory-publication-field span {
    color: #2c3848;
}

.inventory-publication-field b,
.inventory-publication-field label span {
    color: #d9262f;
}

.inventory-publication-field input,
.inventory-publication-field select,
.inventory-publication-field textarea,
.inventory-publication-combo {
    height: 38px;
    border: 1px solid #ced9e8;
    border-radius: 7px;
    background: #fff;
    color: #0b1734;
    font-size: 13px;
}

.inventory-publication-field input,
.inventory-publication-field select {
    padding: 0 9px;
}

.inventory-publication-field textarea {
    min-height: 118px;
    padding: 10px 11px;
    resize: vertical;
}

.inventory-publication-field-medium {
    width: auto;
    max-width: 100%;
    margin-bottom: 0;
}

.inventory-publication-combo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    overflow: hidden;
}

.inventory-publication-combo input {
    height: 100%;
    border: none;
}

.inventory-publication-combo button {
    border: none;
    border-left: 1px solid #d5dbe4;
    background: #f8fbff;
    color: #1f6feb;
    font-weight: 700;
    cursor: pointer;
}

.inventory-publication-row {
    grid-area: meta;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px);
    gap: 14px;
    align-items: end;
    margin-bottom: 0;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
}

.inventory-publication-invoice {
    width: auto;
}

.inventory-publication-date {
    width: auto;
}

.inventory-publication-products {
    grid-area: products;
    min-width: 0;
    margin-top: 0;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
}

.inventory-publication-products h3 {
    margin: 0 0 14px;
    color: #0b1734;
    font-size: 15px;
    font-weight: 800;
}

.inventory-publication-product-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 14px;
}

.inventory-publication-product-select select {
    height: 38px;
}

.inventory-receipt-product-combo {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
}

.inventory-receipt-product-combo input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.inventory-receipt-product-combo > button {
    height: 38px;
    border: 1px solid #ced9e8;
    border-left: none;
    border-radius: 0 7px 7px 0;
    background: #f8fbff;
    color: #1f6feb;
    cursor: pointer;
}

.inventory-receipt-product-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 35;
    max-height: 220px;
    overflow: auto;
    border: 1px solid #dce3ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(31, 47, 70, 0.14);
}

.inventory-receipt-product-menu button {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: none;
    background: transparent;
    padding: 7px 10px;
    color: #1d2c42;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.inventory-receipt-product-menu button:hover {
    background: #eaf2ff;
}

.inventory-receipt-product-create {
    justify-content: flex-start !important;
    color: #1d2c42 !important;
    font-weight: 600;
}

.inventory-receipt-product-menu small {
    color: #667085;
}

.inventory-receipt-product-empty {
    padding: 9px 10px;
    color: #667085;
    font-size: 12px;
}

.inventory-publication-or {
    display: none;
}

.inventory-publication-import {
    height: 38px;
    border: 1px solid #c8d5e6;
    border-radius: 7px;
    background: #fff;
    padding: 0 16px;
    color: #1d2c42;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.inventory-publication-products-table {
    margin-top: 0;
    overflow: auto;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
}

.inventory-publication-products-head,
.inventory-publication-product-line {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 92px 92px 104px 92px 72px 104px;
}

.inventory-publication-products-head span {
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-bottom: 1px solid #dbe4f0;
    background: #f3f6fb;
    color: #34445e;
    font-size: 12px;
    font-weight: 700;
}

.inventory-publication-products-head span:not(:first-child) {
    justify-content: flex-end;
}

.inventory-publication-product-line {
    border-bottom: 1px solid #edf1f7;
    background: #fff;
}

.inventory-publication-product-line.hidden,
.inventory-publication-empty.hidden {
    display: none;
}

.inventory-publication-product-line span,
.inventory-publication-product-line input {
    height: 42px;
    border: none;
    border-right: 1px solid #edf1f7;
    padding: 0 8px;
    color: #1d2c42;
    font-size: 12px;
}

.inventory-publication-product-line input {
    text-align: right;
}

.inventory-publication-empty {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 20px 12px;
    text-align: center;
}

.inventory-publication-empty strong {
    color: #1d2c42;
    font-size: 15px;
    font-weight: 500;
}

.inventory-publication-empty p {
    margin: 0;
    max-width: 620px;
    color: #29384d;
    font-size: 12px;
    line-height: 1.35;
}

.inventory-publication-empty button {
    border: none;
    background: transparent;
    color: #1269e8;
    font-size: 12px;
    cursor: pointer;
}

.inventory-publication-empty-icon {
    width: 78px;
    height: 54px;
    position: relative;
}

.inventory-publication-empty-icon::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 18px;
    width: 38px;
    height: 28px;
    border: 3px solid #2d72f7;
    border-radius: 4px 4px 8px 8px;
}

.inventory-publication-empty-icon::after {
    content: "";
    position: absolute;
    left: 11px;
    top: 9px;
    width: 56px;
    height: 8px;
    border-radius: 999px;
    background: #e6f0ff;
    box-shadow: -20px 14px 0 #e6f0ff, 26px 14px 0 #e6f0ff;
}

.inventory-publication-comment {
    grid-area: comment;
    margin-top: 0;
    align-self: end;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
}

.inventory-publication-check {
    grid-area: cash;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 0;
    color: #2c3848;
    font-size: 13px;
}

.inventory-publication-totals {
    grid-area: totals;
    align-self: start;
    display: grid;
    gap: 14px;
    margin-top: 0;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
    color: #516078;
    font-size: 12px;
}

.inventory-publication-totals.hidden {
    display: none;
}

.inventory-publication-totals strong {
    display: block;
    margin-top: 4px;
    color: #10233f;
    font-size: 20px;
    font-weight: 700;
}

.inventory-receipt-modal-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 0 22px;
    border-top: 1px solid #dbe6f3;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 24px rgba(19, 34, 55, 0.06);
}

.inventory-publication-create,
.inventory-publication-draft {
    min-width: 190px;
    height: 44px;
    border: 1px solid #c8d3e2;
    border-radius: 7px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.inventory-publication-create {
    border-color: #1269e8;
    background: #1269e8;
    color: #fff;
}

.inventory-publication-create:disabled {
    opacity: 0.65;
    cursor: default;
}

.inventory-publication-draft {
    background: #fff;
    color: #1d2c42;
}

.inventory-receipt-compose-body > div.inventory-publication-field-medium:first-child {
    grid-area: supplier;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
}

.inventory-receipt-compose-body > label.inventory-publication-field-medium:first-of-type {
    grid-area: warehouse;
    padding: 16px;
    border: 1px solid #dbe4f0;
    border-radius: 8px;
    background: #fff;
}

.inventory-receipt-compose-body > .inventory-publication-field-medium.hidden {
    display: none;
}

.inventory-receipt-compose-body > label.inventory-publication-field-medium:not(:first-of-type) {
    grid-area: cash;
    max-width: 360px;
}

.inventory-receipt-compose-body > .inventory-status {
    grid-area: status;
}

.inventory-publication-comment + .inventory-publication-check,
.inventory-publication-check + .inventory-publication-field {
    justify-self: start;
}

@media (max-width: 1080px) {
    .inventory-receipt-modal {
        inset: 12px;
    }

    .inventory-receipt-compose-body {
        grid-template-columns: 1fr;
        grid-template-areas:
            "supplier"
            "meta"
            "warehouse"
            "products"
            "totals"
            "comment"
            "cash"
            "status";
        padding: 16px 16px 96px;
    }

    .inventory-publication-product-row {
        grid-template-columns: 1fr;
    }

    .inventory-publication-import {
        justify-self: start;
    }

    .inventory-receipt-modal-footer {
        padding: 12px 16px;
        flex-wrap: wrap;
        min-height: 88px;
    }

    .inventory-receipt-import-modal {
        inset: 8px;
        width: auto;
        transform: none;
    }
}

/* ============================================================
   Форма оприходования — новый дизайн (ir-compose-*)
   ============================================================ */

.ir-compose-root {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(var(--sidebar-offset, 14px) + var(--sidebar-width, 255px) + var(--sidebar-content-gap, 24px));
    z-index: 1200;
    pointer-events: none;
}

.ir-compose-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 24, 44, 0.34);
    backdrop-filter: blur(2px);
    pointer-events: auto;
}

.ir-compose-page {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    background: #f4f6fa;
    overflow: hidden;
    pointer-events: auto;
}

/* ── Header ── */
.ir-compose-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 20px;
    background: #fff;
    border-bottom: 1px solid #e2eaf4;
    flex-shrink: 0;
}

.ir-header-back {
    width: 32px;
    height: 32px;
    border: 1px solid #d5dfec;
    border-radius: 6px;
    background: #fff;
    color: #475467;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ir-header-back:hover {
    background: #f0f4fa;
}

.ir-header-title {
    flex: 1;
    margin: 0;
    color: #0b1734;
    font-size: 20px;
    font-weight: 800;
}

.ir-header-close {
    width: 32px;
    height: 32px;
    border: 1px solid #d5dfec;
    border-radius: 6px;
    background: #fff;
    color: #475467;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.ir-header-close:hover {
    background: #f0f4fa;
}

/* ── Meta row ── */
.ir-compose-meta {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e2eaf4;
    flex-shrink: 0;
}

.ir-meta-docnum {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
}

.ir-meta-docnum span {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.ir-meta-docnum strong {
    color: #0b1734;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.ir-meta-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ir-meta-field > span {
    color: #475467;
    font-size: 11px;
    font-weight: 600;
}

.ir-meta-field em {
    color: #d9262f;
    font-style: normal;
}

.ir-meta-supplier {
    min-width: 180px;
    flex: 1 1 180px;
    max-width: 260px;
}

.ir-meta-invoice {
    min-width: 130px;
    flex: 0 1 130px;
}

.ir-meta-warehouse {
    min-width: 140px;
    flex: 0 1 160px;
}

.ir-meta-category {
    min-width: 150px;
    flex: 0 1 180px;
}

.ir-meta-date {
    min-width: 120px;
    flex: 0 1 130px;
}

.ir-meta-combo {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    height: 36px;
    border: 1px solid #ced9e8;
    border-radius: 7px;
    background: #fff;
    overflow: visible;
    z-index: 60;
}

.ir-meta-combo input {
    height: 100%;
    border: none;
    padding: 0 9px;
    color: #0b1734;
    font-size: 13px;
    outline: none;
    background: transparent;
}

.ir-meta-combo > button {
    border: none;
    border-left: 1px solid #dde6f2;
    background: #f8fbff;
    color: #475467;
    font-size: 13px;
    cursor: pointer;
    border-radius: 0 7px 7px 0;
}

.inventory-receipt-supplier-menu {
    top: calc(100% + 6px);
    z-index: 1400;
    grid-column: 1 / -1;
}

.ir-wh-combo {
    min-width: 200px;
}

.ir-wh-menu {
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    z-index: 1400;
    width: 280px;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
}

/* reset inherited button styles inside tree */
.ir-wh-menu button {
    width: auto;
    min-height: unset;
    justify-content: flex-start;
    padding: 0;
    font-size: 13px;
}

/* Each row = toggle arrow + label */
.ir-wh-row {
    display: flex;
    align-items: center;
}

.ir-wh-row.active > .ir-wh-label {
    color: #1a6ef5;
    font-weight: 600;
    background: #eff4ff;
}

.ir-wh-row-warehouse {
    border-top: 1px solid #edf0f7;
}

.ir-wh-row-warehouse:first-child {
    border-top: none;
}

/* Arrow toggle button */
.ir-wh-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 4px;
    margin-left: 2px;
}

.ir-wh-toggle:hover {
    color: #475467;
    background: #f1f5f9;
}

.ir-wh-toggle.ir-wh-leaf {
    cursor: default;
    pointer-events: none;
}

/* Arrow SVG rotation */
.ir-wh-arrow {
    transition: transform 0.18s ease;
    transform: rotate(-90deg);
}

.ir-wh-arrow.open {
    transform: rotate(0deg);
}

/* Dot for leaf nodes */
.ir-wh-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #cbd5e1;
    display: inline-block;
}

/* Label button */
.ir-wh-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 10px 0 4px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    color: #1d2c42;
    cursor: pointer;
    border-radius: 5px;
    margin-right: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.ir-wh-label:hover {
    background: #f1f5ff;
    color: #0b1734;
}

.ir-wh-label-warehouse {
    font-weight: 700;
    font-size: 12.5px;
    color: #0b1734;
    letter-spacing: 0.01em;
}

.ir-meta-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ir-meta-input-wrap input {
    height: 36px;
    width: 100%;
    border: 1px solid #ced9e8;
    border-radius: 7px;
    padding: 0 32px 0 9px;
    color: #0b1734;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.ir-meta-input-wrap input:focus {
    border-color: #1f6feb;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.ir-field-icon {
    position: absolute;
    right: 9px;
    width: 14px;
    height: 14px;
    pointer-events: none;
    flex-shrink: 0;
}

.ir-meta-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ir-meta-select-wrap select {
    height: 36px;
    width: 100%;
    border: 1px solid #ced9e8;
    border-radius: 7px;
    padding: 0 30px 0 9px;
    color: #0b1734;
    font-size: 13px;
    appearance: none;
    background: #fff;
    outline: none;
    cursor: pointer;
}

.ir-meta-select-wrap select:focus {
    border-color: #1f6feb;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.ir-select-arrow {
    position: absolute;
    right: 9px;
    width: 10px;
    height: 6px;
    pointer-events: none;
}

.ir-meta-status {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ffd166;
    border-radius: 7px;
    background: #fff9e6;
    color: #92651a;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.ir-meta-status svg {
    width: 10px;
    height: 6px;
}

.ir-attach-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    border: 1px solid #c8d5e6;
    border-radius: 7px;
    background: #fff;
    padding: 0 14px;
    color: #1269e8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.ir-attach-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ir-attach-btn:hover {
    background: #f0f6ff;
    border-color: #a8c0e0;
}

/* ── Body layout ── */
.ir-compose-body {
    flex: 1;
    min-height: 0;
    display: flex;
    gap: 0;
    overflow: hidden;
}

.ir-compose-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px 20px 0;
}

/* ── Table toolbar ── */
.ir-table-toolbar {
    flex-shrink: 0;
    margin-bottom: 12px;
}

.ir-table-toolbar h2 {
    margin: 0 0 10px;
    color: #0b1734;
    font-size: 14px;
    font-weight: 700;
}

.ir-toolbar-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ir-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.ir-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.ir-search-wrap input {
    width: 100%;
    height: 38px;
    border: 1px solid #ced9e8;
    border-radius: 7px;
    padding: 0 12px 0 34px;
    color: #0b1734;
    font-size: 13px;
    background: #fff;
    outline: none;
}

.ir-search-wrap input:focus {
    border-color: #1f6feb;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.ir-search-wrap .inventory-receipt-product-menu {
    left: 0;
    right: 0;
}

.ir-add-btn {
    height: 38px;
    padding: 0 18px;
    border: none;
    border-radius: 7px;
    background: #1269e8;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.ir-add-btn:hover {
    background: #0f59d0;
}

.ir-import-split {
    display: flex;
    height: 38px;
    border: 1px solid #c8d5e6;
    border-radius: 7px;
    overflow: hidden;
    flex-shrink: 0;
}

.ir-import-btn {
    border: none;
    background: #fff;
    padding: 0 14px;
    color: #1d2c42;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.ir-import-btn:hover {
    background: #f0f4fa;
}

.ir-import-arrow {
    border: none;
    border-left: 1px solid #d5dfe9;
    background: #fff;
    padding: 0 10px;
    color: #475467;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ir-import-arrow svg {
    width: 10px;
    height: 6px;
}

.ir-import-arrow:hover {
    background: #f0f4fa;
}

/* ── Items table ── */
.ir-items-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid #dde6f2;
    border-radius: 8px;
    background: #fff;
}

.ir-items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.ir-items-table thead tr {
    background: #f3f6fb;
}

.ir-items-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #dde6f2;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.ir-items-table th svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.ir-items-table td {
    padding: 0;
    border-bottom: 1px solid #edf1f7;
    color: #1d2c42;
    font-size: 13px;
    vertical-align: middle;
}

.ir-item-row td {
    padding: 0 12px;
    height: 44px;
}

.ir-item-row:hover td {
    background: #f8fafd;
}

.ir-col-num {
    width: 40px;
    text-align: center;
    color: #94a3b8 !important;
    font-size: 12px !important;
}

.ir-col-product {
    min-width: 160px;
}

.ir-col-sku {
    min-width: 100px;
    color: #64748b;
}

.ir-col-price {
    width: 110px;
    text-align: right;
}

.ir-col-qty {
    width: 80px;
    text-align: right;
}

.ir-col-sum {
    width: 130px;
    text-align: right;
    font-weight: 600;
}

.ir-col-del {
    width: 44px;
    text-align: center;
}

.ir-col-del svg {
    width: 14px;
    height: 14px;
}

.ir-cell-input {
    width: 100%;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 0 8px;
    text-align: right;
    color: #1d2c42;
    font-size: 13px;
    background: transparent;
    outline: none;
}

.ir-cell-input:hover {
    border-color: #ced9e8;
    background: #fff;
}

.ir-cell-input:focus {
    border-color: #1f6feb;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.1);
}

.ir-del-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #f2c6c6;
    border-radius: 6px;
    background: #fff7f7;
    color: #b42318;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

.ir-del-btn svg {
    width: 13px;
    height: 13px;
}

.ir-del-btn:hover {
    background: #fee4e2;
    border-color: #fda29b;
}

.ir-table-empty {
    padding: 32px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

/* ── Add row / Total row ── */
.ir-table-total-row {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 14px;
    color: #475467;
    font-size: 13px;
    border-top: 1px solid #e2eaf4;
    margin-top: 8px;
}

.ir-table-total-row a {
    color: #1269e8;
    text-decoration: none;
    font-weight: 600;
}

.ir-table-total-row span:last-of-type {
    margin-left: auto;
}

.ir-table-total-row strong {
    color: #0b1734;
    font-size: 16px;
    font-weight: 800;
}

/* ── Sidebar ── */
.ir-compose-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 16px 16px 80px;
    border-left: 1px solid #e2eaf4;
    background: #f8fafc;
}

.ir-totals-card {
    border: 1px solid #dde6f2;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ir-totals-title {
    color: #0b1734;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ir-total-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ir-total-item span {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
}

.ir-total-item strong {
    color: #0b1734;
    font-size: 17px;
    font-weight: 800;
}

.ir-comment-card {
    border: 1px solid #dde6f2;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.ir-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #edf1f7;
    color: #1d2c42;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ir-comment-header svg {
    width: 10px;
    height: 6px;
}

.ir-comment-area {
    display: block;
    width: 100%;
    min-height: 90px;
    border: none;
    padding: 10px 14px;
    color: #0b1734;
    font-size: 13px;
    resize: vertical;
    outline: none;
    font-family: inherit;
}

.ir-comment-area::placeholder {
    color: #94a3b8;
}

.ir-cashbox-card {
    border: 1px solid #dde6f2;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.ir-cashbox-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475467;
}

.ir-cashbox-field b {
    color: #d9262f;
}

.ir-cashbox-field select {
    height: 36px;
    border: 1px solid #ced9e8;
    border-radius: 7px;
    padding: 0 9px;
    font-size: 13px;
    color: #0b1734;
    background: #fff;
    outline: none;
    cursor: pointer;
}

/* ── Footer ── */
.ir-compose-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    padding: 0 20px;
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #e2eaf4;
    box-shadow: 0 -8px 20px rgba(19, 34, 55, 0.05);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.ir-footer-cashbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3848;
    font-size: 13px;
    cursor: pointer;
}

.ir-footer-cashbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1269e8;
    cursor: pointer;
}

.ir-help-btn {
    width: 18px;
    height: 18px;
    border: 1px solid #c8d5e6;
    border-radius: 50%;
    background: #f3f6fb;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ir-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ir-draft-btn {
    height: 42px;
    padding: 0 20px;
    border: 1px solid #c8d3e2;
    border-radius: 7px;
    background: #fff;
    color: #1d2c42;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ir-draft-btn:hover {
    background: #f4f6fa;
}

.ir-post-btn {
    height: 42px;
    padding: 0 24px;
    border: none;
    border-radius: 7px;
    background: #1269e8;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.ir-post-btn:hover {
    background: #0f59d0;
}

.ir-post-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

/* Import modal combos — supplier and warehouse tree */
.ir-import-supplier-combo,
.ir-import-wh-combo {
    height: 38px;
    border-radius: 6px;
    z-index: 10;
}

.ir-import-supplier-combo .inventory-receipt-product-menu,
.ir-import-wh-combo .ir-wh-menu {
    z-index: 2000;
    width: 100%;
    right: auto;
}

/* Supplier items inside import dropdown */
.ir-import-supplier-combo .inventory-receipt-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    color: #1d2c42;
    cursor: pointer;
}

.ir-import-supplier-combo .inventory-receipt-product-item:hover {
    background: #f0f5ff;
}

.inventory-import-supplier-create-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 10px 12px 12px;
    border-top: 1px solid #edf1f7;
    background: #f8fbff;
}

.inventory-import-supplier-create-form label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
}

.inventory-import-supplier-create-form input {
    width: 100%;
    height: 32px;
    border: 1px solid #cbd8ea;
    border-radius: 6px;
    padding: 0 8px;
    color: #0b1734;
    font-size: 12px;
    background: #fff;
}

.inventory-import-supplier-create-form input:focus {
    border-color: #1f6feb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 111, 235, 0.12);
}

.inventory-import-supplier-create-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.inventory-import-supplier-create-actions button {
    width: auto;
    min-height: 32px;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 800;
}

.inventory-import-supplier-save {
    border: 1px solid #1269e8 !important;
    background: #1269e8 !important;
    color: #fff !important;
}

.inventory-import-supplier-cancel {
    border: 1px solid #c8d3e2 !important;
    background: #fff !important;
    color: #1d2c42 !important;
}


