.inv-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.inv-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 0;
}

.inv-empty {
    opacity: 0.7;
    font-size: 0.85rem;
}

.inv-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.inv-toolbar-end {
    justify-content: flex-end;
}

.inv-toolbar-between {
    justify-content: space-between;
    align-items: center;
}

.inv-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
}

    .inv-icon-btn:hover {
        background: #46586A;
    }

    .inv-icon-btn:active {
        background: #232F3B;
    }

    .inv-icon-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

    .inv-icon-btn-danger:hover {
        background: #b3352e;
    }

    .inv-icon-btn-danger:active {
        background: #8a2823;
    }

.inv-table,
.inv-rows-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

    .inv-table th,
    .inv-rows-table th {
        text-align: left;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        opacity: 0.7;
        padding: 6px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .inv-table td,
    .inv-rows-table td {
        padding: 6px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        vertical-align: middle;
    }

    .inv-table tbody tr {
        cursor: pointer;
    }

        .inv-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.06);
        }

.inv-rows-table input,
.inv-rows-table select {
    box-sizing: border-box;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ECE5D6;
    padding: 4px 6px;
    font-size: 0.8rem;
    font-family: inherit;
}

.inv-state-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.inv-state-pending {
    background: rgba(255, 255, 255, 0.12);
    color: #ECE5D6;
}

.inv-state-created {
    background: #46586A;
    color: #ECE5D6;
}

.inv-state-paid {
    background: #8D9A8C;
    color: #232F3B;
}

.inv-state-overdue {
    background: #b3352e;
    color: #ECE5D6;
}

.inv-modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
}

.inv-modal {
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 20px;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

    .inv-modal p {
        margin: 0 0 16px;
        font-size: 0.9rem;
    }

.inv-modal-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.inv-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.inv-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
}

    .inv-btn:hover {
        background: #46586A;
    }

    .inv-btn:disabled {
        opacity: 0.5;
        cursor: default;
    }

.inv-btn-danger {
    background: #b3352e;
    color: #ECE5D6;
}

    .inv-btn-danger:hover {
        background: #8a2823;
    }

.inv-error {
    color: #e58a8a;
    font-size: 0.85rem;
}

.inv-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    cursor: pointer;
}

    .inv-checkbox-row input[type="checkbox"] {
        width: auto;
    }

.inv-category {
    margin-bottom: 20px;
}

.inv-category-title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8D9A8C;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 4px;
}

.inv-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin-bottom: 14px;
}

    .inv-row:last-child {
        margin-bottom: 0;
    }

.inv-field {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1 1 55px;
    min-width: 0;
}

.inv-field-wide {
    flex-basis: 100%;
}

.inv-field label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.inv-field span {
    font-size: 0.9rem;
    min-height: 1.2em;
    overflow-wrap: anywhere;
}

.inv-field input,
.inv-field select,
.inv-field textarea {
    box-sizing: border-box;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ECE5D6;
    padding: 6px 8px;
    font-size: 0.85rem;
    font-family: inherit;
}

    .inv-field input:focus,
    .inv-field select:focus,
    .inv-field textarea:focus {
        outline: none;
        border-color: #8D9A8C;
    }

.inv-field textarea {
    resize: vertical;
}
