/* WDSP Log Styles - Compatible with Fixed JavaScript */
/* Save as /css/sj-wdsp-log.css */

/* Variables */
:root {
    --sj-primary-blue: #2563eb;
    --sj-primary-orange: #f97316;
    --sj-secondary-blue: #3b82f6;
    --sj-secondary-orange: #fb923c;
    --sj-light-blue: #dbeafe;
    --sj-light-orange: #fed7aa;
    --sj-dark-blue: #1e40af;
    --sj-dark-orange: #ea580c;
    --sj-gradient-blue: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --sj-gradient-orange: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --sj-gradient-mixed: linear-gradient(135deg, #2563eb 0%, #f97316 100%);
    --sj-shadow-blue: 0 10px 30px rgba(37, 99, 235, 0.2);
    --sj-shadow-orange: 0 10px 30px rgba(249, 115, 22, 0.2);
    --sj-border-radius: 12px;
    --sj-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Container */
.sj-wdsp-container-ab12 {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1f2937;
}

/* Header Section */
.sj-header-section-yz34 {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.sj-main-title-wx56 {
    font-size: 32px;
    font-weight: 700;
    background: var(--sj-gradient-mixed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
}

.sj-header-pattern {
    width: 80px;
    height: 4px;
    background: var(--sj-gradient-orange);
    margin: 0 auto;
    border-radius: 2px;
}

/* Filter Section */
.sj-filters-section-cd34 {
    background: #ffffff;
    border-radius: var(--sj-border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.1);
    position: relative;
    overflow: hidden;
}

.sj-filters-section-cd34::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sj-gradient-mixed);
}

.sj-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.sj-filter-group {
    display: flex;
    flex-direction: column;
}

.sj-filter-group label {
    color: #374151;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.sj-input-wrapper-ab90 {
    position: relative;
}

.sj-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.sj-input-wrapper-ab90 .sj-search-input-ef56 {
    padding-left: 40px;
}

.sj-search-input-ef56,
.sj-date-input-gh78,
.sj-select-input-ij90 {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 14px;
    transition: var(--sj-transition);
    width: 100%;
}

.sj-search-input-ef56:focus,
.sj-date-input-gh78:focus,
.sj-select-input-ij90:focus {
    outline: none;
    border-color: var(--sj-primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sj-filters-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.sj-btn-primary-kl12,
.sj-btn-secondary-mn34 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--sj-transition);
    text-decoration: none;
}

.sj-btn-primary-kl12 {
    background: var(--sj-gradient-orange);
    color: white;
    box-shadow: var(--sj-shadow-orange);
}

.sj-btn-primary-kl12:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.3);
}

.sj-btn-primary-kl12:active {
    transform: translateY(0);
}

.sj-btn-secondary-mn34 {
    background: #f3f4f6;
    color: #6b7280;
}

.sj-btn-secondary-mn34:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Loading Spinner */
.sj-loading-qr78 {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.sj-spinner-st90 {
    width: 50px;
    height: 50px;
    border: 4px solid var(--sj-light-blue);
    border-top-color: var(--sj-primary-blue);
    border-right-color: var(--sj-primary-orange);
    border-radius: 50%;
    animation: sj-spin 1s linear infinite;
}

.sj-loading-text {
    margin-top: 20px;
    color: #6b7280;
    font-size: 14px;
}

@keyframes sj-spin {
    to { transform: rotate(360deg); }
}

/* Table Container */
.sj-table-container-uv12 {
    background: white;
    border-radius: var(--sj-border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

/* Main Table */
.sj-data-table-wx34 {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.sj-data-table-wx34 thead {
    background: var(--sj-gradient-blue);
}

.sj-data-table-wx34 th {
    padding: 20px 18px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    position: relative;
}

.sj-data-table-wx34 th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.sj-data-table-wx34 td {
    padding: 18px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

.sj-data-table-wx34 tbody tr {
    transition: var(--sj-transition);
}

.sj-data-table-wx34 tbody tr:hover {
    background: #f9fafb;
}

/* Table Animation */
.sj-table-row-animation {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cell Specific Styles */
.sj-cell-title-ab34 .sj-title-wrapper {
    display: flex;
    align-items: center;
}

.sj-cell-title-ab34 .sj-title-badge {
    background: var(--sj-light-blue);
    color: var(--sj-dark-blue);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.sj-cell-date-cd56 .sj-date-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
}

.sj-cell-date-cd56 .sj-date-wrapper svg {
    color: var(--sj-primary-blue);
}

.sj-cell-location-gh90 .sj-location-tag {
    background: var(--sj-light-orange);
    color: var(--sj-dark-orange);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
}

/* Details Sub-table */
.sj-details-table-yz12 {
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
    font-size: 13px;
    border: 1px solid #e5e7eb;
}

.sj-details-table-yz12 thead {
    background: var(--sj-gradient-blue);
}

.sj-details-table-yz12 th {
    padding: 10px;
    text-align: left;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.sj-details-table-yz12 td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.sj-details-table-yz12 tbody tr:last-child td {
    border-bottom: none;
}

.sj-qty-badge {
    background: var(--sj-primary-orange);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

/* Action Buttons */
.sj-cell-actions-kl34 {
    white-space: nowrap;
}

.sj-btn-edit-mn56,
.sj-btn-delete-op78 {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--sj-transition);
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sj-btn-edit-mn56 {
    background: #eff6ff;
    color: var(--sj-primary-blue);
}

.sj-btn-edit-mn56:hover {
    background: var(--sj-primary-blue);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--sj-shadow-blue);
}

.sj-btn-delete-op78 {
    background: #fef2f2;
    color: #ef4444;
}

.sj-btn-delete-op78:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

/* Empty State */
.sj-empty-wx90 {
    text-align: center;
    padding: 60px 20px !important;
    color: #9ca3af;
    font-style: italic;
}

/* Pagination */
.sj-pagination-yz56 {
    margin-top: 30px;
}

.sj-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.sj-pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.sj-pagination-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sj-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--sj-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sj-page-btn:hover {
    border-color: var(--sj-primary-blue);
    color: var(--sj-primary-blue);
    background: var(--sj-light-blue);
}

.sj-page-btn.sj-page-active {
    background: var(--sj-gradient-blue);
    color: white;
    border-color: transparent;
}

.sj-page-btn.sj-page-prev,
.sj-page-btn.sj-page-next {
    padding: 0 16px;
}

.sj-page-dots {
    color: #9ca3af;
    padding: 0 8px;
}

/* Modal Styles */
.sj-modal-overlay-ab78 {
    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: 10000;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.sj-modal-content-cd90 {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.sj-modal-header-ef12 {
    background: var(--sj-gradient-blue);
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sj-modal-header-ef12 h3 {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.sj-modal-close-ef12 {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--sj-transition);
}

.sj-modal-close-ef12:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sj-modal-body-gh34 {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.sj-modal-footer-kl78 {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Form Styles */
.sj-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.sj-form-group-qr90 {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.sj-form-group-qr90 label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.sj-form-group-qr90 label .required {
    color: var(--sj-primary-orange);
}

.sj-form-input-st12 {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: var(--sj-transition);
}

.sj-form-input-st12:focus {
    outline: none;
    border-color: var(--sj-primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Details Container */
.sj-details-container-uv34 {
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: #f9fafb;
}

.sj-detail-row-yz78 {
    display: grid;
    grid-template-columns: 120px 1fr 100px 40px;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInRight 0.3s ease forwards;
}

.sj-detail-row-yz78.sj-detail-row-show {
    opacity: 1;
    transform: translateX(0);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

.sj-detail-input-ab90 {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--sj-transition);
}

.sj-detail-input-ab90:focus {
    outline: none;
    border-color: var(--sj-primary-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.sj-input-qty {
    text-align: center;
}

.sj-btn-remove-detail {
    width: 36px;
    height: 36px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--sj-transition);
}

.sj-btn-remove-detail:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
}

.sj-btn-add-detail-wx56 {
    background: var(--sj-gradient-orange);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--sj-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--sj-shadow-orange);
}

.sj-btn-add-detail-wx56:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

/* Notifications */
.sj-notification {
    position: fixed;
    top: 20px;
    right: -400px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--sj-transition);
    z-index: 10001;
    border-left: 4px solid;
    max-width: 350px;
}

.sj-notification.sj-notification-show {
    right: 20px;
}

.sj-notification-success {
    border-left-color: #10b981;
}

.sj-notification-error {
    border-left-color: #ef4444;
}

.sj-notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sj-notification-success .sj-notification-icon {
    background: #d1fae5;
    color: #10b981;
}

.sj-notification-error .sj-notification-icon {
    background: #fee2e2;
    color: #ef4444;
}

.sj-notification-message {
    color: #374151;
    font-size: 14px;
}

/* Custom Confirm Dialog */
.sj-confirm-dialog {
    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: 10002;
    animation: fadeIn 0.2s ease;
    backdrop-filter: blur(5px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sj-confirm-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sj-confirm-icon {
    margin-bottom: 20px;
}

.sj-confirm-icon svg {
    color: var(--sj-primary-orange);
}

.sj-confirm-content h4 {
    margin: 0 0 10px 0;
    color: #111827;
    font-size: 20px;
}

.sj-confirm-content p {
    margin: 0 0 24px 0;
    color: #6b7280;
}

.sj-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.sj-confirm-btn-cancel,
.sj-confirm-btn-delete {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--sj-transition);
}

.sj-confirm-btn-cancel {
    background: #e5e7eb;
    color: #6b7280;
}

.sj-confirm-btn-cancel:hover {
    background: #d1d5db;
    color: #374151;
}

.sj-confirm-btn-delete {
    background: #ef4444;
    color: white;
}

.sj-confirm-btn-delete:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Fade out animation */
@keyframes fadeOutScale {
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sj-wdsp-container-ab12 {
        padding: 15px;
    }
    
    .sj-filters-row {
        grid-template-columns: 1fr;
    }
    
    .sj-form-row {
        grid-template-columns: 1fr;
    }
    
    .sj-data-table-wx34 {
        font-size: 14px;
    }
    
    .sj-data-table-wx34 th,
    .sj-data-table-wx34 td {
        padding: 12px;
    }
    
    .sj-detail-row-yz78 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .sj-modal-content-cd90 {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .sj-details-table-yz12 {
        font-size: 12px;
    }
    
    .sj-btn-edit-mn56,
    .sj-btn-delete-op78 {
        width: 36px;
        height: 36px;
        margin-right: 4px;
    }
    
    .sj-pagination-wrapper {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
    
    .sj-main-title-wx56 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .sj-wdsp-container-ab12 {
        padding: 10px;
    }
    
    .sj-filters-section-cd34 {
        padding: 20px;
    }
    
    .sj-table-container-uv12 {
        overflow-x: auto;
    }
    
    .sj-data-table-wx34 {
        min-width: 700px;
    }
    
    .sj-page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .sj-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .sj-notification.sj-notification-show {
        right: 10px;
    }
}

/* Print Styles */
@media print {
    .sj-filters-section-cd34,
    .sj-cell-actions-kl34,
    .sj-pagination-yz56,
    .sj-btn-add-detail-wx56,
    .sj-btn-remove-detail {
        display: none !important;
    }
    
    .sj-data-table-wx34 {
        border: 1px solid #000;
    }
    
    .sj-data-table-wx34 th,
    .sj-data-table-wx34 td {
        border: 1px solid #000;
    }
}