﻿.stock-check-tab-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stock-check-tab-title {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.stock-check-tab-subtitle {
    margin: 0;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.stock-check-filters .filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.stock-check-filters .filter-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.stock-check-summary-row {
    justify-content: flex-start;
    gap: 1rem;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.stock-check-stocktake-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #6d4c00;
    font-size: 0.9rem;
}

.stock-check-variance-panel {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.stock-check-variance-panel h3 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.stock-check-analytics {
    margin: 0 0 1.25rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    background: var(--light-gray, #f8f9fa);
}

.stock-check-analytics-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.sc-analytics-card {
    padding: 0.55rem 0.65rem;
    background: #fff;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
}

.sc-analytics-label {
    font-size: 0.75rem;
    color: var(--text-secondary, #666);
    margin-bottom: 0.2rem;
}

.sc-analytics-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color, #333);
}

.stock-check-aisle-coverage {
    margin-top: 0.75rem;
}

.sc-aisle-heading {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    margin-bottom: 0.35rem;
}

.sc-aisle-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sc-aisle-row {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    font-size: 0.85rem;
}

.sc-aisle-name {
    flex: 1;
    min-width: 0;
}

.sc-aisle-pct {
    font-weight: 600;
    min-width: 3.5rem;
    text-align: right;
}

.sc-aisle-meta {
    color: var(--text-secondary, #666);
    min-width: 4rem;
    text-align: right;
}

.fix-action-btn.count-btn {
    border-color: var(--warning-color, #ff9800);
    color: #b26a00;
}

.fix-action-btn.count-btn:hover {
    background-color: var(--warning-color, #ff9800);
    color: white;
}

/* Confirm count popup (extends shared .location-edit-popup / .popup-content) */
.confirm-count-product {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.confirm-count-expected {
    color: var(--text-secondary, #666);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.confirm-count-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    margin-bottom: 0.25rem;
}

.confirm-count-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.confirm-count-status.is-success {
    background: #e8f5e9;
    color: #1b5e20;
}

.confirm-count-status.is-warning {
    background: #fff3e0;
    color: #8a5300;
}

.confirm-count-status.is-error {
    background: #fdecea;
    color: #c62828;
}

@media (max-width: 768px) {
    .stock-check-analytics-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

:root {
    --primary-color: #0095ff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ff9800;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
    --text-color: #333;
    --text-secondary: #666;
    --toggle-width: 50px;
    --toggle-height: 24px;
    --toggle-padding: 2px;
}

/* Tab navigation styles are shared in components.css */

/* Fix-Quick: wrap tabs onto new rows instead of horizontal scroll */
.tabs-wrap-list {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: flex-start;
    row-gap: 0.25rem;
    padding-bottom: 0;
}

.tabs-wrap-list .tab-button {
    flex: 0 1 auto;
}

@media (max-width: 768px) {
    .tabs-wrap-list {
        flex-wrap: wrap;
        gap: 0;
    }
}

/* Tab Content */
.fix-tab-content {
    display: none;
}

.fix-tab-content.active {
    display: block;
}

/* Filter Section */
.filter-section {
    background-color: var(--light-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-row:not(:last-child) {
    margin-bottom: 0.75rem;
}

.filter-input {
    flex: 1;
    min-width: 150px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 149, 255, 0.1);
}

.filter-controls {
    justify-content: space-between;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 22px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Clear Filter Button */
.clear-filter-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filter-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Result Count */
.result-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: auto;
}

.result-count span {
    color: var(--primary-color);
    font-weight: 700;
}

/* Results Container */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 200px;
}

/* Product Card - Similar to Find-Quick result-item */
.fix-product-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    opacity: 1;
}

.fix-product-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* Match Pick Quick hide motion */
.fix-product-card.removing,
.duplicate-group-card.removing {
    opacity: 0;
    transform: translateX(-100%);
    pointer-events: none;
}

.fix-product-card.removing:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transform: translateX(-100%);
}

/* Soft-hold after tab issue is fixed - stays until next list load */
.fix-product-card.is-resolved,
.duplicate-item.is-resolved {
    opacity: 0.55;
    background-color: #f8f9fa;
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-card-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    margin: 0 0 0.25rem 0;
    word-break: break-word;
}

.product-card-vendor {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-card-inventory {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.product-card-inventory .inventory-value {
    font-weight: 600;
    color: var(--text-color);
}

.product-card-body {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.product-card-image {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.product-card-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-card-sku,
.product-card-location,
.product-card-barcode {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-card-sku span,
.product-card-location span,
.product-card-barcode span {
    font-weight: 600;
    color: var(--text-color);
    font-family: monospace;
}

.product-card-sku .missing-value,
.product-card-location .missing-value,
.product-card-barcode .missing-value {
    color: var(--error-color, #c62828);
    font-family: inherit;
    font-weight: 700;
}

.product-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Action Button */
.fix-action-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--primary-color);
    background-color: white;
    color: var(--primary-color);
    white-space: nowrap;
}

.fix-action-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.fix-action-btn.sku-btn {
    border-color: var(--success-color);
    color: var(--success-color);
}

.fix-action-btn.sku-btn:hover {
    background-color: var(--success-color);
    color: white;
}

.fix-action-btn.location-btn {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.fix-action-btn.location-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.fix-action-btn.ignore-btn {
    border-color: #8a8f98;
    color: #5f6670;
}

.fix-action-btn.ignore-btn:hover {
    background-color: #5f6670;
    color: white;
}

.fix-product-card.is-ignored,
.duplicate-group-card.is-ignored {
    opacity: 0.85;
    border-style: dashed;
}

.duplicate-group-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Ensure product-card-actions in duplicate items match base layout */
.duplicate-item .product-card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

/* Duplicate Group Card */
.duplicate-group-card {
    background: white;
    border: 1px solid var(--warning-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

.duplicate-group-header {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--warning-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.duplicate-group-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #e65100;
}

.duplicate-group-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.duplicate-group-title code {
    background: rgba(255, 152, 0, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    margin-left: 0.5rem;
}

.duplicate-group-count {
    font-size: 0.8rem;
    color: #bf360c;
    font-weight: 500;
}

.duplicate-group-items {
    padding: 0.5rem;
}

.duplicate-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

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

.duplicate-item-image {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.duplicate-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.duplicate-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.duplicate-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

.duplicate-item-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.duplicate-item-meta span {
    font-family: monospace;
    font-weight: 500;
}

.duplicate-item-inventory {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.duplicate-item-inventory span {
    background: var(--bg-light);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.duplicate-item-inventory strong {
    color: var(--text-color);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0 1rem;
}

/* Placeholder Content */
.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

/* display:flex above must not defeat [hidden] (same pattern as nav-account) */
.placeholder-content[hidden] {
    display: none !important;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.placeholder-content h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.placeholder-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.placeholder-subtitle {
    font-size: 0.9rem !important;
    margin-top: 0.5rem !important;
    opacity: 0.8;
}

/* Loading State */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

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

/* Responsive Styles */

/* Desktop */
/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .product-card-body {
        grid-template-columns: 60px 1fr auto;
    }
    
    .product-card-image {
        width: 60px;
        height: 60px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }
    
    .filter-input {
        width: 100%;
    }
    
    .filter-controls {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .toggle-container {
        order: 1;
    }
    
    .clear-filter-btn {
        order: 2;
    }
    
    .result-count {
        order: 3;
        width: 100%;
        text-align: center;
        margin: 0.5rem 0 0 0;
    }
    
    .product-card-body {
        grid-template-columns: 60px 1fr;
        gap: 0.75rem;
    }
    
    .product-card-image {
        width: 60px;
        height: 60px;
    }
    
    .product-card-actions {
        grid-column: span 2;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: stretch;
        gap: 0.5rem;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .fix-action-btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
        text-align: center;
        white-space: normal;
    }
    
    .duplicate-item {
        grid-template-columns: 45px 1fr;
    }

    .duplicate-item .product-card-actions {
        min-width: 0;
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    
}

/* Small Mobile */
@media (max-width: 480px) {
    .filter-section {
        padding: 0.75rem;
    }
    
    .fix-product-card {
        padding: 0.75rem;
    }
    
    .product-card-title {
        font-size: 0.9rem;
    }
    
    .product-card-body {
        grid-template-columns: 50px 1fr;
    }
    
    .product-card-image {
        width: 50px;
        height: 50px;
    }

    .product-card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
        padding-top: 0.5rem;
    }

    .fix-action-btn {
        width: 100%;
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
        white-space: normal;
        text-align: center;
    }

    .duplicate-item .product-card-actions {
        min-width: 0;
        width: 100%;
        align-items: center;
        justify-content: center;
    }
    
    .pagination-container {
        flex-wrap: wrap;
    }
}

