/**
 * Import Enhanced Module - Premium UI
 * Cores: #667eea (azul) + #764ba2 (roxo)
 */

/* ===========================
   Container Principal
   =========================== */
.module-isolated-import-enhanced {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* ===========================
   Header Premium
   =========================== */
.import-header-premium {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.import-header-premium h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.import-header-premium .breadcrumb {
    opacity: 0.9;
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===========================
   Import Tabs
   =========================== */
.import-tabs-container {
    background: white;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.import-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 1.25rem 2rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    background: white;
    color: #667eea;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.tab-info {
    padding: 1.5rem 2rem;
    background: white;
}

.tab-info .info-text {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.tab-info .info-text strong {
    color: #667eea;
}

/* ===========================
   Progress Bar Enhanced
   =========================== */
.progress-container-enhanced {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.progress-percentage {
    font-weight: 700;
    color: #667eea;
    font-size: 1.25rem;
}

.progress-bar-container {
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

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

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

.progress-stats {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-weight: 700;
    color: #333;
}

.stat-item.success .stat-value {
    color: #28a745;
}

.stat-item.warning .stat-value {
    color: #ffc107;
}

.stat-item.error .stat-value {
    color: #dc3545;
}

/* ===========================
   Stepper Enhanced
   =========================== */
.stepper-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    flex: 1;
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-item.current .step-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #764ba2;
    animation: pulse 2s infinite;
}

.step-item.completed .step-icon {
    background: #28a745;
    border-color: #28a745;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
}

.step-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.step-item.current .step-label,
.step-item.completed .step-label {
    color: #333;
    font-weight: 700;
}

.step-status {
    font-size: 0.8rem;
    color: #999;
    min-height: 1rem;
}

.step-divider {
    flex: 1;
    height: 3px;
    background: #e9ecef;
    margin: 0 1rem;
    position: relative;
    top: -25px;
}

/* ===========================
   Upload Zone
   =========================== */
.upload-zone-enhanced {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.upload-area:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.upload-icon-large {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-area h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: #666;
    margin: 0.25rem 0;
}

.upload-hint {
    font-size: 0.85rem;
    color: #999;
}

.file-input-hidden {
    display: none;
}

.file-requirements {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.file-requirements h4 {
    margin-top: 0;
    color: #333;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.requirement-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.requirement-item strong {
    color: #667eea;
    font-family: monospace;
    margin-bottom: 0.25rem;
}

.requirement-item span {
    color: #666;
    font-size: 0.85rem;
}

/* ===========================
   Processing State
   =========================== */
.processing-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 5px solid #e9ecef;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-state p {
    color: #666;
    font-size: 1.1rem;
}

/* ===========================
   Validation Results
   =========================== */
.validation-results-enhanced {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.validation-results-enhanced h3 {
    margin-top: 0;
    color: #333;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.result-card.success {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.result-card.error {
    border-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.result-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

.error-list {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
}

.error-list h4 {
    margin-top: 0;
    color: #856404;
}

.error-list ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.error-list li {
    color: #856404;
    margin: 0.5rem 0;
}

.result-message {
    padding: 1rem;
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    color: #004085;
    margin-top: 1.5rem;
}

/* ===========================
   Import Options Card
   =========================== */
.import-options-card {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
}

.import-options-card h4 {
    color: #856404;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-item {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.checkbox-label:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-text strong {
    color: #333;
    font-size: 1rem;
}

.checkbox-text small {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.4;
}

.missing-techniques-preview {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.missing-techniques-preview p {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.techniques-to-create {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.techniques-to-create li {
    padding: 0.5rem;
    color: #666;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.techniques-to-create li:last-child {
    border-bottom: none;
}

/* ===========================
   Preview View
   =========================== */
.preview-view-enhanced {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.preview-view-enhanced h3 {
    margin-top: 0;
    color: #333;
}

.preview-table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

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

.preview-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

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

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

.preview-info {
    padding: 1rem;
    background: #e7f3ff;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    color: #004085;
}

/* ===========================
   Course Preview Card
   =========================== */
.course-preview-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border: 2px solid #667eea;
}

.course-preview-card h4 {
    color: #667eea;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.course-preview-card p {
    margin: 0.75rem 0;
    color: #333;
    line-height: 1.6;
}

.course-preview-card strong {
    color: #667eea;
    margin-right: 0.5rem;
}

.techniques-preview {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
}

.techniques-preview h4 {
    color: #764ba2;
    margin-top: 0;
}

.techniques-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.techniques-list li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #e9ecef;
}

.techniques-list li:last-child {
    border-bottom: none;
}

/* ===========================
   Import Animation
   =========================== */
.import-view-enhanced {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.import-view-enhanced h3 {
    color: #333;
    margin-bottom: 1rem;
}

.import-animation {
    margin: 2rem 0;
}

.pulse-loader {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: pulse-grow 1.5s ease-in-out infinite;
}

@keyframes pulse-grow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* ===========================
   Final Report
   =========================== */
.final-report-enhanced {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.final-report-enhanced h2 {
    color: #28a745;
    margin-bottom: 2rem;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.summary-card {
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.summary-card.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.summary-card.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.summary-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.summary-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
}

.summary-label {
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
}

.report-details {
    text-align: left;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.report-details p {
    margin: 0.5rem 0;
    color: #333;
}

.report-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===========================
   Log Console
   =========================== */
.log-console-enhanced {
    background: #1e1e1e;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #2d2d2d;
    border-bottom: 1px solid #3d3d3d;
}

.log-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1rem;
}

.btn-clear {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.log-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.log-empty {
    color: #999;
    text-align: center;
    padding: 2rem;
}

.log-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.log-entry:hover {
    background: #2d2d2d;
}

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

.log-timestamp {
    color: #888;
    flex-shrink: 0;
}

.log-message {
    color: #fff;
    flex: 1;
}

.log-details {
    color: #aaa;
    font-size: 0.75rem;
}

.log-entry.log-success .log-message {
    color: #28a745;
}

.log-entry.log-error .log-message {
    color: #dc3545;
}

.log-entry.log-warning .log-message {
    color: #ffc107;
}

.log-entry.log-info .log-message {
    color: #17a2b8;
}

.log-entry.log-processing .log-message {
    color: #667eea;
}

/* ===========================
   Action Buttons
   =========================== */
.import-actions-enhanced {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-info,
.btn-link {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

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

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-2px);
}

.btn-link {
    background: transparent;
    color: #667eea;
    text-decoration: underline;
}

.btn-link:hover {
    color: #764ba2;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 768px) {
    .module-isolated-import-enhanced {
        padding: 1rem;
    }
    
    .import-header-premium {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stepper-enhanced {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-divider {
        display: none;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .import-actions-enhanced {
        flex-direction: column;
    }
    
    .import-actions-enhanced button {
        width: 100%;
    }
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .import-header-premium,
    .log-console-enhanced,
    .import-actions-enhanced {
        display: none;
    }
    
    .final-report-enhanced,
    .validation-results-enhanced {
        page-break-inside: avoid;
    }
}
