/**
 * Supplier Table - Compact Modern CSS Styles with Edit Modal
 * Theme: Blue & Orange with Space-Efficient Design
 */

/* Inherit CSS Custom Properties from main form */
:root {
    --sj-primary-blue: #2563eb;
    --sj-primary-blue-dark: #1d4ed8;
    --sj-primary-blue-light: #3b82f6;
    --sj-accent-orange: #f97316;
    --sj-accent-orange-dark: #ea580c;
    --sj-accent-orange-light: #fb923c;
    --sj-success-green: #10b981;
    --sj-error-red: #ef4444;
    --sj-warning-yellow: #f59e0b;
    --sj-text-primary: #1f2937;
    --sj-text-secondary: #6b7280;
    --sj-text-muted: #9ca3af;
    --sj-border-color: #e5e7eb;
    --sj-border-light: #f3f4f6;
    --sj-bg-light: #f9fafb;
    --sj-bg-white: #ffffff;
    --sj-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --sj-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --sj-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --sj-radius-sm: 0.375rem;
    --sj-radius-md: 0.5rem;
    --sj-radius-lg: 0.75rem;
}

/* Main Container - Compact Design */
.sj-sp-table-container-gh78 {
    max-width: 100%;
    margin: 1rem auto;
    background: var(--sj-bg-white);
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-md);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header Section */
.sj-sp-table-header-ij90 {
    background: linear-gradient(135deg, var(--sj-primary-blue) 0%, var(--sj-primary-blue-dark) 100%);
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.sj-sp-table-header-ij90::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: var(--sj-accent-orange);
    border-radius: 50%;
    transform: translate(20px, -20px);
    opacity: 0.2;
}

.sj-sp-table-header-ij90 h3 {
    margin: 0 0 1rem 0;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Controls Section */
.sj-sp-table-controls-kl12 {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Search Group */
.sj-sp-search-group-mn34 {
    display: flex;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.sj-sp-search-input-op56 {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-right: none;
    border-radius: var(--sj-radius-md) 0 0 var(--sj-radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
}

.sj-sp-search-input-op56::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.sj-sp-search-input-op56:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.sj-sp-search-btn-qr78 {
    background: var(--sj-accent-orange);
    border: none;
    border-radius: 0 var(--sj-radius-md) var(--sj-radius-md) 0;
    color: white;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sj-sp-search-btn-qr78:hover {
    background: var(--sj-accent-orange-dark);
    transform: scale(1.05);
}

.sj-sp-search-icon-st90 {
    font-size: 0.875rem;
}

/* Filter Group */
.sj-sp-filter-group-uv12 {
    display: flex;
    gap: 0.5rem;
}

.sj-sp-country-filter-wx34 {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--sj-radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    min-width: 120px;
    backdrop-filter: blur(10px);
}

.sj-sp-country-filter-wx34:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.sj-sp-country-filter-wx34 option {
    background: var(--sj-primary-blue-dark);
    color: white;
}

/* Refresh Button */
.sj-sp-refresh-btn-yz56 {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--sj-radius-md);
    color: white;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.sj-sp-refresh-btn-yz56:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.sj-sp-refresh-icon-ab78 {
    font-size: 1rem;
    display: block;
}

/* Table Content */
.sj-sp-table-content-cd90 {
    position: relative;
    min-height: 300px;
}

/* Loading State */
.sj-sp-table-loading-ef12 {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.sj-sp-loading-spinner-gh34 {
    width: 40px;
    height: 40px;
    border: 3px solid var(--sj-border-light);
    border-top: 3px solid var(--sj-primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.sj-sp-loading-spinner-gh34 + p {
    margin: 0;
    color: var(--sj-text-secondary);
    font-size: 0.875rem;
}

/* Table Styles */
.sj-sp-table-wrapper-ij56 {
    overflow-x: auto;
}

.sj-sp-table-main-kl78 {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

.sj-sp-table-main-kl78 thead {
    background: var(--sj-bg-light);
    position: sticky;
    top: 0;
    z-index: 5;
}

.sj-sp-table-main-kl78 th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--sj-text-primary);
    border-bottom: 2px solid var(--sj-border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sj-sp-table-main-kl78 td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--sj-border-light);
    vertical-align: top;
}

.sj-sp-table-row-qr90:hover {
    background: var(--sj-bg-light);
    transition: background 0.2s ease;
}

/* Column Specific Styles */
.sj-sp-th-code-mn90,
.sj-sp-td-code-st12 {
    width: 120px;
    min-width: 120px;
}

.sj-sp-th-name-op12,
.sj-sp-td-name-yz78 {
    width: 35%;
    min-width: 200px;
}

.sj-sp-th-tel-qr34,
.sj-sp-td-tel-gh56 {
    width: 130px;
    min-width: 130px;
}

.sj-sp-th-country-st56,
.sj-sp-td-country-kl90 {
    width: 100px;
    min-width: 100px;
}

.sj-sp-th-actions-uv78,
.sj-sp-td-actions-op34 {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

/* Cell Content */
.sj-sp-code-cell-uv34 strong {
    display: block;
    color: var(--sj-primary-blue);
    font-weight: 600;
    font-size: 0.875rem;
}

.sj-sp-code-old-wx56 {
    display: block;
    color: var(--sj-text-muted);
    font-size: 0.75rem;
    margin-top: 0.125rem;
}

.sj-sp-name-cell-ab90 {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sj-sp-name-main-cd12 {
    font-weight: 500;
    color: var(--sj-text-primary);
    line-height: 1.3;
}

.sj-sp-address-preview-ef34 {
    color: var(--sj-text-secondary);
    font-size: 0.75rem;
    line-height: 1.2;
}

.sj-sp-tel-link-ij78 {
    color: var(--sj-primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.sj-sp-tel-link-ij78:hover {
    text-decoration: underline;
}

.sj-sp-country-badge-mn12 {
    display: inline-block;
    background: var(--sj-bg-light);
    color: var(--sj-text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--sj-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--sj-border-color);
}

/* Action Buttons */
.sj-sp-action-buttons-qr56 {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
}

.sj-sp-btn-edit-st78,
.sj-sp-btn-delete-wx12 {
    background: none;
    border: 1px solid var(--sj-border-color);
    border-radius: var(--sj-radius-sm);
    padding: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.sj-sp-btn-edit-st78:hover {
    background: var(--sj-primary-blue);
    border-color: var(--sj-primary-blue);
    color: white;
    transform: scale(1.1);
}

.sj-sp-btn-delete-wx12:hover {
    background: var(--sj-error-red);
    border-color: var(--sj-error-red);
    color: white;
    transform: scale(1.1);
}

.sj-sp-edit-icon-uv90,
.sj-sp-delete-icon-yz34 {
    font-size: 0.875rem;
    line-height: 1;
}

/* No Data State */
.sj-sp-no-data-wx90 {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--sj-text-secondary);
}

.sj-sp-no-data-icon-yz12 {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sj-sp-no-data-wx90 p {
    margin: 0;
    font-size: 1rem;
}

/* Pagination */
.sj-sp-pagination-container-ab34 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sj-border-light);
    background: var(--sj-bg-light);
    gap: 1rem;
}

.sj-sp-pagination-info-cd56 {
    color: var(--sj-text-secondary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sj-sp-pagination-nav-ef78 {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.sj-sp-page-btn-ab56 {
    background: white;
    border: 1px solid var(--sj-border-color);
    border-radius: var(--sj-radius-sm);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--sj-text-primary);
    transition: all 0.2s ease;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sj-sp-page-btn-ab56:hover:not(.sj-sp-page-active-ef90) {
    background: var(--sj-bg-light);
    border-color: var(--sj-text-secondary);
}

.sj-sp-page-active-ef90 {
    background: var(--sj-primary-blue);
    border-color: var(--sj-primary-blue);
    color: white;
}

.sj-sp-page-dots-cd78 {
    padding: 0 0.5rem;
    color: var(--sj-text-muted);
    font-size: 0.875rem;
}

/* Modal Styles */
.sj-sp-modal-overlay-gh90 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.sj-sp-modal-content-ij12 {
    background: white;
    border-radius: var(--sj-radius-lg);
    box-shadow: var(--sj-shadow-lg);
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

/* Edit Modal Specific Styles */
.sj-sp-edit-modal-content-pq90 {
    max-width: 600px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

.sj-sp-edit-form-rs12 {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sj-sp-form-row-tu34 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.sj-sp-form-group-vw56,
.sj-sp-form-group-full-de34 {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sj-sp-label-xy78 {
    font-weight: 500;
    color: var(--sj-text-primary);
    font-size: 0.875rem;
    line-height: 1.2;
}

.sj-sp-required-za90 {
    color: var(--sj-error-red);
    font-weight: 600;
}

.sj-sp-input-bc12,
.sj-sp-textarea-fg56 {
    padding: 0.75rem;
    border: 1px solid var(--sj-border-color);
    border-radius: var(--sj-radius-md);
    font-size: 0.875rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    background: white;
    color: var(--sj-text-primary);
}

.sj-sp-input-bc12:focus,
.sj-sp-textarea-fg56:focus {
    outline: none;
    border-color: var(--sj-primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sj-sp-input-bc12:read-only {
    background: var(--sj-bg-light);
    color: var(--sj-text-secondary);
    cursor: not-allowed;
}

.sj-sp-textarea-fg56 {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.sj-sp-btn-primary-hi78 {
    background: linear-gradient(135deg, var(--sj-accent-orange) 0%, var(--sj-accent-orange-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--sj-radius-md);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sj-sp-btn-primary-hi78:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--sj-accent-orange-dark) 0%, #c2410c 100%);
    transform: translateY(-1px);
}

.sj-sp-btn-primary-hi78:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.sj-sp-modal-header-kl34 {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--sj-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--sj-bg-light);
}

.sj-sp-modal-header-kl34 h4 {
    margin: 0;
    color: var(--sj-text-primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.sj-sp-modal-close-mn56 {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--sj-text-secondary);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sj-sp-modal-close-mn56:hover {
    background: var(--sj-border-light);
    color: var(--sj-text-primary);
}

.sj-sp-modal-body-op78 {
    padding: 1.5rem;
    text-align: center;
}

.sj-sp-modal-icon-qr90 {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.sj-sp-modal-body-op78 p {
    margin: 0 0 0.5rem 0;
    color: var(--sj-text-primary);
    font-size: 1rem;
    line-height: 1.4;
}

.sj-sp-modal-note-st12 {
    color: var(--sj-text-secondary);
    font-size: 0.875rem;
}

.sj-sp-modal-footer-uv34 {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sj-border-light);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: var(--sj-bg-light);
}

.sj-sp-btn-secondary-wx56,
.sj-sp-btn-danger-yz78 {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--sj-radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sj-sp-btn-secondary-wx56 {
    background: white;
    color: var(--sj-text-secondary);
    border: 1px solid var(--sj-border-color);
}

.sj-sp-btn-secondary-wx56:hover {
    background: var(--sj-bg-light);
    border-color: var(--sj-text-secondary);
}

.sj-sp-btn-danger-yz78 {
    background: var(--sj-error-red);
    color: white;
}

.sj-sp-btn-danger-yz78:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.sj-sp-btn-danger-yz78:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Toast Notification */
.sj-sp-toast-notification-ab12 {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: white;
    border-radius: var(--sj-radius-md);
    box-shadow: var(--sj-shadow-lg);
    border: 1px solid var(--sj-border-color);
    padding: 0.75rem 1rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

.sj-sp-toast-show-ij34 {
    transform: translateX(0);
}

.sj-sp-toast-content-cd34 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sj-sp-toast-icon-ef56 {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
    flex-shrink: 0;
}

.sj-sp-toast-success-gh12 .sj-sp-toast-icon-ef56 {
    background: var(--sj-success-green);
    color: white;
}

.sj-sp-toast-error-gh12 .sj-sp-toast-icon-ef56 {
    background: var(--sj-error-red);
    color: white;
}

.sj-sp-toast-message-gh78 {
    color: var(--sj-text-primary);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sj-sp-table-container-gh78 {
        margin: 0.5rem;
        border-radius: var(--sj-radius-md);
    }
    
    .sj-sp-table-header-ij90 {
        padding: 1rem;
    }
    
    .sj-sp-table-header-ij90 h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .sj-sp-table-controls-kl12 {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .sj-sp-search-group-mn34 {
        max-width: none;
        min-width: auto;
    }
    
    .sj-sp-filter-group-uv12 {
        justify-content: space-between;
    }
    
    .sj-sp-country-filter-wx34 {
        flex: 1;
        min-width: auto;
    }
    
    .sj-sp-pagination-container-ab34 {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .sj-sp-pagination-nav-ef78 {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .sj-sp-modal-content-ij12 {
        width: 95%;
        margin: 1rem;
    }
    
    .sj-sp-edit-modal-content-pq90 {
        width: 98%;
        max-height: 95vh;
    }
    
    .sj-sp-form-row-tu34 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .sj-sp-modal-footer-uv34 {
        flex-direction: column;
    }
    
    .sj-sp-toast-notification-ab12 {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }
    
    /* Mobile table scrolling */
    .sj-sp-table-wrapper-ij56 {
        scrollbar-width: thin;
        scrollbar-color: var(--sj-border-color) transparent;
    }
    
    .sj-sp-table-wrapper-ij56::-webkit-scrollbar {
        height: 8px;
    }
    
    .sj-sp-table-wrapper-ij56::-webkit-scrollbar-track {
        background: var(--sj-bg-light);
    }
    
    .sj-sp-table-wrapper-ij56::-webkit-scrollbar-thumb {
        background: var(--sj-border-color);
        border-radius: var(--sj-radius-sm);
    }
}

@media (max-width: 480px) {
    .sj-sp-table-header-ij90 {
        padding: 0.75rem;
    }
    
    .sj-sp-table-main-kl78 {
        font-size: 0.8rem;
    }
    
    .sj-sp-table-main-kl78 th,
    .sj-sp-table-main-kl78 td {
        padding: 0.5rem 0.375rem;
    }
    
    .sj-sp-action-buttons-qr56 {
        flex-direction: column;
        gap: 0.125rem;
    }
    
    .sj-sp-btn-edit-st78,
    .sj-sp-btn-delete-wx12 {
        width: 28px;
        height: 28px;
    }
    
    .sj-sp-edit-modal-content-pq90 {
        max-height: 90vh;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --sj-border-color: #000000;
        --sj-text-secondary: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}