/* ===== Inventory View Styles ===== */
/* Design System: "Refined Industrial" - Copper=#c17f59 */

/* ===== Container ===== */
.inventory-container {
    padding: 0 24px 32px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== Stats Row ===== */
.inventory-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.inventory-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow var(--transition-fast);
}

.inventory-stat-card:hover {
    box-shadow: var(--shadow-md);
}

.inventory-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.inventory-stat-icon svg {
    width: 20px;
    height: 20px;
}

.inventory-stat-icon.icon-total {
    background: linear-gradient(135deg, var(--blue-light), #d4e3f5);
    color: var(--blue);
}

.inventory-stat-icon.icon-low {
    background: linear-gradient(135deg, var(--amber-light), #fde8b8);
    color: var(--amber);
}

.inventory-stat-icon.icon-out {
    background: linear-gradient(135deg, var(--red-light), #fad8d6);
    color: var(--red);
}

.inventory-stat-icon.icon-value {
    background: linear-gradient(135deg, rgba(193, 127, 89, 0.12), rgba(193, 127, 89, 0.2));
    color: var(--copper);
}

.inventory-stat-info {
    flex: 1;
    min-width: 0;
}

.inventory-stat-value {
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.inventory-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Toolbar ===== */
.inventory-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.inventory-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.inventory-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

.inventory-search-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.inventory-search {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.inventory-search::placeholder {
    color: var(--text-tertiary);
}

.inventory-search:focus {
    border-color: var(--copper-light);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
    background: var(--bg-white);
}

.inventory-filter-select {
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color var(--transition-fast);
    white-space: nowrap;
}

.inventory-filter-select:focus {
    border-color: var(--copper-light);
    outline: none;
}

.inventory-toolbar-spacer {
    flex: 1;
}

/* ===== Table Card ===== */
.inventory-table-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ===== Table ===== */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table-header-row {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.inventory-table th {
    padding: 11px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    user-select: none;
}

.inventory-table th.sortable {
    cursor: pointer;
}

.inventory-table th.sortable:hover {
    color: var(--copper);
}

.inventory-table th.col-stock,
.inventory-table th.col-price {
    text-align: right;
}

.inventory-table-row {
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.inventory-table-row:last-child {
    border-bottom: none;
}

.inventory-table-row:hover {
    background: rgba(193, 127, 89, 0.04);
}

.inventory-table-row:hover .product-name-text {
    color: var(--copper);
}

.inventory-table td {
    padding: 13px 16px;
    vertical-align: middle;
}

.inventory-table td.col-stock,
.inventory-table td.col-price {
    text-align: right;
}

/* ===== Cell Content ===== */
.product-name-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-name-with-image {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.product-name-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.product-name-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.product-sku {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

.product-cost {
    color: var(--text-secondary);
    font-weight: 500;
}

.product-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.product-supplier {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== Category Badge ===== */
.product-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.product-category-badge.cat-parts {
    background: var(--blue-light);
    color: var(--blue);
}

.product-category-badge.cat-consumables {
    background: var(--green-light);
    color: var(--green);
}

.product-category-badge.cat-electronics {
    background: var(--purple-light);
    color: var(--purple);
}

/* ===== Stock Badge ===== */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

.stock-ok {
    background: var(--green-light);
    color: var(--green);
}

.stock-low {
    background: var(--amber-light);
    color: var(--amber);
}

.stock-warning {
    background: #fff8e1;
    color: #b37a00;
}

.stock-critical {
    background: var(--red-light);
    color: var(--red);
}

.stock-out {
    background: #fef2f2;
    color: #991b1b;
    font-weight: 600;
}

.stock-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* ===== Empty State ===== */
.inventory-empty-state {
    padding: 60px 24px;
    text-align: center;
    color: var(--text-tertiary);
}

.inventory-empty-state svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.inventory-empty-state p {
    font-size: 0.9rem;
}

/* ===== Product Detail Panel ===== */
.product-detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.product-detail-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.product-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    background: var(--bg-white);
    box-shadow: var(--shadow-xl);
    z-index: 301;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow: hidden;
}

.product-detail-panel.open {
    transform: translateX(0);
}

.product-detail-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.product-detail-header-info {
    flex: 1;
    min-width: 0;
}

.product-detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(193, 127, 89, 0.1);
    color: var(--copper);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-detail-name {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.product-detail-sku {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.panel-close-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.panel-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.panel-close-btn svg {
    width: 16px;
    height: 16px;
}

.product-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-detail-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.product-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.product-detail-row-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-detail-row-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* ===== Stock Level Bar ===== */
.stock-level-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.stock-level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stock-level-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stock-level-numbers {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.stock-level-numbers strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.stock-level-bar-bg {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.stock-level-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stock-level-bar-fill.level-ok { background: var(--green); }
.stock-level-bar-fill.level-warning { background: #e6a800; }
.stock-level-bar-fill.level-low { background: var(--amber); }
.stock-level-bar-fill.level-critical { background: var(--red); }
.stock-level-bar-fill.level-out { background: #991b1b; }

.stock-level-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.stock-level-min-label {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* ===== Stock Adjust ===== */
.stock-adjust-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stock-adjust-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-adjust-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast);
    background: var(--bg-white);
}

.stock-adjust-input:focus {
    border-color: var(--copper-light);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.stock-adjust-input[type="number"] {
    -moz-appearance: textfield;
}

.stock-adjust-input[type="number"]::-webkit-inner-spin-button,
.stock-adjust-input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

.stock-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stock-edit-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--copper-light);
    color: var(--copper);
}

.stock-edit-btn svg {
    width: 14px;
    height: 14px;
}

.stock-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--copper);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.stock-save-btn:hover {
    background: var(--copper-dark);
}

/* ===== History Section ===== */
.stock-history-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stock-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.stock-history-item:last-child {
    border-bottom: none;
}

.stock-history-item:nth-child(odd) {
    background: var(--bg-primary);
}

.stock-history-desc {
    color: var(--text-secondary);
    flex: 1;
}

.stock-history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-history-delta {
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

.stock-history-delta.positive {
    color: var(--green);
}

.stock-history-delta.negative {
    color: var(--red);
}

.stock-history-date {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    white-space: nowrap;
}

/* ===== Add Product Modal ===== */
.add-product-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.add-product-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.add-product-modal {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(8px);
    transition: transform var(--transition-base);
}

.add-product-overlay.open .add-product-modal {
    transform: scale(1) translateY(0);
}

.add-product-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.add-product-modal-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.add-product-badge {
    display: inline-flex;
    padding: 2px 8px;
    background: rgba(193, 127, 89, 0.1);
    color: var(--copper);
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: fit-content;
    margin-bottom: 4px;
}

.add-product-modal-title h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.add-product-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.add-product-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.add-product-form-grid .form-group-full {
    grid-column: 1 / -1;
}

.add-product-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.add-product-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.add-product-label .required {
    color: var(--red);
    margin-left: 2px;
}

.add-product-input,
.add-product-select {
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.add-product-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
    cursor: pointer;
}

.add-product-input:focus,
.add-product-select:focus {
    border-color: var(--copper-light);
    box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.1);
}

.add-product-input::placeholder {
    color: var(--text-tertiary);
}

.add-product-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    background: var(--bg-primary);
}

/* ===== Products Used Section (in Job Panel) ===== */
.products-used-section {
    margin-top: 4px;
}

.products-used-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.products-used-title-icon {
    width: 20px;
    height: 20px;
    background: rgba(90, 154, 110, 0.12);
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
}

.products-used-title-icon svg {
    width: 12px;
    height: 12px;
}

.products-used-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.products-used-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.products-used-item-info {
    flex: 1;
    min-width: 0;
}

.products-used-item-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.products-used-item-sku {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.products-used-item-qty-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.products-used-item-qty {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.products-used-item-price {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.products-used-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

.products-used-add-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.products-used-add-select {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239b9ba3' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 26px;
    transition: border-color var(--transition-fast);
    min-width: 0;
}

.products-used-add-select:focus {
    border-color: var(--copper-light);
    outline: none;
}

.products-used-qty-input {
    width: 56px;
    padding: 7px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--text-primary);
    background: var(--bg-white);
    outline: none;
    text-align: center;
    transition: border-color var(--transition-fast);
    -moz-appearance: textfield;
}

.products-used-qty-input:focus {
    border-color: var(--copper-light);
}

.products-used-qty-input::-webkit-inner-spin-button,
.products-used-qty-input::-webkit-outer-spin-button {
    opacity: 1;
}

.products-used-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--copper);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.products-used-add-btn:hover {
    background: var(--copper-dark);
}

.products-used-add-btn svg {
    width: 14px;
    height: 14px;
}

.products-used-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.products-used-total-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.products-used-total-value {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--copper);
}

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

.inventory-view-btn {
    padding: 6px 10px;
    background: var(--bg-white);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

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

.inventory-view-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.inventory-view-btn.active {
    background: var(--copper);
    color: white;
}

/* ===== Grid / Card View ===== */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.inventory-product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.inventory-product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.inventory-product-card:hover .inventory-product-card-name {
    color: var(--copper);
}

.inventory-product-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.inventory-product-card-image img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
}

.inventory-product-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inventory-product-card-name {
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: color var(--transition-fast);
    line-height: 1.3;
}

.inventory-product-card-sku {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

.inventory-product-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-product-card-pricing {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
}

.inventory-product-card-price,
.inventory-product-card-cost {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inventory-product-card-price-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.inventory-product-card-price-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.inventory-product-card-cost .inventory-product-card-price-value {
    color: var(--copper);
}

.inventory-product-card-supplier {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-top: 6px;
}

.inventory-product-card-supplier svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

/* ===== Product Detail Image ===== */
.product-detail-image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.product-detail-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
    .inventory-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .inventory-container {
        padding: 0 16px 24px;
    }

    .inventory-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .inventory-table th:nth-child(5),
    .inventory-table td:nth-child(5),
    .inventory-table th:nth-child(6),
    .inventory-table td:nth-child(6) {
        display: none;
    }

    .add-product-form-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-panel {
        width: 100%;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .product-thumb {
        width: 32px;
        height: 32px;
    }
}
