.inventory-page__topbar,
.inventory-page__header-actions {
    gap: 18px;
}
.inventory-page__header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.inventory-page__header-actions .top-actions {
    margin-top: 0;
}
.inventory-search {
    width: min(100%, 320px);
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--muted-text);
    background: var(--panel);
    box-shadow: var(--executive-shadow);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease;
}
.inventory-search:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent);
}
.inventory-search svg {
    width: 17px;
    flex: 0 0 auto;
}
.inventory-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}
.inventory-metrics {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.inventory-metric {
    min-height: 148px;
    padding: 19px;
    position: relative;
}
.inventory-metric__label {
    padding-right: 48px;
    font-size: 13px;
    font-weight: 600;
}
.inventory-metric__icon {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
}
.inventory-metric__icon svg {
    width: 20px;
}
.inventory-metric__icon.green {
    background: var(--green-soft);
}
.inventory-metric__icon.blue {
    color: var(--blue);
    background: var(--blue-soft);
}
.inventory-metric__icon.orange {
    color: var(--orange);
    background: var(--orange-soft);
}
.inventory-metric__icon.red {
    color: var(--red);
    background: var(--red-soft);
}
.inventory-metric__value {
    margin-top: 25px;
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 650;
    letter-spacing: -0.03em;
}
.inventory-metric__value.attention {
    color: var(--red);
}
.inventory-metric__note {
    margin-top: 4px;
    color: var(--muted-text);
    font-size: 12px;
}
.inventory-panel {
    overflow: hidden;
}
.inventory-toolbar {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
}
.inventory-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.inventory-action,
.inventory-filter {
    min-height: 42px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
}
.inventory-action svg,
.inventory-filter svg {
    width: 16px;
}
.inventory-action:hover,
.inventory-filter:hover {
    transform: translateY(-1px);
    box-shadow: var(--executive-shadow);
}
.inventory-action.primary {
    border-color: var(--gold);
    color: #fff;
    background: linear-gradient(110deg, #a8721c, #cf9639);
}
.inventory-action.soft {
    color: #805b20;
    background: var(--gold-soft);
}
.inventory-filter select {
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font: inherit;
    cursor: pointer;
}
.inventory-table-wrap {
    overflow-x: auto;
}
.inventory-table {
    width: 100%;
    min-width: 970px;
    border-collapse: collapse;
}
.inventory-table th,
.inventory-table td {
    padding: 17px 18px;
    border-bottom: 1px solid #eeece9;
    font-size: 13px;
    text-align: left;
}
.inventory-table th {
    color: #5f6468;
    background: #fcfcfb;
    font-weight: 600;
}
.inventory-table tbody tr {
    transition: background-color 180ms ease;
}
.inventory-table tbody tr:hover {
    background: #fcfaf6;
}
.inventory-item-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.inventory-item-thumb {
    width: 54px;
    height: 44px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    color: #6b7073;
    background: #f1f1ef;
}
.inventory-item-thumb svg {
    width: 22px;
}
.inventory-item-cell strong,
.inventory-item-cell small {
    display: block;
}
.inventory-item-cell strong {
    font-weight: 600;
}
.inventory-item-cell small {
    color: var(--muted-text);
    font-size: 11px;
}
.inventory-quantity.in-stock {
    color: var(--green);
}
.inventory-quantity.low-stock {
    color: var(--orange);
}
.inventory-quantity.out-of-stock {
    color: var(--red);
}
.inventory-status {
    padding: 6px 12px;
    display: inline-block;
    border-radius: 8px;
    font-size: 11px;
    white-space: nowrap;
}
.inventory-status.in-stock {
    color: var(--green);
    background: var(--green-soft);
}
.inventory-status.low-stock {
    color: var(--orange);
    background: var(--orange-soft);
}
.inventory-status.out-of-stock {
    color: var(--red);
    background: var(--red-soft);
}
.inventory-more-button {
    width: 34px;
    height: 34px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    color: var(--muted-text);
    background: transparent;
}
.inventory-more-button:hover {
    color: var(--ink);
    background: #eeeeeb;
}
.inventory-more-button svg {
    width: 18px;
}
.inventory-empty-state {
    min-width: 970px;
    padding: 48px 20px;
    display: grid;
    justify-items: center;
    color: var(--muted-text);
    text-align: center;
}
.inventory-empty-state svg {
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
}
.inventory-empty-state strong {
    color: var(--ink);
}
.inventory-empty-state p {
    margin-top: 4px;
    font-size: 12px;
}
.inventory-table-footer {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
}
.inventory-table-footer > p {
    color: var(--muted-text);
    font-size: 13px;
}
.inventory-table-footer strong {
    color: var(--ink);
    font-weight: 600;
}
.inventory-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.inventory-pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
}
.inventory-pagination button:hover:not(:disabled),
.inventory-pagination button.active {
    border-color: var(--gold);
    color: #fff;
    background: var(--gold);
}
.inventory-pagination button:disabled {
    opacity: 0.45;
}

@media (min-width: 700px) {
    .inventory-page__topbar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
    }
    .inventory-page__header-actions {
        flex-wrap: nowrap;
    }
    .inventory-search {
        width: 280px;
    }
    .inventory-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .inventory-toolbar {
        flex-direction: row;
        align-items: center;
    }
    .inventory-table-footer {
        flex-direction: row;
    }
}

@media (min-width: 1180px) {
    .inventory-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
