/* Web page specific styles (extracted from index.html) */
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    padding: 30px;
    box-sizing: border-box;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-top: 20px;
    margin-bottom: 20px;
}

.file-upload-area {
    min-height: 150px;
    border: 2px dashed #667eea;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #764ba2;
    background-color: rgba(102, 126, 234, 0.05);
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 0 -10px;
}

/* Better use of wide space for forms */
.column-mapping {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mapping-row {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mapping-row label {
    font-weight: 600;
    color: #333;
}

.mapping-row select,
.mapping-row input {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

/* File preview table improvements */
.file-preview-table-container {
    overflow-x: auto;
    margin: 0 -10px;
}

.file-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    min-width: 800px;
}

.file-preview-table th,
.file-preview-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    white-space: nowrap;
}

.file-preview-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.file-preview-table tr:hover {
    background-color: #f8f9fa;
}

/* Results table improvements */
#previewTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#previewTable th,
#previewTable td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

#previewTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

#previewTable tr:hover {
    background-color: #f8f9fa;
}

/* Enhanced form styles for web page */
.form-group {
    margin-bottom: 20px;
}

.config-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.config-form .form-group {
    margin-bottom: 0;
}

.config-form .column-mapping {
    grid-column: 1 / -1;
}

.mapping-row {
    margin-bottom: 16px;
}

/* Enhanced typeahead for web page */
.typeahead-dropdown {
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.typeahead-item {
    padding: 12px 16px;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.typeahead-item:hover {
    background-color: #f8f9fa;
}

/* Better section spacing */
section {
    margin-bottom: 40px;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
}

.section-instructions {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    max-width: 1200px;
}

/* Enhanced modal for web page */
/* moved to components.css */

.instructions-modal {
    max-width: 800px !important;
}

/* moved to components.css */

/* Enhanced welcome message for web page */
.welcome-content {
    flex-direction: row;
    text-align: left;
    gap: 40px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.welcome-icon {
    flex-shrink: 0;
}

.welcome-text {
    flex: 1;
}

.welcome-text h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #333;
}

.welcome-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}


/* Header enhancements */
header {
    background: transparent;
    color: white;
    padding: 30px 0;
    margin: 0 0 30px 0;
    text-align: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.header-text h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 700;
    /* Enhanced text shadow for better readability */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.header-text p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
    /* Enhanced text shadow for better readability */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Button enhancements */
/* moved to components.css */

/* Header button hover effects */
.header-buttons .btn-icon {
    transition: all 0.3s ease;
}

.header-buttons .btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Footer styles */
.footer {
    margin-top: 60px;
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #764ba2;
}

.footer-links .separator {
    margin: 0 10px;
    color: #dee2e6;
}

.analytics-status {
    margin-top: 10px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    font-size: 0.85rem;
}

.analytics-status small {
    color: #6c757d;
}

.analytics-status a {
    color: #667eea;
    text-decoration: none;
    margin: 0 5px;
}

.analytics-status a:hover {
    text-decoration: underline;
}

.analytics-test-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.analytics-test-controls .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.analytics-test-controls .btn-sm:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Responsive design improvements */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 20px;
        width: calc(100% - 20px);
    }
    
    .welcome-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
}

/* Categories Page - Backup & Restore Section */
.backup-restore-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.backup-restore-section h3 {
    margin: 0 0 15px 0;
    color: #fff;
    font-size: 1.2em;
}

.backup-restore-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.backup-restore-actions .btn {
    flex: 1;
    min-width: 140px;
}

@media (max-width: 768px) {
    .backup-restore-actions {
        flex-direction: column;
    }
    
    .backup-restore-actions .btn {
        flex: none;
        width: 100%;
    }
}

/* Workflow Guide Styles */
.workflow-guide {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.workflow-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.workflow-icon img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.workflow-title h2 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 1.75rem;
    font-weight: 600;
}

.workflow-title p {
    margin: 0;
    color: #546e7a;
    font-size: 1.1rem;
}

.workflow-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.workflow-step {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e1f5fe;
}

.workflow-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.step-content h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.step-content p {
    margin: 0 0 16px 0;
    color: #546e7a;
    line-height: 1.6;
    font-size: 0.95rem;
}

.step-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-tag {
    display: inline-block;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #bbdefb;
}

.workflow-footer {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.privacy-note {
    color: #2e7d32;
    font-size: 0.95rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-large {
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .workflow-guide {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .workflow-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .workflow-title h2 {
        font-size: 1.5rem;
    }
    
    .workflow-title p {
        font-size: 1rem;
    }
    
    .workflow-steps {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .workflow-step {
        padding: 20px;
    }
    
    .privacy-note {
        flex-direction: column;
        gap: 4px;
    }
}

/* Action Cards Styles */
.action-cards {
    margin: 30px 0;
}

.action-cards-title {
    text-align: center;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 25px 0;
}

.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.action-card.primary {
    border-color: #e3f2fd;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
}

.action-card.primary:hover {
    border-color: #1976d2;
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.2);
}

.action-card.secondary {
    border-color: #e8f5e8;
    background: linear-gradient(135deg, #e8f5e8 0%, #f8f9fa 100%);
}

.action-card.secondary:hover {
    border-color: #4caf50;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.action-card.tertiary {
    border-color: #fff3e0;
    background: linear-gradient(135deg, #fff3e0 0%, #f8f9fa 100%);
}

.action-card.tertiary:hover {
    border-color: #ff9800;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.2);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-content {
    flex: 1;
    margin-bottom: 20px;
}

.action-content h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
}

.action-content p {
    margin: 0;
    color: #546e7a;
    line-height: 1.6;
    font-size: 0.95rem;
}

.action-button {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 140px;
}

.action-button.btn-primary {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
}

.action-button.btn-primary:hover {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.action-button.btn-secondary {
    background: linear-gradient(135deg, #4caf50, #43a047);
    color: white;
}

.action-button.btn-secondary:hover {
    background: linear-gradient(135deg, #43a047, #388e3c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.action-button.btn-outline {
    background: transparent;
    border: 2px solid #ff9800;
    color: #ff9800;
}

.action-button.btn-outline:hover {
    background: #ff9800;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

/* Responsive Design for Action Cards */
@media (max-width: 768px) {
    .action-cards {
        margin: 20px 0;
    }
    
    .action-cards-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .action-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 10px;
    }
    
    .action-card {
        padding: 20px;
    }
    
    .action-icon {
        font-size: 2rem;
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }
    
    .action-content h4 {
        font-size: 1.1rem;
    }
    
    .action-content p {
        font-size: 0.9rem;
    }
    
    .action-button {
        padding: 10px 20px;
        font-size: 0.95rem;
        min-width: 120px;
    }
}

/* Success Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.success-modal {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) .success-modal {
    transform: scale(1) translateY(0);
}

.success-content {
    padding: 40px;
}

.success-header {
    text-align: center;
    margin-bottom: 30px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: celebrationBounce 0.6s ease-out;
}

@keyframes celebrationBounce {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.success-header h2 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.success-header p {
    margin: 0;
    color: #546e7a;
    font-size: 1.1rem;
}

.next-steps h3 {
    text-align: center;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 25px 0;
}

.step-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.step-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.step-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.step-option.primary {
    border-color: #e3f2fd;
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}

.step-option.primary:hover {
    border-color: #1976d2;
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.2);
}

.step-option.secondary {
    border-color: #e8f5e8;
    background: linear-gradient(135deg, #e8f5e8 0%, #ffffff 100%);
}

.step-option.secondary:hover {
    border-color: #4caf50;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.2);
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.step-content p {
    margin: 0 0 20px 0;
    color: #546e7a;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn-text {
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-text:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Responsive Design for Success Modal */
@media (max-width: 768px) {
    .success-content {
        padding: 30px 20px;
    }
    
    .success-header h2 {
        font-size: 1.5rem;
    }
    
    .success-header p {
        font-size: 1rem;
    }
    
    .success-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .next-steps h3 {
        font-size: 1.2rem;
    }
    
    .step-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .step-option {
        padding: 20px 16px;
    }
    
    .step-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .step-content h4 {
        font-size: 1.1rem;
    }
    
    .step-content p {
        font-size: 0.9rem;
    }
}


