.inventory-header {
    margin-bottom: 1rem;
}

.inventory-header h1 {
    margin-bottom: 0.25rem;
}

.inventory-header p {
    margin: 0;
    color: #5f6b7a;
}

.inventory-workspace {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.inventory-main {
    min-width: 0;
}

.inventory-panel {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.inventory-panel h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.inventory-actions,
.location-form,
.inventory-list-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.inventory-folder-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.inventory-folder-header h2 {
    margin: 0;
}

.inventory-folder-list {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.inventory-folder-group {
    margin-top: 0.65rem;
}

.inventory-folder-label {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    margin: 0.4rem 0 0.25rem;
    text-transform: uppercase;
}

.inventory-folder-btn {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.5rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #263241;
    cursor: pointer;
    font: inherit;
    padding: 0.48rem 0.55rem;
    text-align: left;
}

.inventory-folder-btn:hover,
.inventory-folder-btn.active {
    border-color: #cfe0ff;
    background: #f4f8ff;
    color: #005bea;
}

.inventory-folder-btn span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inventory-folder-count {
    color: #64748b;
    font-size: 0.82rem;
}

.inventory-list-header {
    justify-content: space-between;
}

.inventory-list-header p {
    margin: 0.15rem 0 0;
    color: #64748b;
}

.inventory-list-header input {
    max-width: 26rem;
}

.inventory-status {
    min-height: 1.25rem;
    margin: 0.75rem 0 0;
    color: #0f766e;
}

.inventory-status.error {
    color: #b00020;
}

.location-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.location-chip {
    border: 1px solid #d8dee9;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    color: #475569;
    background: #f8fafc;
}

.location-chip small {
    display: block;
    color: #64748b;
    margin-top: 0.1rem;
}

.material-list {
    display: grid;
    gap: 0.75rem;
}

.material-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 0.75rem;
    border: 1px solid #e6e9ef;
    border-radius: 6px;
    padding: 0.9rem;
}

.material-card h3 {
    margin: 0 0 0.35rem;
}

.material-card p {
    margin: 0.25rem 0;
    color: #5f6b7a;
}

.material-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.material-pill {
    border: 1px solid #d8dee9;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    color: #475569;
    font-size: 0.85rem;
}

.material-pill.low,
.material-pill.expiring {
    border-color: #b7791f;
    background: #fff8e6;
    color: #92400e;
}

.material-pill.expired {
    border-color: #b00020;
    background: #fff1f2;
    color: #b00020;
}

.material-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .inventory-workspace,
    .material-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }
}
