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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #f9fafb;
}

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

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: #2563eb;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.start-over-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.start-over-btn:hover {
    color: #374151;
    background: #f3f4f6;
}

.start-over-btn svg {
    width: 16px;
    height: 16px;
}

/* Progress Section */
.progress-section {
    padding-bottom: 24px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.step-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.progress-bar {
    position: relative;
}

.progress-track {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 33.33%;
}

.step-dots {
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
}

.step-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e5e7eb;
    border: 2px solid white;
    transition: background-color 0.3s ease;
}

.step-dot.active {
    background: #2563eb;
}

.step-dot.completed {
    background: #16a34a;
}

/* Main Content */
.main {
    padding: 32px 0;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

/* Upload Step */
.upload-section {
    max-width: 800px;
    margin: 0 auto;
}

.upload-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    overflow: hidden;
}

.upload-zone {
    padding: 48px 32px;
    border: 2px dashed #d1d5db;
    margin: 32px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #2563eb;
    background: #f8faff;
}

.upload-zone.dragover {
    border-color: #2563eb;
    background: #f0f9ff;
    transform: scale(1.02);
}

.upload-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: #111827;
}

.upload-content p {
    color: #6b7280;
    margin-bottom: 8px;
}

.file-types {
    font-size: 14px;
    color: #9ca3af;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #6b7280;
    margin-bottom: 16px;
}

.browse-btn {
    margin-top: 16px;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.browse-btn:hover {
    background: #1d4ed8;
}

.table-info {
    padding: 32px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.table-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.column-tag {
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.column-tag.date-column {
    background: #f0f9ff;
    border-color: #0ea5e9;
    color: #0c4a6e;
}
/* Preview Step */
.preview-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 16px;
}

.file-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.file-info p {
    color: #6b7280;
    font-size: 14px;
}

.preview-actions {
    display: flex;
    gap: 12px;
}

.validation-status {
    padding: 16px 32px;
    border-bottom: 1px solid #e5e7eb;
}

.validation-status.success {
    background: #f0fdf4;
    color: #166534;
    border-left: 4px solid #16a34a;
}

.validation-status.warning {
    background: #fefce8;
    color: #a16207;
    border-left: 4px solid #eab308;
}

.validation-status.error {
    background: #fef2f2;
    color: #dc2626;
    border-left: 4px solid #ef4444;
}

.table-container {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

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

.data-table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
}

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

/* SQL Step */
.sql-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    overflow: hidden;
}

.sql-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 16px;
}

.sql-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.sql-info p {
    color: #6b7280;
    font-size: 14px;
}

.sql-actions {
    display: flex;
    gap: 12px;
}

.sql-options {
    display: flex;
    gap: 24px;
    padding: 24px 32px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.option-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.option-group input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.option-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.sql-output {
    position: relative;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.code-header span {
    font-weight: 500;
    color: #374151;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #f3f4f6;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
}

.code-block {
    margin: 0;
    padding: 24px 32px;
    background: #1e293b;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.error {
    background: #ef4444;
    color: white;
}

.notification.info {
    background: #3b82f6;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .step-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .preview-header,
    .sql-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sql-options {
        flex-direction: column;
        gap: 16px;
    }
    
    .columns-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .upload-zone {
        margin: 16px;
        padding: 32px 24px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
.table-container::-webkit-scrollbar,
.code-block::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track,
.code-block::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.table-container::-webkit-scrollbar-thumb,
.code-block::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.code-block::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}