/* ===========================
   Inventory Page — shadcn UI
   =========================== */

/* Inventory Banner */
.inventory-banner {
    background: var(--card, #0a0a0c);
    border: 1px solid var(--border, #27272a);
    border-radius: var(--radius, 0.5rem);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary, #ed1a3b);
}

.inventory-banner h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.inventory-banner p {
    font-size: 0.8125rem;
    color: var(--muted-foreground, #a1a1aa);
}

/* Inventory Table */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.inventory-table thead th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--muted-foreground, #a1a1aa);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border, #27272a);
    background: var(--muted, #27272a);
    white-space: nowrap;
}

.inventory-table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border, #27272a);
    color: var(--foreground, #fafafa);
    vertical-align: middle;
}

.inventory-table tbody tr:hover {
    background: rgba(237, 26, 59, 0.04);
}

/* Editable Cells */
.editable-cell {
    cursor: pointer;
    position: relative;
    transition: var(--transition, all 0.15s ease);
    padding: 0.375rem 0.5rem;
}

.editable-cell:hover {
    background: rgba(237, 26, 59, 0.06);
    border-radius: calc(var(--radius, 0.5rem) / 2);
}

.editable-cell input {
    width: 100%;
    max-width: 100px;
    padding: 0.25rem 0.5rem;
    background: var(--background, #09090b);
    border: 1px solid var(--ring, #ed1a3b);
    border-radius: calc(var(--radius, 0.5rem) / 2);
    color: var(--foreground, #fafafa);
    font-size: 0.8125rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    box-shadow: 0 0 0 2px rgba(237, 26, 59, 0.2);
}

/* Stock Badges */
.stock-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    border-radius: calc(var(--radius, 0.5rem) * 10);
    font-size: 0.6875rem;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.stock-badge.low-stock {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.stock-badge.out-of-stock {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

/* Inventory Stats */
.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--card, #0a0a0c);
    border: 1px solid var(--border, #27272a);
    border-radius: var(--radius, 0.5rem);
    padding: 1rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground, #fafafa);
}

.stat-card .stat-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--muted-foreground, #a1a1aa);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .inventory-stats {
        grid-template-columns: 1fr 1fr;
    }

    .inventory-table {
        font-size: 0.75rem;
    }

    .inventory-table thead th,
    .inventory-table tbody td {
        padding: 0.375rem 0.5rem;
    }
}

/* ===========================
   Warning Banner — Blink & Emphasis
   =========================== */
.warning-banner {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: var(--radius, 0.5rem);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #92400e;
    font-size: 0.875rem;
    text-align: center;
    animation: warningBlink 1.5s ease-in-out infinite;
}

@keyframes warningBlink {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }

    50% {
        opacity: 0.85;
        box-shadow: 0 0 12px 4px rgba(245, 158, 11, 0.4);
    }
}

/* ===========================
   Modal Centering Fix
   =========================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active,
.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: var(--card, #ffffff);
    border: 1px solid var(--border, #e4e4e7);
    border-radius: var(--radius, 0.5rem);
    padding: 1.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* ===========================
   Data Table — Proper Spacing
   =========================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.data-table thead th {
    padding: 0.625rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--muted-foreground, #71717a);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border, #e4e4e7);
    background: var(--muted, #f4f4f5);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border, #e4e4e7);
    color: var(--foreground, #09090b);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(237, 26, 59, 0.04);
}

/* ===========================
   Actions Section — Button Layout
   =========================== */
.actions-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}