/* Inventory workspace — hub tiles and sub-nav (matches billing/patients hub patterns) */

.inventory-page {
    gap: var(--space-5);
}

.inventory-hub__grid {
    align-items: stretch;
}

.inventory-hub-tile {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-3);
    min-height: 3.25rem;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.inventory-hub-tile:hover,
.inventory-hub-tile:focus-visible {
    color: var(--color-text);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.inventory-hub-tile__icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.62);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.inventory-hub-tile__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}

.inventory-hub-tile__kpi {
    font-size: var(--text-base);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.inventory-hub-tile__title {
    font-size: var(--text-sm);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text);
}

.inventory-hub-tile__desc {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-secondary);
    line-height: 1.25;
}

.inventory-hub-tile--items { background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%); border-color: #bfdbfe; }
.inventory-hub-tile--low { background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 100%); border-color: #fdba74; }
.inventory-hub-tile--out { background: linear-gradient(145deg, #fef2f2 0%, #fee2e2 100%); border-color: #fca5a5; }
.inventory-hub-tile--expiring { background: linear-gradient(145deg, #fefce8 0%, #fef9c3 100%); border-color: #fde047; }
.inventory-hub-tile--expired { background: linear-gradient(145deg, #fdf2f8 0%, #fce7f3 100%); border-color: #fbcfe8; }
.inventory-hub-tile--moves { background: linear-gradient(145deg, #ecfeff 0%, #cffafe 100%); border-color: #99f6e4; }

.inventory-hub-tile--items .inventory-hub-tile__kpi { color: #1d4ed8; }
.inventory-hub-tile--low .inventory-hub-tile__kpi { color: #c2410c; }
.inventory-hub-tile--out .inventory-hub-tile__kpi { color: #b91c1c; }
.inventory-hub-tile--expiring .inventory-hub-tile__kpi { color: #a16207; }
.inventory-hub-tile--expired .inventory-hub-tile__kpi { color: #be185d; }
.inventory-hub-tile--moves .inventory-hub-tile__kpi { color: #0f766e; }

/* Module subnav styles: static/css/module-subnav.css (loaded in <head> before app.css) */

.inventory-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.inventory-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.inventory-status-badge--ok { background: #dcfce7; color: #166534; }
.inventory-status-badge--low { background: #ffedd5; color: #9a3412; }
.inventory-status-badge--out { background: #fee2e2; color: #991b1b; }
.inventory-status-badge--expiring { background: #fef9c3; color: #854d0e; }
.inventory-status-badge--expired { background: #fce7f3; color: #9d174d; }

/* Item / category edit forms (not filter bars) */
.inventory-item-form__back {
    margin: 0 0 var(--space-4);
    font-size: var(--text-sm);
}

.inventory-item-form__banner {
    margin: 0;
}

.inventory-form-section-title {
    grid-column: 1 / -1;
    margin: var(--space-2) 0 0;
    padding: 0;
    font-size: var(--text-sm);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--color-text-secondary);
    border: 0;
}

.inventory-form-section-title:first-of-type {
    margin-top: 0;
}

.inventory-inline-check {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.inventory-inline-check input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.inventory-inline-check label {
    margin: 0;
    text-transform: none;
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: normal;
    color: var(--color-text);
}

.inventory-category-actions-col {
    width: 6.5rem;
    text-align: right;
    white-space: nowrap;
}

.inventory-category-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
}

.inventory-category-actions__delete {
    display: inline;
    margin: 0;
}
