/* assets/css/admin-style.css and frontend-style.css */

:root {
    --primary-color: #10b981;
    --primary-hover: #059669;
    --secondary-color: #6b7280;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --border-color: #e5e7eb;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.inv-dashboard-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--gray-50);
    min-height: 100vh;
    padding: 20px;
}

.inv-action-btns button {
    display: contents;
}
button#notificationBtn {
    color: #d31212;
	padding: 10px;
}
div#categoryMenu {
    height: 300px !important;
    overflow-x: scroll;
}
/* Header */
.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.inv-sku-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.inv-icon-btn.export-excel {
    color: #059669;
}

.inv-icon-btn.export-excel:hover {
    background: rgba(5, 150, 105, 0.1);
}
.inv-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.inv-logo svg {
    display: block;
}

.inv-icon-btn.restock {
    color: var(--primary-color);
}

.inv-icon-btn.restock:hover {
    background: rgba(16, 185, 129, 0.1);
}

.inv-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.inv-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
form#restockForm {
    padding: 30px;
}

/* Buttons */
.inv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.inv-btn-primary {
    background: var(--primary-color);
    color: white;
}

.inv-btn-primary:hover {
    background: var(--primary-hover);
}

.inv-btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--border-color);
}

.inv-btn-secondary:hover {
    background: var(--gray-50);
}

.inv-notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.inv-notification-btn:hover {
    background: var(--gray-50);
}

.inv-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Filters */
.inv-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.inv-search-box {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.inv-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.inv-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.inv-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.inv-search-input::placeholder {
    color: var(--gray-400);
}

.inv-filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.inv-filter-btn:hover {
    background: var(--gray-50);
}

.inv-filter-btn[data-active="true"] {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.inv-filter-btn-warning {
    border-color: #fecaca;
    background: #fef2f2;
    color: #4b5462;
}

.inv-filter-btn-warning[data-active="true"] {
    background: #fee2e2;
    
}

/* Dropdown */
.inv-dropdown {
    position: relative;
}

.inv-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inv-chevron {
    transition: transform 0.2s;
}

.inv-dropdown.active .inv-chevron {
    transform: rotate(180deg);
}

.inv-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.inv-dropdown.active .inv-dropdown-menu {
    display: block;
}

.inv-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.2s;
}

.inv-dropdown-item:hover {
    background: var(--gray-50);
}

.inv-dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.inv-dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

/* View Toggle */
.inv-view-toggle {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.inv-view-btn {
    padding: 10px 16px;
    border: none;
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.inv-view-btn:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.inv-view-btn:hover {
    background: var(--gray-50);
}

.inv-view-btn-active {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Table */
.inv-table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
}

.inv-table thead {
    background: var(--gray-50);
}

.inv-table th {
    text-align: left;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.inv-table td {
    padding: 20px 24px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--border-color);
}

.inv-table tbody tr:last-child td {
    border-bottom: none;
}

.inv-table tbody tr:hover {
    background: var(--gray-50);
}

.inv-sortable {
    cursor: pointer;
    user-select: none;
}

.inv-sortable:hover {
    color: var(--primary-color);
}

.inv-sort-icon {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.5;
}

.inv-sortable:hover .inv-sort-icon {
    opacity: 1;
}

/* Item Cell */
.inv-item-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inv-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.inv-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.inv-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 4px 0;
}

.inv-item-info p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* Quantity Cell */
.inv-quantity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inv-quantity-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    outline: none;
}

.inv-quantity-input:focus {
    border-color: var(--primary-color);
}

/* Status Badge */
.inv-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.inv-status-in-stock {
    background: #d1fae5;
    color: #065f46;
}

.inv-status-low-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Actions */
.inv-action-btns {
    display: flex;
    gap: 8px;
}

.inv-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.inv-icon-btn:hover {
    background: var(--gray-100);
}

.inv-icon-btn.edit {
    color: var(--primary-color);
}

.inv-icon-btn.export {
    color: var(--gray-600);
}

.inv-icon-btn.delete {
    color: var(--danger-color);
}

.inv-icon-btn.log {
    color: var(--gray-600);
}

/* Loading */
.inv-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 14px;
}

/* Modal */
.inv-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.inv-modal.active {
    display: flex;
}

.inv-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.inv-modal-large {
    max-width: 900px;
}

.inv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color);
}

.inv-modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.inv-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.inv-modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Form */
#itemForm, #updateQuantityForm {
    padding: 30px;
}

.inv-form-group {
    margin-bottom: 20px;
}

.inv-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.inv-form-group input,
.inv-form-group select,
.inv-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.inv-form-group input:focus,
.inv-form-group select:focus,
.inv-form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.inv-form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--gray-500);
}

.inv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.inv-thumbnail-upload {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#thumbnailPreview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.inv-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Log Content */
.inv-log-content {
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
}

/* Card View */
.inv-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.inv-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.inv-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.inv-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.inv-card-body {
    margin-bottom: 16px;
}

.inv-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .inv-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .inv-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inv-search-box {
        min-width: 100%;
    }
    
    .inv-table-wrapper {
        overflow-x: auto;
    }
    
    .inv-form-row {
        grid-template-columns: 1fr;
    }
}

/* Update Icon */
.inv-icon-btn.update {
    color: var(--primary-color);
}

.inv-icon-btn.update:hover {
    background: rgba(16, 185, 129, 0.1);
}

@media print {
    .inv-table td:last-child,
    .inv-table th:last-child {
        display: none !important;
    }
	
	.inv-status-low-stock, .inv-status-in-stock {
		background: #fff;
		color: #000;
	}
}

/* For PDF export via JS */
.hide-for-pdf {
    display: none !important;
}
