/* ===== Custom Badge Colors ===== */
.text-bg-purple {
    color: #fff !important;
    background-color: #6F42C1 !important;
}

/* ===== Global Font ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
}

@media (min-width: 768px) {


    #sidebar .offcanvas-header {
        display: none;
    }

    #sidebar .offcanvas-body {
        overflow-y: auto;
    }
}

.app-content {
    padding: 24px 24px;
}

@media (max-width: 576px) {
    .app-content {
        padding: 16px 12px;
    }
}

/* ===== Product Search Autocomplete ===== */
.product-search-container {
    position: relative;
}

.product-search-container .search-input {
    padding-left: 2.2rem;
}

.product-search-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 0.875rem;
}

.product-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 300px;
    overflow-y: auto;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

[data-bs-theme="dark"] .product-search-dropdown {
    background: #212529;
    border: 1px solid #495057;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .product-search-dropdown {
    background: #fff;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-search-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

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

[data-bs-theme="dark"] .product-search-item {
    border-bottom: 1px solid #2c3034;
}

[data-bs-theme="dark"] .product-search-item:hover,
[data-bs-theme="dark"] .product-search-item.active {
    background: #2c3034;
}

[data-bs-theme="light"] .product-search-item {
    border-bottom: 1px solid #e9ecef;
}

[data-bs-theme="light"] .product-search-item:hover,
[data-bs-theme="light"] .product-search-item.active {
    background: #f8f9fa;
}

.product-search-item .product-info {
    flex: 1;
    min-width: 0;
}

.product-search-item .product-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-bs-theme="dark"] .product-search-item .product-brand {
    font-size: 0.75rem;
    color: #adb5bd;
}

[data-bs-theme="light"] .product-search-item .product-brand {
    font-size: 0.75rem;
    color: #6c757d;
}

.product-search-item .product-prices {
    text-align: right;
    flex-shrink: 0;
    font-size: 0.75rem;
}

[data-bs-theme="dark"] .product-search-item .product-prices .cost {
    color: #adb5bd;
}

[data-bs-theme="light"] .product-search-item .product-prices .cost {
    color: #6c757d;
}

.product-search-item .product-prices .sell {
    color: #20c997;
    font-weight: 600;
}

.product-search-no-results {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ===== Forced thumbnail sizes (inline styles are primary, these are fallback) ===== */
.prod-thumb {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    border-radius: 3px;
    object-fit: cover;
    flex-shrink: 0;
    vertical-align: middle;
}

.prod-thumb-ph {
    width: 60px !important;
    height: 60px !important;
    max-width: 60px !important;
    max-height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
    vertical-align: middle;
}

[data-bs-theme="dark"] .prod-thumb-ph {
    background: #343a40;
    color: #6c757d;
}

[data-bs-theme="light"] .prod-thumb-ph {
    background: #e9ecef;
    color: #adb5bd;
}

/* ===== Order Items Popover ===== */
.order-items-popover {
    max-width: none !important;
    width: auto !important;
}

.order-items-popover .popover-body {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 350px;
}

.order-items-popover .popover-body .table {
    margin-bottom: 0;
    white-space: nowrap;
}

.order-popover {
    cursor: pointer;
    border-bottom: 1px dashed #6c757d;
}
