@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

#stylev2 {
    font-family: "Poppins", system-ui, sans-serif;
}

#stylev2 .products-container,
#stylev2 .product-form-container {
    background: #f8fafc;
    min-height: 100vh;
}

/* Header Styles */
#stylev2 .header-section {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
}

#stylev2 .header-main {
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#stylev2 .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: -webkit-fill-available;
}

#stylev2 .back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#stylev2 .back-btn:hover {
    background: #e2e8f0;
    transform: translateX(-2px);
}

/* Header Actions */
#stylev2 .header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

#stylev2 .header-actions .btn-primary,
#stylev2 .header-actions .btn-secondary {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

#stylev2 .header-actions .btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

#stylev2 .header-actions .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e2f5c 100%);
    transform: translateY(-1px);
}

#stylev2 .header-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#stylev2 .header-actions .btn-secondary {
    background: #f1f5f9;
    color: #374151;
    border: 1px solid #d1d5db;
}

#stylev2 .header-actions .btn-secondary:hover {
    background: #e2e8f0;
}

#stylev2 .modal-footer .btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#stylev2 .modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e2f5c 100%);
    transform: translateY(-1px);
}
/* Main Content */
#stylev2 .main-content {
    margin: 0 auto;
    padding: 24px;
}

#stylev2 .form-content {
    margin: 0 auto;
    padding: 24px;
}

/* Filters Section */
#stylev2 .filters-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#stylev2 .filters-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: end;
}

#stylev2 .filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#stylev2 .filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

#stylev2 .filter-select {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

#stylev2 .filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#stylev2 .search-container {
    width: 100%;
}

#stylev2 .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
}

#stylev2 .search-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#stylev2 .search-icon {
    position: absolute;
    left: 12px;
    color: #6b7280;
}

#stylev2 .search-input {
    flex: 1;
    border: none;
    padding: 12px 12px 12px 40px;
    font-size: 14px;
    background: transparent;
    outline: none;
}

#stylev2 .search-btn {
    background: #1e40af;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#stylev2 .search-btn:hover {
    background: #1e3a8a;
}

#stylev2 .clear-btn {
    background: #dc2626;
    border: none;
    padding: 12px;
    cursor: pointer;
    color: #fee2e2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#stylev2 .clear-btn:hover {
    background: #f1f5f9;
    color: #dc2626;
}

/* Content Section */
#stylev2 .content-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 16px;
}

/* Products Grid */
#stylev2 .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 24px;
}

/* Product Cards */
#stylev2 .admin-product-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#stylev2 .admin-product-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: #e2e8f0;
}

#stylev2 .image-section {
    position: relative;
    height: 250px;
    overflow: hidden;
}

#stylev2 .product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

#stylev2 .admin-product-card:hover .product-img {
    transform: scale(1.05);
}

#stylev2 .badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#stylev2 .badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#stylev2 .badge.new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#stylev2 .badge.in-stock {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

#stylev2 .badge.out-of-stock {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

#stylev2 .badge.waiting {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

#stylev2 .action-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
}

#stylev2 .action-btn:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e2f5c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.3);
}

/* Product Card Details */
#stylev2 .content-section .category {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
    display: inline-block;
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: 6px;
}

#stylev2 .content-section .title {
    font-family: "Poppins", system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#stylev2 .content-section .details-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

#stylev2 .content-section .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

#stylev2 .content-section .detail-item .label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

#stylev2 .content-section .detail-item .value {
    font-size: 12px;
    font-weight: 600;
}

#stylev2 .content-section .detail-item .value.price {
    color: #059669;
    background: #f0fdf4;
    padding: 2px 6px;
    border-radius: 4px;
}

#stylev2 .content-section .detail-item .value.commission {
    color: #7c3aed;
    background: #faf5ff;
    padding: 2px 6px;
    border-radius: 4px;
}

#stylev2 .content-section .detail-item .value.commission_sous {
    color: #ed6d3a;
    background: #fffcf5;
    padding: 2px 6px;
    border-radius: 4px;
}

#stylev2 .content-section .detail-item .value.country {
    color: #0369a1;
    background: #f0f9ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

#stylev2 .content-section .action-btn .btn-icon {
    flex-shrink: 0;
}

/* Form Layout */
#stylev2 .form-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

#stylev2 .form-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#stylev2 .form-section-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

#stylev2 .section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

#stylev2 .form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#stylev2 .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#stylev2 .form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

#stylev2 .form-input {
    font-family: "Poppins", system-ui, sans-serif !important;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

#stylev2 .form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#stylev2 .form-input.error {
    background-color: #fff !important;
    border-color: #dc2626 !important;
}

#stylev2 .form-input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

#stylev2 .input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

#stylev2 .input-with-suffix .form-input {
    flex: 1;
    padding-right: 40px;
}

#stylev2 .input-suffix {
    position: absolute;
    right: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    padding: 4px 8px;
    border-radius: 4px;
}

#stylev2 .error-message {
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
}

/* Image Preview Styles */
#stylev2 .image-preview-container {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    background: #f8fafc;
}

#stylev2 .image-preview-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

#stylev2 .image-preview {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
}

#stylev2 .image-loading,
#stylev2 .image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 20px;
    color: #64748b;
}

#stylev2 .image-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    animation: stylev2-spin 1s linear infinite;
}

#stylev2 .image-error {
    color: #dc2626;
}

#stylev2 .image-error svg {
    color: #ef4444;
}

#stylev2 .image-preview-actions {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

#stylev2 .btn-remove-image {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#stylev2 .btn-remove-image:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

#stylev2 .no-image-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
}

#stylev2 .no-image-preview svg {
    color: #cbd5e1;
}

#stylev2 .no-image-preview p {
    margin: 0;
    font-weight: 500;
}

#stylev2 .no-image-preview small {
    font-size: 12px;
}

/* Loading States */
#stylev2 .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 24px;
    color: #64748b;
}

#stylev2 .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid #1e40af;
    border-radius: 50%;
    animation: stylev2-spin 1s linear infinite;
    margin-bottom: 16px;
}

#stylev2 .btn-loading {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: stylev2-spin 0.8s linear infinite;
}

/* Empty States */
#stylev2 .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    margin: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.5s ease-out;
}

#stylev2 .empty-state.warning {
    border-left: 4px solid #f59e0b;
}

#stylev2 .empty-icon {
    color: #cbd5e1;
    margin-bottom: 16px;
}

#stylev2 .empty-state.warning .empty-icon {
    color: #f59e0b;
}

#stylev2 .empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

#stylev2 .empty-state .text-muted {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px 0;
    max-width: 300px;
    line-height: 1.5;
}

#stylev2 .reset-filters-btn {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#stylev2 .reset-filters-btn:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e2f5c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.3);
}

/* Pagination */
#stylev2 .pagination-section {
    border-top: 1px solid #f1f5f9;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#stylev2 .pagination-section .page-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

#stylev2 .pagination-section .page-btn:hover {
    background: #f1f5f9;
}

#stylev2 .pagination-section .page-btn.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

/* Select2 Customization */
#stylev2 :deep(.custom-select2) {
    width: 100% !important;
}

#stylev2 :deep(.select2-container .select2-selection--single) {
    height: 44px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
}

#stylev2
    :deep(.select2-container
        .select2-selection--single
        .select2-selection__rendered) {
    line-height: 44px !important;
    padding-left: 16px !important;
}

#stylev2
    :deep(.select2-container--default
        .select2-selection--single
        .select2-selection__arrow) {
    height: 44px !important;
}

/* Modal Styles */
#stylev2 .modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1041 !important;
    padding: 20px !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
    -webkit-font-smoothing: subpixel-antialiased !important;
}
#stylev2 .modal-body {
    flex: 1;
    overflow-y: auto; /* Allows scrolling */
}
#stylev2 .modal-footer {
    position: sticky;
    bottom: 0;
    background: #f8fafc;
    z-index: 10;
}
#stylev2 .modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

#stylev2 .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

#stylev2 .modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

#stylev2 .modal-close-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stylev2 .modal-close-btn:hover {
    background: #f1f5f9;
    color: #374151;
}

#stylev2 .modal-content {
    padding: 24px;
    border: none;
    border-radius: 0rem;
    box-shadow: none;
}

#stylev2 .product-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

#stylev2 .product-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

#stylev2 .product-details {
    flex: 1;
}

#stylev2 .product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px 0;
}

#stylev2 .product-category {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 4px 0;
}

#stylev2 .product-price {
    font-size: 14px;
    font-weight: 600;
    color: #059669;
    margin: 0;
}

#stylev2 .commission-info {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

#stylev2 .info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#stylev2 .info-label {
    font-size: 14px;
    color: #64748b;
}

#stylev2 .info-value {
    font-size: 14px;
    font-weight: 600;
}

#stylev2 .commission-affiliate {
    color: #1e40af;
}

#stylev2 .commission-current {
    color: #059669;
}

#stylev2 .commission-form {
    margin-bottom: 8px;
}

#stylev2 .modal-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

#stylev2 .required {
    color: #dc2626;
}

#stylev2 .input-container {
    position: relative;
    display: flex;
    align-items: center;
}

#stylev2 .modal-form-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

#stylev2 .modal-form-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

#stylev2 .modal-form-input.success {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

#stylev2 .modal-form-input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

#stylev2 .input-suffix {
    position: absolute;
    right: 12px;
    color: #64748b;
    font-weight: 500;
    pointer-events: none;
}

#stylev2 .form-feedback {
    margin-top: 8px;
    font-size: 14px;
}

#stylev2 .error-text {
    color: #dc2626;
    font-weight: 500;
}

#stylev2 .success-text {
    color: #059669;
    font-weight: 500;
}

#stylev2 .helper-text {
    color: #64748b;
}

#stylev2 .commission-slider {
    margin-top: 20px;
}

#stylev2 .slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

#stylev2 .slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#stylev2 .slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e40af;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#stylev2 .slider.error::-webkit-slider-thumb {
    background: #dc2626;
}

#stylev2 .slider.error::-moz-range-thumb {
    background: #dc2626;
}

#stylev2 .slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

#stylev2 .preview-changes {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

#stylev2 .preview-changes h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

#stylev2 .preview-grid {
    display: grid;
    gap: 8px;
}

#stylev2 .preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#stylev2 .preview-label {
    font-size: 13px;
    color: #64748b;
}

#stylev2 .preview-value {
    font-size: 13px;
    font-weight: 600;
}

#stylev2 .preview-value.old {
    color: #dc2626;
}

#stylev2 .preview-value.new {
    color: #059669;
}

#stylev2 .preview-value.diff.positive {
    color: #059669;
}

#stylev2 .preview-value.diff.negative {
    color: #dc2626;
}

#stylev2 .preview-value.diff.neutral {
    color: #64748b;
}

#stylev2 .modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px 24px;
    border-top: 1px solid #e2e8f0;
}

#stylev2 .modal-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#stylev2 .modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#stylev2 .modal-btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

#stylev2 .modal-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e2f5c 100%);
}

#stylev2 .modal-btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 1px solid #e2e8f0;
}

#stylev2 .modal-btn-secondary:hover:not(:disabled) {
    background: #f1f5f9;
}

/* Hide Bootstrap modals */
#stylev2 .modal-backdrop {
    display: none !important;
}

#stylev2 .bootstrap-modal {
    display: none !important;
}

/* Products Stock Container */
#stylev2 .products-stock-container {
    background: #f8fafc;
    min-height: 100vh;
    font-family: "Inter", system-ui, sans-serif;
}

/* Header Controls */
#stylev2 .header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#stylev2 .page-select {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

#stylev2 .page-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Full Width Filter Group */
#stylev2 .filter-group.full-width {
    grid-column: 1 / -1;
}

/* Table Section */
#stylev2 .table-section {
    background: white;
    border-radius: 16px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Table Container */
#stylev2 .table-container {
    overflow-x: auto;
}

#stylev2 .products-table {
    width: 100%;
    border-collapse: collapse;
}

#stylev2 .products-table th {
    background: #f8fafc;
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}

#stylev2 .products-table td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

#stylev2 .product-row:hover {
    background: #f8fafc;
}

/* Sortable Headers */
#stylev2 .sortable {
    cursor: pointer;
    user-select: none;
}

#stylev2 .sort-header {
    display: flex;
    align-items: center;
    gap: 4px;
}

#stylev2 .sort-indicators {
    display: flex;
    flex-direction: column;
}

/* Column Styles */
#stylev2 .actions-cell {
    width: 100px;
}

#stylev2 .status-cell {
    width: 120px;
}

#stylev2 .date-cell {
    width: 120px;
    color: #64748b;
    font-size: 13px;
}

#stylev2 .country-cell {
    width: 150px;
    font-weight: 500;
}

#stylev2 .name-cell {
    font-weight: 600;
    color: #1e293b;
}

#stylev2 .reference-cell {
    color: #64748b;
    font-family: "Monaco", "Consolas", monospace;
}

#stylev2 .price-cell {
    width: 120px;
    text-align: right;
    font-weight: 600;
    color: #059669;
}

#stylev2 .commission-cell {
    width: 120px;
    text-align: right;
    font-weight: 500;
    color: #7c3aed;
}

#stylev2 .quantity-cell {
    width: 120px;
    text-align: center;
    font-weight: 600;
}

#stylev2 .quantity-cell.old {
    color: #6b7280;
}

#stylev2 .quantity-cell.current.critical {
    color: #dc2626;
}

#stylev2 .quantity-cell.current.warning {
    color: #d97706;
}

#stylev2 .quantity-cell.current.increased {
    color: #059669;
}

#stylev2 .quantity-cell.current.decreased {
    color: #d97706;
}

#stylev2 .quantity-cell.current.normal {
    color: #374151;
}

/* Actions */
#stylev2 .action-buttons {
    display: flex;
    gap: 8px;

    .action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
}

#stylev2 .action-btn.primary {
    background: #1e40af;
    color: #ffffff;
}

#stylev2 .action-btn.primary:hover {
    background: #1e3a8a;
}

#stylev2 .action-btn.info {
    background: #0369a1;
    color: #ffffff;
}

#stylev2 .action-btn.info:hover {
    background: #075985;
}

#stylev2 .action-btn.success {
    background: #10b981;
    color: #ffffff;
}

#stylev2 .action-btn.success:hover {
    background: #059669;
}

/* Status Badges */
#stylev2 .status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#stylev2 .status-badge.in-stock {
    background: #f0fdf4;
    color: #059669;
}

#stylev2 .status-badge.low-stock {
    background: #fffbeb;
    color: #d97706;
}

#stylev2 .status-badge.out-of-stock {
    background: #fef2f2;
    color: #dc2626;
}

/* Image Modal Styles */
#stylev2 .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1041;
    padding: 20px;
}

#stylev2 .image-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

#stylev2 .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

#stylev2 .modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

#stylev2 .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

#stylev2 .close-btn:hover {
    color: #374151;
}

#stylev2 .modal-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

#stylev2 .modal-body .image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    min-height: 400px;
    position: relative;
}

#stylev2 .modal-body .product-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    padding: 20px;
    width: 100%;
    height: 100%;
}

#stylev2 .modal-body .image-loading,
#stylev2 .modal-body .image-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
}

#stylev2 .modal-body .image-error svg {
    color: #dc2626;
    margin-bottom: 16px;
}

#stylev2 .modal-body .image-info {
    padding: 20px 24px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

#stylev2 .modal-body .image-info p {
    margin: 4px 0;
    color: #374151;
}

#stylev2 .modal-body .image-info strong {
    color: #1e293b;
}

#stylev2 .modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
}

/* Animations */
@keyframes stylev2-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    #stylev2 .form-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #stylev2 .form-column {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    #stylev2 .form-content,
    #stylev2 .main-content {
        padding: 16px;
    }

    #stylev2 .form-section-card {
        padding: 20px;
    }

    #stylev2 .header-main {
        padding: 0 16px;
    }

    #stylev2 .header-content {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    #stylev2 .header-actions {
        width: 100%;
        justify-content: stretch;
    }

    #stylev2 .header-actions .btn-primary,
    #stylev2 .header-actions .btn-secondary {
        flex: 1;
        min-width: auto;
    }

    #stylev2 .back-btn {
        align-self: flex-start;
    }

    #stylev2 .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    #stylev2 .filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #stylev2 .search-input-wrapper {
        flex-direction: column;
    }

    #stylev2 .search-btn {
        width: 100%;
        border-radius: 0 0 8px 8px;
    }

    #stylev2 .empty-state {
        padding: 60px 20px;
        margin: 16px;
    }

    #stylev2 .empty-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 20px;
    }

    #stylev2 .empty-state h3 {
        font-size: 18px;
    }

    #stylev2 .empty-state .text-muted {
        font-size: 13px;
        margin-bottom: 20px;
    }

    #stylev2 .reset-filters-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    #stylev2 .image-preview-wrapper {
        min-height: 150px;
    }

    #stylev2 .image-preview {
        max-height: 200px;
    }

    /* Header Controls Mobile */
    #stylev2 .header-main {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    /* Table Mobile */
    #stylev2 .products-table {
        font-size: 12px;
    }

    #stylev2 .products-table th,
    #stylev2 .products-table td {
        padding: 12px 8px;
    }

    #stylev2 .action-buttons {
        flex-direction: column;
        gap: 4px;
    }

    #stylev2 .action-btn {
        width: 28px;
        height: 28px;
    }

    /* Responsive Modal */
    #stylev2 .modal-overlay {
        padding: 16px;
    }

    #stylev2 .modal-container {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    #stylev2 .modal-header {
        padding: 20px 20px 0;
    }

    #stylev2 .modal-content {
        padding: 20px;
    }

    #stylev2 .product-info {
        flex-direction: column;
        text-align: center;
    }

    #stylev2 .modal-footer {
        flex-direction: column-reverse;
    }

    /* Image Modal Mobile */
    #stylev2 .image-modal-content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    #stylev2 .modal-body {
        flex-direction: column;
    }

    #stylev2 .image-container {
        min-height: 300px;
    }

    #stylev2 .modal-footer {
        flex-direction: column;
    }

    #stylev2 .btn-primary,
    #stylev2 .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #stylev2 .form-section-card {
        padding: 16px;
    }

    #stylev2 .section-title {
        font-size: 16px;
    }

    #stylev2 .back-btn {
        font-size: 16px;
        padding: 10px 16px;
    }

    #stylev2 .header-actions {
        flex-direction: column;
    }

    #stylev2 .header-actions .btn-primary,
    #stylev2 .header-actions .btn-secondary {
        width: 100%;
    }

    #stylev2 .empty-state {
        padding: 40px 16px;
        margin: 12px;
    }

    #stylev2 .empty-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    #stylev2 .empty-state h3 {
        font-size: 16px;
    }

    #stylev2 .empty-state .text-muted {
        font-size: 12px;
        margin-bottom: 16px;
    }

    /* Table Mobile Small */
    #stylev2 .products-table {
        font-size: 11px;
    }

    #stylev2 .status-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}
/* Fix mobile table buttons */
@media (max-width: 768px) {
    #stylev2 .action-buttons {
        flex-direction: row !important;
        gap: 6px !important;
        justify-content: center;
    }

    #stylev2 .action-btn {
        width: 32px !important;
        height: 32px !important;
        flex-shrink: 0;
    }
}

/* Fix modal responsiveness */
@media (max-width: 768px) {
    #stylev2 .modal-backdrop {
        padding: 10px !important;
        align-items: flex-start !important;
    }

    #stylev2 .image-modal-content {
        margin: 0 !important;
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
    }

    #stylev2 .modal-body .image-container {
        min-height: 50vh !important;
        max-height: 70vh !important;
    }

    #stylev2 .modal-body .product-image {
        max-height: 50vh !important;
        padding: 10px !important;
    }

    #stylev2 .modal-footer {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 16px !important;
    }

    #stylev2 .modal-footer .btn {
        flex: 1;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    #stylev2 .action-buttons {
        gap: 4px !important;
    }

    #stylev2 .action-btn {
        width: 28px !important;
        height: 28px !important;
    }

    #stylev2 .modal-footer {
        flex-direction: column !important;
        gap: 8px !important;
    }

    #stylev2 .modal-footer .btn {
        width: 100% !important;
        margin: 0 !important;
    }
}
/* Commande Form Container */
#stylev2 .commande-form-container {
    background: #f8fafc;
    min-height: 100vh;
    font-family: "Inter", system-ui, sans-serif;
}

/* New Layout Styles */
#stylev2 .form-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

#stylev2 .form-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Products Section Styles */
#stylev2 .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#stylev2 .add-product-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#stylev2 .add-product-btn:hover {
    background: #059669;
}

#stylev2 .products-list {
    min-height: 200px;
}

#stylev2 .empty-products {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #64748b;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
}

#stylev2 .empty-products svg {
    margin-bottom: 16px;
    color: #cbd5e1;
}

#stylev2 .products-list .products-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#stylev2 .product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#stylev2 .product-info {
    flex: 1;
    margin-left: 0;
}

#stylev2 .product-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

#stylev2 .product-ref {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

#stylev2 .product-stock {
    font-size: 12px;
    color: #059669;
    font-weight: 500;
}

#stylev2 .product-price {
    font-size: 12px;
    color: #a84517;
    font-weight: 500;
}

#stylev2 .product-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#stylev2 .quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px;
}

#stylev2 .quantity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: #f8fafc;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#stylev2 .quantity-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

#stylev2 .quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#stylev2 .quantity-display {
    font-weight: 600;
    color: #374151;
    min-width: 20px;
    text-align: center;
}

#stylev2 .remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#stylev2 .remove-btn:hover {
    background: #fecaca;
}

#stylev2 .products-summary {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

#stylev2 .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #374151;
}

#stylev2 .summary-value {
    font-weight: 600;
    color: #1e40af;
}

/* Delivery Info */
#stylev2 .delivery-info {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

#stylev2 .delivery-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0f9ff;
    color: #0369a1;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid #e0f2fe;
}

/* Form Grid with full-width option */
#stylev2 .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

#stylev2 .form-group.full-width {
    grid-column: 1 / -1;
}

/* Responsive Design for Commande Form */
@media (max-width: 1024px) {
    #stylev2 .form-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #stylev2 .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    #stylev2 .add-product-btn {
        width: 100%;
        justify-content: center;
    }

    #stylev2 .product-card {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    #stylev2 .product-controls {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    #stylev2 .delivery-badge {
        font-size: 14px;
        padding: 10px 16px;
    }
}
/* Product Modal Styles */
#stylev2 .product-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    font-family: "Inter", system-ui, sans-serif;
}

#stylev2 .products-stock-container {
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

#stylev2 .stock-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

#stylev2 .stock-summary {
    background: #f0f9ff;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
}

/* Modal Search Section */
#stylev2 .search-section {
    margin-bottom: 20px;
}

#stylev2 .products-grid-modal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    overflow-y: auto;
    flex: 1;
    padding: 4px;
    max-height: none;
}

/* Stock Product Cards */
#stylev2 .stock-product-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

#stylev2 .stock-product-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

#stylev2 .stock-product-card.added {
    border-color: #10b981;
    background: #f0fdf4;
}

#stylev2 .product-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
}

#stylev2 .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#stylev2 .added-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stylev2 .product-details {
    flex: 1;
    margin-bottom: 12px;
}

#stylev2 .product-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

#stylev2 .product-ref {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

#stylev2 .product-stock-info {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 11px;
}

#stylev2 .stock-qty {
    color: #059669;
    font-weight: 500;
}

#stylev2 .initial-qty {
    color: #64748b;
}

#stylev2 .add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#stylev2 .add-to-cart-btn:hover:not(:disabled) {
    background: #1e3a8a;
    transform: translateY(-1px);
}

#stylev2 .add-to-cart-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

#stylev2 .stock-product-card.added .add-to-cart-btn {
    background: #10b981;
}

#stylev2 .stock-product-card.added .add-to-cart-btn:hover:not(:disabled) {
    background: #059669;
}

/* Modal Footer for Product Modal */
#stylev2 .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

#stylev2 .selected-summary {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Responsive Design for Product Modal */
@media (max-width: 768px) {
    #stylev2 .product-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

    #stylev2 .products-stock-container {
        padding: 16px;
    }

    #stylev2 .products-grid-modal {
        grid-template-columns: 1fr;
    }

    #stylev2 .modal-footer {
        padding: 16px;
        flex-direction: column;
        gap: 12px;
    }

    #stylev2 .selected-summary {
        text-align: center;
    }
}

@media (max-width: 480px) {
    #stylev2 .stock-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    #stylev2 .stock-summary {
        align-self: flex-start;
    }
}
#stylev2 .table-action-icon {
    background: none;
    border: none;
    padding: 0px;
    margin: 0 4px;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#stylev2 .table-action-icon:hover {
    color: #1e40af;
    background: #f1f5f9;
}
/* Add to your #stylev2 stylesheet */
#stylev2 .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#stylev2 .summary-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

#stylev2 .summary-value {
    font-size: 18px;
    font-weight: 700;
}

#stylev2 .summary-value.success {
    background-color: transparent !important;
    color: #10b981;
}

#stylev2 .summary-value.danger {
    color: #ef4444;
}

#stylev2 .summary-value.warning {
    color: #f59e0b;
}

#stylev2 .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

/* Stock-specific table styles */
#stylev2 .quantity-cell.current.out-of-stock {
    color: #dc2626;
}

#stylev2 .quantity-cell.current.low-stock {
    color: #d97706;
}

#stylev2 .quantity-cell.current.in-stock {
    color: #059669;
}

/* Status badge improvements */
#stylev2 .status-badge.out-of-stock {
    background: #fef2f2;
    color: #dc2626;
}

#stylev2 .status-badge.low-stock {
    background: #fffbeb;
    color: #d97706;
}

#stylev2 .status-badge.in-stock {
    background: #f0fdf4;
    color: #059669;
}

/* Badge secondary style */
#stylev2 .badge-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
/* Add to your #stylev2 stylesheet */
#stylev2 .summary-value.text-danger {
    color: #dc2626;
    font-weight: 600;
}

#stylev2 .summary-value.text-success {
    color: #059669;
    font-weight: 700;
}

#stylev2 .products-summary .alert-warning {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    margin-top: 4px;
    padding: 8px 12px;
}

#stylev2 .products-summary .alert-warning .summary-value {
    color: #92400e;
    font-weight: 600;
}
