/* ===== BUY ACCOUNT OPTIMIZED UI/UX ===== */

/* Modern Page Header */
.page-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.page-title-icon i {
    font-size: 2rem;
    color: white;
}

.page-title-text .title {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-title-text .subtitle {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 400;
}



.balance-display {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    text-align: center;
}

.balance-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

/* Modern Buttons */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.btn-modern--primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-modern--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-badge {
    background: #ff4757;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
}

/* Enhanced Statistics Dashboard */
.stats-dashboard {
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card__icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-card--primary .stat-card__icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card--success .stat-card__icon {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.stat-card--warning .stat-card__icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card--info .stat-card__icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card__number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.stat-card__label {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.stat-card__trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #27ae60;
}

.stat-card__bg-pattern {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Horizontal Filters */
.filters-horizontal {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.filters-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.filters-left {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    flex: 1;
}

.filters-right {
    display: flex;
    align-items: center;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Filters Sidebar (Legacy - for backward compatibility) */
.filters-sidebar {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 2rem;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.filters-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-reset-filters {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    color: white;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-reset-filters:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    color: white;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    display: block;
}

/* Search Input */
.search-input-wrapper {
    position: relative;
}

.search-input {
    padding-left: 2.5rem;
    border-radius: 12px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.category-item:hover {
    background: #f8f9fa;
    border-color: #ddd;
}

.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.category-item i {
    font-size: 1.25rem;
    width: 20px;
    text-align: center;
}

/* Price Range */
.price-range-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-input {
    flex: 1;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.5rem;
}

.price-separator {
    color: #7f8c8d;
    font-weight: 600;
}

.price-range-display {
    text-align: center;
    font-size: 0.875rem;
    color: #667eea;
    font-weight: 600;
}

/* Checkbox Wrapper */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin: 0;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.checkbox-label {
    font-size: 0.875rem;
    color: #2c3e50;
}

/* Products Section */
.products-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.products-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.products-count {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-left: 0.5rem;
}

.products-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-dropdown select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: white;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: #667eea;
    color: white;
}

.btn-refresh {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
}

.btn-refresh:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    color: white;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-animation {
    margin-bottom: 1.5rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.loading-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.loading-subtitle {
    color: #7f8c8d;
    margin: 0;
}

/* Quick Actions FAB */
.quick-actions-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quick-actions-fab.active .fab-menu {
    opacity: 1;
    visibility: visible;
}

.fab-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #667eea;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.fab-item:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    } 40% {
        transform: scale(1);
    }
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Fix for long dropdown options */
.account-type-select {
    width: 100%;
    max-width: 100%;
    font-size: 0.9rem;
}

.account-type-select option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 8px 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Tooltip for full text on hover */
.account-type-select option[title] {
    position: relative;
}

/* Modal improvements for better dropdown display */
.modal-lg .account-type-select {
    min-height: 45px;
}

/* Custom dropdown styling */
.form-control-modern.account-type-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Custom Searchable Dropdown */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-dropdown-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
    font-size: 0.85rem;
    line-height: 1.4;
}

.custom-dropdown-item:hover {
    background-color: #f8f9fa;
}

.custom-dropdown-item.selected {
    background-color: #667eea;
    color: white;
}

.custom-dropdown-item:last-child {
    border-bottom: none;
}

/* Show dropdown when active */
.custom-dropdown.active .custom-dropdown-list {
    display: block;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .account-type-select option {
        font-size: 0.8rem;
        padding: 6px 10px;
    }

    .modal-lg .account-type-select {
        min-height: 40px;
    }

    .custom-dropdown-list {
        max-height: 150px;
    }

    .custom-dropdown-item {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
}

/* ===== SELECT2 CUSTOMIZATION FOR BUY ACCOUNT ===== */

/* Select2 container styling */
.select2-container--default .select2-selection--single {
    height: 45px !important;
    border: 2px solid #e1e5e9 !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    line-height: 41px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0 !important;
    padding-right: 20px !important;
    line-height: 41px !important;
    font-size: 0.9rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 41px !important;
    right: 8px !important;
}

/* Focus state */
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Dropdown styling */
.select2-dropdown {
    border: 2px solid #e1e5e9 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    margin-top: 4px !important;
}

/* Search box styling */
.select2-search--dropdown {
    padding: 12px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 0.9rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #667eea !important;
    outline: none !important;
}

/* Custom stock option styling */
.select2-stock-option {
    padding: 4px 0;
}

.select2-stock-option .stock-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.select2-stock-option .stock-details {
    font-size: 0.75rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.select2-stock-option .stock-year {
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.select2-stock-option .stock-price {
    color: #27ae60;
    font-weight: 600;
}

.select2-stock-option .stock-available {
    color: #e67e22;
}

/* Results styling */
.select2-container--default .select2-results__option {
    padding: 12px 16px !important;
    border-bottom: 1px solid #f1f3f4;
}

.select2-container--default .select2-results__option:last-child {
    border-bottom: none;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #f8f9fa !important;
    color: #2c3e50 !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #667eea !important;
    color: white !important;
}

.select2-container--default .select2-results__option[aria-selected=true] .select2-stock-option .stock-name {
    color: white;
}

.select2-container--default .select2-results__option[aria-selected=true] .select2-stock-option .stock-details {
    color: rgba(255, 255, 255, 0.8);
}

/* Modal specific adjustments */
.modal-body-modern .select2-container {
    width: 100% !important;
}

/* Responsive adjustments for Select2 */
@media (max-width: 768px) {
    .select2-container--default .select2-selection--single {
        height: 40px !important;
        line-height: 36px !important;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 36px !important;
        font-size: 0.85rem;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px !important;
    }

    .select2-stock-option .stock-name {
        font-size: 0.85rem;
    }

    .select2-stock-option .stock-details {
        font-size: 0.7rem;
    }
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-card__header {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-badge.in-stock {
    background: #d4edda;
    color: #155724;
}

.product-badge.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.product-card__body {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price .price-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    display: block;
}

.product-price .price-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #667eea;
}

.product-provider {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #7f8c8d;
}

.product-stocks {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #667eea;
    font-weight: 600;
}

.product-card__footer {
    padding: 0 1.5rem 1.5rem;
}

.product-card__footer .btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.product-card__footer .btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white !important;
}

.product-card__footer .btn:disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.product-card--disabled {
    opacity: 0.7;
    filter: grayscale(20%);
}

.product-card--disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* List View */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-list-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.product-list-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.product-list__icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.product-list__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list__content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-list__main {
    flex: 1;
}

.product-list__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-right: 1rem;
    font-size: 0.75rem;
    color: #7f8c8d;
}

.meta-item.in-stock {
    color: #27ae60;
}

.meta-item.out-of-stock {
    color: #e74c3c;
}

/* Empty and Error States */
.empty-state, .error-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon, .error-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.empty-icon {
    background: #f8f9fa;
    color: #7f8c8d;
}

.error-icon {
    background: #fee;
    color: #e74c3c;
}

.empty-title, .error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.empty-subtitle, .error-subtitle {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.empty-state .btn, .error-state .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-state .btn:hover, .error-state .btn:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white !important;
}

/* Enhanced Purchase Modal */
.modal-modern .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 2rem;
    border: none;
}

.modal-title-wrapper .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-subtitle {
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

.btn-close-modern {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.btn-close-modern:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body-modern {
    padding: 2rem;
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.form-label-modern .required {
    color: #e74c3c;
}

.form-control-modern {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control-modern:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control-modern select {
    max-width: 100%;
}

.form-control-modern option {
    padding: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Specific styling for stock select in modal */
#stockSelect {
    max-width: 100%;
}

#stockSelect option {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
    font-size: 0.9rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.quantity-input {
    text-align: center;
    flex: 1;
}

.form-hint {
    color: #7f8c8d;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.account-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.details-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.detail-label {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.detail-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

.detail-value#accountDescription {
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: normal;
    max-width: 300px;
    color: #666;
}

.order-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
}

.summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.summary-label {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.summary-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

.summary-divider {
    height: 1px;
    background: #dee2e6;
    margin: 1rem 0;
}

.summary-total {
    font-size: 1rem;
    padding-top: 0.5rem;
    border-top: 2px solid #dee2e6;
}

.summary-total .summary-label,
.summary-total .summary-value {
    font-weight: 700;
    color: #2c3e50;
}

.balance-check {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.balance-label {
    color: #7f8c8d;
    font-size: 0.875rem;
}

.balance-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

.balance-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #27ae60;
}

.balance-status.insufficient {
    color: #e74c3c;
}

.balance-status.sufficient {
    color: #27ae60;
}

.modal-footer-modern {
    padding: 1.5rem 2rem;
    border: none;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

/* Additional Modal Styles */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-modern .modal-dialog {
    margin: 2rem auto;
    max-width: 800px;
}

/* Form Enhancements */
.form-control-modern:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-modern:disabled::before {
    display: none;
}

/* Loading Spinner in Button */
.la-spin {
    animation: spin 1s linear infinite;
}

/* Provider Filters */
.provider-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.provider-filters::-webkit-scrollbar {
    width: 4px;
}

.provider-filters::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.provider-filters::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.provider-filters::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .page-header-left {
        justify-content: center;
    }

    .page-header-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .products-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .products-controls {
        justify-content: space-between;
    }

    .filters-sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }

    .filters-left {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-item {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-list-item {
        flex-direction: column;
        text-align: center;
    }

    .product-list__content {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-actions-fab {
        bottom: 1rem;
        right: 1rem;
    }

    .modal-dialog {
        margin: 1rem;
    }

    .modal-header-modern,
    .modal-body-modern,
    .modal-footer-modern {
        padding: 1.5rem;
    }
}
