* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.upload-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-bottom: 20px;
}

.upload-section input[type="file"] {
    margin-right: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #ffffff;
    padding: 15px 20px;
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    font-weight: 500;
    border-left: 4px solid #ff5252;
}

.error-message.success {
    background: linear-gradient(135deg, #51cf66 0%, #40c057 100%);
    border-left-color: #37b24d;
    box-shadow: 0 4px 12px rgba(81, 207, 102, 0.3);
}

.error-message.warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: #495057;
    border-left-color: #fd7e14;
    box-shadow: 0 4px 12px rgba(255, 212, 59, 0.3);
}

.error-message.info {
    background: linear-gradient(135deg, #74c0fc 0%, #339af0 100%);
    border-left-color: #228be6;
    box-shadow: 0 4px 12px rgba(116, 192, 252, 0.3);
}

.loading-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-weight: 500;
    position: relative;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.data-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.filter-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.filter-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-control {
    display: flex;
    flex-direction: column;
}

.filter-control label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #555;
}

.filter-control input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    order: 2;
    /* Ensure table comes last */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

tr:hover {
    background-color: #f5f5f5;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.table-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
    padding-left: 20px;
    order: 1;
    /* Ensure table actions come after processing results */
}

.record-count {
    color: #666;
    font-size: 14px;
}

.filter-header {
    position: relative;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-header:hover {
    background-color: #e9ecef;
}

.filter-icon {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #666;
    margin-left: 8px;
    opacity: 0.7;
}

.filter-header.filtered .filter-icon {
    border-top-color: #007bff;
    opacity: 1;
}

.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-modal-content {
    background: white;
    border-radius: 8px;
    width: 300px;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.filter-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.filter-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
    background-color: #e9ecef;
    border-radius: 50%;
}

.filter-modal-body {
    padding: 15px 20px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#filterSearch {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.filter-options {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
}

.filter-option:hover {
    background-color: #f8f9fa;
}

.filter-option input[type="checkbox"] {
    margin-right: 8px;
}

.filter-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.filter-modal-footer button {
    padding: 8px 16px;
    font-size: 14px;
}

.validation-error-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.1);
    margin: 20px 0;
    overflow: hidden;
    border: 2px solid #ff4757;
    display: none;
}

.validation-error-header {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    padding: 25px;
    text-align: center;
}

.validation-error-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.validation-error-header p {
    margin: 0 0 20px 0;
    font-size: 16px;
    opacity: 0.9;
}

.close-validation-btn {
    background: white;
    color: #ff4757;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.close-validation-btn:hover {
    background: #f1f2f6;
    transform: translateY(-1px);
}

.validation-error-details {
    padding: 25px;
    max-height: 500px;
    overflow-y: auto;
}

.validation-error-details h3 {
    color: #2f3542;
    margin: 0 0 20px 0;
    font-size: 18px;
}

.validation-error-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.validation-error-item h4 {
    color: #ff4757;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.error-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.error-count {
    background: #ff4757;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.affected-rows {
    background: #ffa502;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.invalid-values,
.expected-values {
    margin: 15px 0;
}

.invalid-values strong,
.expected-values strong {
    display: block;
    margin-bottom: 8px;
    color: #2f3542;
    font-size: 14px;
}

.value-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.value-tag {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    white-space: pre-wrap;
    /* Preserve spaces and line breaks */
    word-break: break-word;
    /* Handle long values */
    font-family: 'Courier New', monospace;
    /* Use monospace font for better readability */
    display: inline-block;
    max-width: 200px;
    /* Prevent extremely wide tags */
    overflow: hidden;
    text-overflow: ellipsis;
}

.value-tag:hover {
    max-width: none;
    /* Show full value on hover */
    white-space: pre-wrap;
    z-index: 10;
    position: relative;
}

.invalid-value {
    background: #ffe0e0;
    color: #d63031;
    border-color: #ff7675;
}

.expected-value {
    background: #e0f7e0;
    color: #00b894;
    border-color: #00cec9;
}

.more-values {
    background: #74b9ff;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.affected-rows-detail {
    margin-top: 15px;
    padding: 10px;
    background: #f1f2f6;
    border-radius: 4px;
    font-size: 13px;
    color: #636e72;
}

.affected-rows-detail strong {
    color: #2d3436;
}

.validation-error-footer {
    background: #f8f9fa;
    padding: 25px;
    border-top: 1px solid #e9ecef;
}

.help-text h4 {
    color: #0984e3;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.help-text ol {
    margin: 0;
    padding-left: 20px;
    color: #636e72;
}

.help-text ol li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.process-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-left: 15px;
    transition: all 0.3s ease;
}

.process-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.process-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.processing-results {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0 10px 0;
    /* Reduced bottom margin */
    overflow: hidden;
    border: 2px solid #667eea;
    display: none;
    order: -1;
    /* Move this element to appear first in flex containers */
}

.results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    margin: 0;
    font-size: 18px;
}

.results-content {
    padding: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stat-label {
    display: block;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.new-columns-section {
    margin-bottom: 20px;
}

.new-columns-section h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.quality-columns,
.new-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quality-tag {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.new-column-tag {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.no-new-columns {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.download-section,
.view-summary-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.download-btn,
.summary-btn {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.download-btn:hover,
.summary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 185, 255, 0.4);
}

.summary-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.summary-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.summary-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.summary-modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: 400px;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.summary-table th,
.summary-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.summary-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.quality-type {
    text-align: left !important;
    font-weight: 600;
    color: #333;
}

.stat-red {
    color: #dc3545;
    font-weight: 600;
}

.stat-amber {
    color: #ffc107;
    font-weight: 600;
}

.stat-green {
    color: #28a745;
    font-weight: 600;
}

.stat-grey {
    color: #6c757d;
    font-weight: 600;
}

.quality-charts-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quality-charts-section h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 16px;
    text-align: center;
}

.charts-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.chart-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* width: 300px; */
    /* height: 250px; */
    position: relative;
}

.chart-item canvas {
    /* width: 280px !important;
    height: 200px !important; */
    display: block;
    border: none;
}

/* Responsive design for charts */
@media (max-width: 1024px) {
    .charts-container {
        gap: 10px;
    }

    .chart-item {
        width: 280px;
        height: 230px;
    }

    .chart-item canvas {
        width: 260px !important;
        height: 180px !important;
    }
}

@media (max-width: 768px) {
    .charts-container {
        flex-direction: column;
        align-items: center;
    }

    .chart-item {
        width: 320px;
        height: 250px;
        margin-bottom: 15px;
    }

    .chart-item canvas {
        width: 280px !important;
        height: 200px !important;
    }
}

@media (max-width: 480px) {
    .chart-item {
        width: 280px;
        height: 220px;
        padding: 10px;
    }

    .chart-item canvas {
        width: 240px !important;
        height: 160px !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .filter-controls {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 8px;
    }

    .validation-error-container {
        margin: 10px;
    }

    .validation-error-header,
    .validation-error-details,
    .validation-error-footer {
        padding: 15px;
    }

    .error-stats {
        flex-direction: column;
        gap: 8px;
    }

    .value-list {
        gap: 4px;
    }

    .value-tag {
        font-size: 11px;
        padding: 4px 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .processing-results {
        margin: 10px;
    }

    .results-content {
        padding: 15px;
    }

    .summary-modal-content {
        width: 95%;
        margin: 10px;
    }

    .summary-modal-body {
        padding: 15px;
    }
}

#downloadFilteredBtn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-left: 15px;
    transition: all 0.3s ease;
}

#downloadFilteredBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

#downloadFilteredBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#downloadPPTBtn {
    background: linear-gradient(135deg, #007bff 0%, #004992 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-left: 0;
    /* Remove left margin */
    transition: all 0.3s ease;
}

#downloadPPTBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

#downloadPPTBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Custom prompt modal styles */
.custom-prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.custom-prompt-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.custom-prompt-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
}

.custom-prompt-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.custom-prompt-body {
    padding: 25px;
}

.custom-prompt-body p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.custom-prompt-body input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.custom-prompt-body input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.custom-prompt-footer {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.custom-prompt-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.input-group select,
.input-group input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background-color: white;
    appearance: none;
    /* Remove default styling */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    cursor: pointer;
}

.input-group input[type="date"] {
    background-image: none;
    /* Remove arrow for date input */
}

.input-group select:focus,
.input-group input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group select option {
    padding: 8px 12px;
    background-color: white;
    color: #333;
}

/* Custom styling for date input */
.input-group input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: #667eea;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px;
}

.input-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    background-color: #5a67d8;
}

/* Firefox date input styling */
.input-group input[type="date"]::-moz-placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Edge/IE date input styling */
.input-group input[type="date"]::-ms-clear {
    display: none;
}

.input-group input[type="date"]::-ms-reveal {
    display: none;
}

/* Additional spacing for better visual hierarchy */
.input-group:last-child {
    margin-bottom: 0;
}

.select-all-option,
.select-all-filtered-option {
    font-weight: 600;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 4px;
}

.select-all-option:hover,
.select-all-filtered-option:hover {
    background-color: #e9ecef !important;
}

.select-all-option span,
.select-all-filtered-option span {
    color: #495057;
    font-size: 13px;
}

.filter-separator {
    border-top: 1px solid #dee2e6;
    margin: 8px 0;
    height: 1px;
}

/* Indeterminate checkbox styling */
input[type="checkbox"]:indeterminate {
    background-color: #667eea;
    border-color: #667eea;
}

input[type="checkbox"]:indeterminate::before {
    content: '−';
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    display: block;
}

/* Loading Bar Styles */
.loading-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: loadingBarMove 2s linear infinite;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes loadingBarMove {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.loading-bar.indeterminate {
    width: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 40%,
            #667eea 50%,
            transparent 60%,
            transparent 100%);
    background-size: 50% 100%;
    animation: loadingBarIndeterminate 1.5s ease-in-out infinite;
}

@keyframes loadingBarIndeterminate {
    0% {
        background-position: -50% 0;
    }

    100% {
        background-position: 150% 0;
    }
}

/* Enhanced loading message with spinner */
.loading-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-weight: 500;
    position: relative;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Button loading states */
.button-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.button-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Table loading overlay */
.table-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    z-index: 100;
    backdrop-filter: blur(2px);
}

.table-loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #667eea;
    font-weight: 600;
}

.table-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

/* Modal loading states */
.modal-loading {
    position: relative;
}

.modal-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.modal-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1001;
}

/* Progress indicators */
.progress-container {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar.animated {
    background-size: 20px 20px;
    background-image: linear-gradient(45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    animation: progressMove 1s linear infinite;
}

@keyframes progressMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 0;
    }
}

/* Skeleton loading for table rows */
.skeleton-row {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    height: 20px;
    margin: 5px 0;
    border-radius: 4px;
}

@keyframes skeletonLoading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}