/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e2e8f0 100%);
    color: #2d3748;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 10px 25px rgba(30, 58, 95, 0.3);
}

.header-content {
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.logo-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-text h2 {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
    letter-spacing: 1px;
}


.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.upload-area {
    border: 3px dashed #a0aec0;
    border-radius: 1.5rem;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #2c5282;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(44, 82, 130, 0.15);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 4rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.upload-area h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

.upload-area p {
    color: #64748b;
    font-size: 1.1rem;
}

.choose-file-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.choose-file-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.file-info {
    font-size: 0.9rem;
    color: #64748b;
    margin-top: 1rem;
}

/* File Preview */
.file-preview {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.file-item i {
    font-size: 2rem;
    color: #dc2626;
}

.file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    color: #334155;
}

.file-size {
    font-size: 0.9rem;
    color: #64748b;
}

.remove-file {
    background: #ef4444;
    color: white;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Format Selection */
.format-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.format-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #334155;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.format-option {
    cursor: pointer;
    display: block;
}

.format-option input[type="radio"] {
    display: none;
}

.option-content {
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.option-content:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.format-option input[type="radio"]:checked + .option-content {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.option-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.option-content i.fa-file-excel {
    color: #10b981;
}

.option-content i.fa-file-csv {
    color: #f59e0b;
}

.option-content span {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334155;
    display: block;
    margin-bottom: 0.5rem;
}

.option-content small {
    color: #64748b;
    font-size: 0.9rem;
}

/* Action Section */
.action-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-width: 160px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2c5282 0%, #3182ce 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

/* Loading Section */
.loading-section {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

#loadingText {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

#loadingSubtext {
    color: #64748b;
}

/* Preview Section */
.preview-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.preview-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

.record-count {
    background: #eff6ff;
    color: #2563eb;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.preview-table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.preview-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
}

.preview-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.preview-table tbody tr:hover {
    background: #f8fafc;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Success Section */
.success-section {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

.success-content p {
    color: #64748b;
    margin-bottom: 1rem;
}

/* Error Section */
.error-section {
    background: white;
    border-radius: 1rem;
    padding: 3rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.error-icon {
    font-size: 4rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #334155;
}

.error-content p {
    color: #64748b;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: white;
    border-radius: 1rem 1rem 0 0;
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 0.5rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer li i {
    color: #2563eb;
    width: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

.footer-bottom a {
    color: #2c5282;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #1e3a5f;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 2rem 0;
        margin-bottom: 2rem;
    }
    
    .logo {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo-image {
        width: 60px;
        height: 60px;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .logo-text h2 {
        font-size: 1rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

