/* Inventory Management — Angular /vertical/inventory chrome */

.inventory-page {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.4rem 0.55rem 0.45rem;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
}

.inventory-page__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    flex-shrink: 0;
}

.inventory-page__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #03142e;
}

.inventory-page__subtitle {
    margin: 0;
    color: #475569;
    font-size: 0.85rem;
}

.inventory-page__error {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 6px;
    flex-shrink: 0;
    cursor: pointer;
}

.inventory-split {
    display: grid;
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
    gap: 0.55rem;
    flex: 1 1 0;
    min-height: 0;
}

.inventory-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #fff;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    overflow: hidden;
}

.inventory-pane__title {
    flex-shrink: 0;
    padding: 0.4rem 0.65rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: #03142e;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.inventory-tabs {
    display: flex;
    flex-shrink: 0;
    gap: 0.25rem;
    padding: 0.35rem 0.4rem 0;
    background: #e8eef5;
    border-bottom: 3px solid #03142e;
}

.inventory-tabs__btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.25rem;
    margin: 0;
    border: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    padding: 0.45rem 0.85rem;
    font-size: var(--font-size-sm, 14px);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #334155;
    cursor: pointer;
}

.inventory-tabs__btn i {
    font-size: 0.95rem;
    line-height: 1;
}

.inventory-tabs__btn:hover {
    color: #03142e;
    background: rgba(255, 255, 255, 0.72);
}

.inventory-tabs__btn.is-active {
    color: #fff;
    background: #03142e;
}

.inventory-tabs__btn.is-active:hover {
    color: #fff;
    background: #0a2744;
}

.inventory-pane__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
}

.inventory-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.45rem;
    background: linear-gradient(180deg, #03142e 0%, #0a2744 100%);
    border-bottom: 2px solid #03142e;
    flex-shrink: 0;
}

.inventory-toolbar .products-search-control,
.inventory-toolbar .products-search-control--ddl,
.inventory-toolbar .products-search-control--text {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.inventory-toolbar .products-search-check,
.inventory-toolbar .products-search-refresh {
    flex: 0 0 auto;
}

.inventory-toolbar .e-input-group,
.inventory-toolbar .e-ddl.e-input-group,
.inventory-toolbar .e-control-wrapper {
    width: 100% !important;
    max-width: none !important;
    height: 2.55rem !important;
    min-height: 2.55rem !important;
    box-sizing: border-box;
}

.inventory-toolbar .e-input-group input,
.inventory-toolbar .e-input-group .e-input,
.inventory-toolbar .e-ddl .e-input {
    height: 2.55rem !important;
    min-height: 2.55rem !important;
    font-size: 0.95rem !important;
    line-height: 2.55rem !important;
}

.inventory-toolbar .products-search-refresh {
    width: 2.55rem;
    height: 2.55rem;
}

.inventory-toolbar .products-search-check,
.inventory-toolbar .field-lable {
    color: #fff;
    font-size: 0.75rem;
    white-space: nowrap;
}

.inventory-grid {
    flex: 1 1 0;
    min-height: 0;
}

.inventory-chart {
    flex: 0 0 260px;
    min-height: 220px;
    max-height: 280px;
    padding: 0.25rem 0.35rem 0;
}

.inventory-attrs {
    flex: 1 1 0;
    min-height: 16rem;
    border: none;
    border-top: 1px solid #e2e8f0;
    border-radius: 0;
    box-shadow: none;
}

.inventory-attrs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.inventory-attrs-header .ent-cmdbar__btn {
    flex-shrink: 0;
}

.inventory-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.85rem;
    flex: 1 1 auto;
    min-height: 6rem;
}

.inv-attr-table {
    min-width: 86rem;
    --inv-font: calc(var(--ent-font, 0.90rem) + 2px);
    --inv-ctrl-h: 2.15rem;
}

.inv-attr-table thead th {
    white-space: nowrap;
}

.inv-attr-table .inv-attr-groups th {
    padding: 0.4rem 0.55rem 0.25rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 0;
}

.inv-attr-table .inv-attr-group {
    text-align: center;
    border-left: 1px solid #e2e8f0;
}

.inv-attr-table .inv-attr-cols th {
    top: 1.55rem;
    padding: 0.2rem 0.55rem 0.5rem;
    font-size: var(--inv-font);
    color: #1e293b;
    background: #f8fafc;
}

.inv-attr-table .inv-attr-cols th.center {
    text-align: center;
}

.inv-attr-table .inv-attr-branch {
    min-width: 8.5rem;
    font-size: var(--inv-font);
    font-weight: 700;
    color: #03142e;
}

.inv-attr-table tbody td {
    padding: 0.45rem 0.45rem;
    vertical-align: middle;
}

.inv-attr-table tbody td.center {
    text-align: center;
}

.inv-step {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 4.75rem;
    height: var(--inv-ctrl-h);
    min-height: var(--inv-ctrl-h);
    max-height: var(--inv-ctrl-h);
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
    box-sizing: border-box;
}

.inv-step:hover {
    border-color: #94a3b8;
}

.inv-step:focus-within {
    border-color: #0f4c75;
    box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.12);
}

.inv-step .inv-cell {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    background: transparent;
    min-width: 0;
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0 0.3rem;
    line-height: calc(var(--inv-ctrl-h) - 2px);
}

.inv-step__spin {
    display: flex;
    flex-direction: column;
    flex: 0 0 0.9rem;
    width: 0.9rem;
    border-left: 1px solid #e2e8f0;
    min-height: 0;
}

.inv-step__spin button {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    min-height: 0;
    height: 50%;
    background: #f8fafc;
    color: #475569;
    line-height: 0;
    font-size: 0.4rem;
    cursor: pointer;
}

.inv-step__spin button + button {
    border-top: 1px solid #e2e8f0;
}

.inv-step__spin button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.inv-step__spin .bi {
    font-size: 0.42rem;
    line-height: 1;
}

.inv-cell {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: var(--inv-ctrl-h);
    min-height: var(--inv-ctrl-h);
    max-height: var(--inv-ctrl-h);
    margin: 0;
    display: block;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    padding: 0 0.4rem;
    font: inherit;
    font-size: var(--inv-font);
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    font-variant-numeric: tabular-nums;
    line-height: calc(var(--inv-ctrl-h) - 2px);
}

.inv-cell--text {
    text-align: left;
    font-weight: 500;
    min-width: 6.5rem;
}

.inv-cell--money,
.inv-cell--index,
.inv-cell--sell {
    text-align: right;
    font-size: var(--inv-font);
    font-weight: 600;
    font-family: inherit;
}

.inv-cell--ro {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
    cursor: default;
    opacity: 1;
    -webkit-text-fill-color: #0f172a;
}

.inv-attr-table input.inv-cell--sell {
    font-size: var(--inv-font);
    font-weight: 600;
    color: #0f172a;
    opacity: 1;
    -webkit-text-fill-color: #0f172a;
}

.inv-cell:hover:not(.inv-cell--ro) {
    border-color: #94a3b8;
}

.inv-cell:focus {
    outline: none;
    background: #fff;
    border-color: #0f4c75;
    box-shadow: 0 0 0 3px rgba(15, 76, 117, 0.12);
}

.inventory-money {
    display: block;
    width: 100%;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #0f172a;
}

.inv-attr-method.is-muted,
.inv-cell--text::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.inv-attr-method {
    font-size: var(--inv-font);
    font-weight: 600;
    color: #334155;
}

.inv-attr-actions {
    display: flex;
    gap: 0.2rem;
    justify-content: center;
}

.inv-attr-actions button,
button.inv-attr-actions {
    border: 0;
    background: transparent;
    color: #0f4c81;
    padding: 0.1rem 0.25rem;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .inventory-split {
        grid-template-columns: 1fr;
    }
}
