/* Inventario Premium Styles */

:root {
    --inv-primary: #0ea5e9;
    --inv-primary-dark: #0369a1;
    --inv-success: #10b981;
    --inv-warning: #f59e0b;
    --inv-danger: #ef4444;
    --inv-bg-card: #ffffff;
    --inv-border: #e2e8f0;
    --inv-text-main: #1e293b;
    --inv-text-muted: #64748b;
    --inv-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --inv-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --inv-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --inv-radius: 16px;
}

/* Header & Stats Section */
.inv-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(99, 102, 241, 0.05));
    border-radius: var(--inv-radius);
    border: 1px solid var(--inv-border);
}

.inv-title-container h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--inv-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.inv-title-container p {
    color: var(--inv-text-muted);
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

/* Form Card Premium */
.inv-card-form {
    background: var(--inv-bg-card);
    border-radius: var(--inv-radius);
    border: 1px solid var(--inv-border);
    box-shadow: var(--inv-shadow-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.inv-card-form-header {
    background: linear-gradient(90deg, #f8fafc 0%, #ffffff 100%);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--inv-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inv-card-form-body {
    padding: 1.5rem;
}

/* Custom Grid for Inputs */
.inv-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.inv-form-group-full {
    grid-column: 1 / -1;
}

/* Premium Inputs */
.inv-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inv-input-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--inv-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.inv-input-premium {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--inv-text-main);
    transition: all 0.2s ease;
}

.inv-input-premium:focus {
    background: #ffffff;
    border-color: var(--inv-primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    outline: none;
}

/* Modern Controls Bar */
.inv-controls-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--inv-border);
    align-items: center;
}

.inv-search-wrapper {
    position: relative;
    flex: 2;
    min-width: 250px;
}

.inv-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--inv-text-muted);
}

.inv-search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 40px;
    border-radius: 12px;
    border: 2px solid var(--inv-border);
    background: #f8fafc;
    transition: all 0.2s;
}

.inv-search-input:focus {
    background: #ffffff;
    border-color: var(--inv-primary);
}

/* View Toggles */
.inv-view-toggles {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.inv-view-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--inv-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.inv-view-btn.active {
    background: white;
    color: var(--inv-primary);
    box-shadow: var(--inv-shadow-sm);
}

/* Premium Table Styling */
.inv-table-container {
    background: white;
    border-radius: var(--inv-radius);
    border: 1px solid var(--inv-border);
    overflow: hidden;
    box-shadow: var(--inv-shadow-md);
}

.inv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.inv-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--inv-text-muted);
    border-bottom: 1px solid var(--inv-border);
}

.inv-table td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--inv-border);
    transition: background 0.2s;
}

.inv-table tr:hover td {
    background: #f0f9ff;
}

.inv-table tr:last-child td {
    border-bottom: none;
}

/* Grid/Card View */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.inv-item-card {
    background: white;
    border-radius: var(--inv-radius);
    border: 1px solid var(--inv-border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.inv-item-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--inv-shadow-lg);
    border-color: var(--inv-primary);
}

.inv-item-image-container {
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.inv-item-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.inv-item-card:hover .inv-item-image {
    transform: scale(1.1);
}

.inv-item-image-placeholder {
    font-size: 3rem;
    color: #cbd5e1;
}

.inv-item-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: var(--inv-shadow-md);
}

.inv-item-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.inv-item-cat {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--inv-primary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.inv-item-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--inv-text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.inv-item-meta {
    font-size: 0.85rem;
    color: var(--inv-text-muted);
    margin-bottom: 1rem;
}

.inv-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.inv-item-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--inv-text-main);
}

.inv-item-stock-tag {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Status Colors */
.status--critico {
    color: var(--inv-danger);
    background: #fee2e2;
}

.status--bajo {
    color: var(--inv-warning);
    background: #fef3c7;
}

.status--exceso {
    color: #8b5cf6;
    background: #f5f3ff;
}

.status--disponible {
    color: var(--inv-success);
    background: #dcfce7;
}

/* Animation for the form visibility */
.inv-expand-btn {
    background: transparent;
    border: none;
    color: var(--inv-primary);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .inv-header-premium {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .inv-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .inv-search-wrapper {
        min-width: 100%;
    }
}
