/* Override WordPress theme width constraints */
body .inventory-container {
    width: 95vw !important;
    max-width: none !important;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* Override parent container constraints */
body .hr-dashboard {
    max-width: none !important;
    width: 100% !important;
}

/* Ensure content wrapper doesn't constrain us */
body .site-content,
body .content-area,
body .container,
body .wrap {
    max-width: none !important;
    width: 100% !important;
}

.inventory-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e1e1;
}

.inventory-header h3 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.inventory-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.filter-btn, .bulk-btn {
    padding: 8px 16px;
    border: 2px solid #dee2e6;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.bulk-btn {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.bulk-btn:hover {
    background: #5a6268;
    border-color: #545b62;
}

.new-inventory-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    margin-left: 5px;
}

.new-inventory-btn:hover {
    background: #138496;
}

.refresh-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #218838;
}

.refresh-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
}

.stat-card.critical {
    background: #f8d7da;
    border-color: #dc3545;
}

.stat-card.warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inventory-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}

.inventory-table th,
.inventory-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.inventory-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.inventory-table tr:hover {
    background: #f8f9fa;
}

.stock-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    white-space: nowrap;
}

.stock-status.out-of-stock {
    background: #dc3545;
    color: white;
}

.stock-status.low-stock {
    background: #ffc107;
    color: #212529;
}

.stock-status.in-stock {
    background: #28a745;
    color: white;
}

.location-stock {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.location-badge {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin: 20px 0;
}

.last-updated {
    text-align: center;
    color: #666;
    font-size: 12px;
    margin-top: 20px;
}

.column-toggle-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    min-width: 150px;
}

.column-toggle-menu label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    cursor: pointer;
}

.column-toggle-menu input[type="checkbox"] {
    margin-right: 8px;
}
.move-item-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.move-item-btn:hover {
    background: #5a6268;
}

.col-select { width: 4%; text-align: center; padding-right: 8px; }
.col-item { width: 31%; }
.col-variation { width: 12%; }
.col-status { width: 8%; }
.col-total { width: 6%; }
.col-threshold { width: 8%; }
.col-locations { width: 15%; }
.col-updated { width: 8%; }
.col-actions { width: 8%; text-align: center; }

#bulk-actions {
    display: flex;
    align-items: center;
}

.item-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.col-select {
    display: table-cell !important;
    visibility: visible !important;
}

.col-select input[type="checkbox"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 16px !important;
    height: 16px !important;
}

/* Force checkbox column to always be visible */
th.col-select, td.col-select {
    display: table-cell !important;
    visibility: visible !important;
}

/* Force all checkbox and button elements to be visible */
.item-checkbox, .new-inventory-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Prevent any hiding of action buttons */
.col-actions .move-item-btn,
.col-actions .new-inventory-btn {
    display: inline-block !important;
    visibility: visible !important;
}

/* Ultra-strong rules to prevent new inventory button hiding */
.new-inventory-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 999 !important;
}

/* Prevent WordPress or theme from hiding buttons */
button.new-inventory-btn,
.inventory-table .new-inventory-btn,
.col-actions button.new-inventory-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}