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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.panel h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    background: #f0f4ff;
    border-color: #764ba2;
}

.upload-area.drag-over {
    background: #e8f0fe;
    border-color: #1a73e8;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.upload-area p {
    color: #666;
    margin: 10px 0;
}

.or-text {
    color: #999;
    font-size: 0.9em;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 15px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.file-list {
    margin-top: 20px;
}

.file-item {
    background: white;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.file-icon {
    font-size: 1.5em;
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.file-size {
    font-size: 0.85em;
    color: #888;
}

.remove-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

.remove-btn:hover {
    background: #ff3838;
}

.bottom-panel {
    background: #f8f9fa;
    padding: 30px;
    border-top: 2px solid #e0e0e0;
}

.field-selection {
    margin-bottom: 25px;
}

.field-selection h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.checkbox-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.field-mapping-header {
    margin-bottom: 20px;
}

.field-mapping-header h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.field-mapping-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.field-mapping-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px 1fr;
    gap: 15px;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.field-mapping-row:hover {
    background: #f0f4ff;
    border-color: #667eea;
}

.field-mapping-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.lead-field {
    color: #333;
    font-weight: 500;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.lead-field strong {
    color: #667eea;
    font-size: 0.85em;
    display: block;
    margin-bottom: 4px;
}

.field-arrow {
    text-align: center;
    font-size: 1.5em;
    color: #667eea;
    font-weight: bold;
}

.suppression-field-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.suppression-field-select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.field-checkbox:hover {
    background: #f0f4ff;
}

.field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.field-checkbox label {
    cursor: pointer;
    color: #333;
    font-weight: 500;
}

.info-text {
    color: #888;
    font-style: italic;
}

.normalization-section {
    margin: 25px 0;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.normalization-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.normalization-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-top: 4px;
    flex-shrink: 0;
}

.normalization-toggle label {
    cursor: pointer;
    flex: 1;
}

.normalization-toggle label strong {
    display: block;
    color: #333;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.normalization-description {
    display: block;
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
    margin-top: 8px;
    padding-left: 10px;
    border-left: 3px solid #667eea;
}

.normalization-description::before {
    content: '💡 ';
    margin-right: 5px;
}

.progress-container {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    font-size: 1.1em;
    font-weight: 700;
    color: #667eea;
    min-width: 50px;
    text-align: right;
}

.progress-message {
    margin-top: 12px;
    color: #666;
    font-size: 0.95em;
    text-align: center;
    font-weight: 500;
}

.progress-filename {
    margin-top: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 6px;
    color: #667eea;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    display: none;
    border: 1px solid #667eea30;
    word-break: break-all;
}

.progress-stats {
    margin-top: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    border-radius: 8px;
    color: #444;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    display: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-section {
    text-align: center;
}

.process-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.process-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    display: block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

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

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

.modal-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
}

.modal-body {
    padding: 35px 30px;
}

.modal-info {
    margin-top: 25px;
    text-align: center;
}

.modal-info p {
    margin: 10px 0;
    color: #666;
    font-size: 1em;
}

.modal-warning {
    color: #ff6b6b !important;
    font-weight: 600;
    font-size: 0.95em !important;
    margin-top: 15px !important;
}

/* Background Processing Section */
.background-processing-section {
    margin: 25px 0;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.background-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.background-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    margin-top: 4px;
    flex-shrink: 0;
}

.background-toggle label {
    cursor: pointer;
    flex: 1;
}

.background-description {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    font-weight: normal;
}

.email-input-container {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    border-radius: 8px;
}

.email-input-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.email-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .checkbox-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    header h1 {
        font-size: 2em;
    }
}