/* ========================================================= */
/* ESTILOS BASE - Originales del formulario */
/* ========================================================= */
.vizorfin-ai-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.vizorfin-ai-container h2 {
    color: #1a1a2e;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

.vizorfin-ai-container > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* Steps */
.vizorfin-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    background: #e8f4fd;
    padding: 20px;
    border-radius: 12px;
}

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

.step-number {
    width: 30px;
    height: 30px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step-text {
    color: #2c3e50;
    font-size: 14px;
}

/* Formulario */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 16px;
}

.form-group input[type="file"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

/* Botón principal */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
}

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

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Resultados */
.results-container {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.result-summary {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.summary-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat {
    flex: 1;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    min-width: 120px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    display: block;
    color: #2c3e50;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
}

.stat.warning .stat-value {
    color: #e74c3c;
}

.stat.success .stat-value {
    color: #27ae60;
}

.executive-summary {
    background: #e8f4fd;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #3498db;
    font-size: 14px;
    line-height: 1.6;
}

.discrepancies-detail {
    margin-top: 20px;
}

.discrepancies-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}

.discrepancies-table th,
.discrepancies-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.discrepancies-table th {
    background: #f1f3f5;
    font-weight: 600;
    color: #2c3e50;
}

.discrepancy-monto_incorrecto {
    background: #fff3cd;
}

.discrepancy-faltante {
    background: #f8d7da;
}

.positive {
    color: #27ae60;
    font-weight: bold;
}

.negative {
    color: #e74c3c;
    font-weight: bold;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

/* CAPTCHA */
.captcha-container {
    transition: all 0.3s ease;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.captcha-container.captcha-error {
    border: 1px solid #e74c3c;
    background-color: #fef5f5;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.captcha-container.captcha-success {
    border: 1px solid #27ae60;
    background-color: #f0f9f0;
}

/* ========================================================= */
/* ESTILOS DE TABS - Integrados con el diseño original */
/* ========================================================= */
.vizorfin-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tab-btn {
    background: #f1f3f5;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    color: #666;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
    font-weight: 600;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* ========================================================= */
/* ESTILOS DEL TUTORIAL */
/* ========================================================= */
.tutorial-container {
    padding: 10px 0;
}

.tutorial-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s;
}

.tutorial-step:hover {
    transform: translateX(5px);
}

.step-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.step-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.tip {
    background: #e8f4fd;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 4px solid #3498db;
}

.btn-download-sample {
    background: #3498db;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-download-sample:hover {
    background: #2980b9;
}

/* ========================================================= */
/* ESTILOS DE FORMATOS */
/* ========================================================= */
.format-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
}

.format-card.warning {
    border-left-color: #e74c3c;
    background: #fef5f5;
}

.format-card h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

/* ========================================================= */
/* ESTILOS DE FORMATOS - CÓDIGO LEGIBLE */
/* ========================================================= */
.code-block {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.code-block pre {
    margin: 10px 0 0 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #ecf0f1;  /* Color del texto */
    background: transparent;
}

.code-block pre code {
    color: #f8f8f2;  /* Color más claro para el código */
}

/* Alternativa con fondo más claro */
.code-block-light {
    background: #f4f4f4;
    border: 1px solid #ddd;
    color: #333;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    overflow-x: auto;
}

.code-block-light pre {
    margin: 10px 0 0 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
    background: transparent;
}

.format-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.format-table th,
.format-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.format-table th {
    background: #f1f3f5;
    font-weight: 600;
}

/* ========================================================= */
/* ESTILOS DE FAQ */
/* ========================================================= */
.faq-item {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.faq-question:hover {
    background: #e8f4fd;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    padding: 15px 20px;
    max-height: 500px;
}

.faq-answer ul {
    margin: 10px 0;
    padding-left: 20px;
}

/* ========================================================= */
/* MODAL */
/* ========================================================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.sample-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.btn-sample {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    transition: opacity 0.3s;
}

.btn-sample:hover {
    opacity: 0.9;
}

.sample-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sample-preview pre {
    margin: 0;
    font-size: 11px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ========================================================= */
/* ESTADÍSTICAS ADICIONALES */
/* ========================================================= */
.stats-detail {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.stat-detail {
    font-size: 13px;
    color: #555;
}

.stat-detail-label {
    font-weight: 600;
}

.stat-detail-value {
    color: #2c3e50;
    margin-left: 5px;
}

.processing-info {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* ========================================================= */
/* RECOMENDACIONES */
/* ========================================================= */
.recommendations {
    background: #f0f9f0;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #27ae60;
    margin-top: 20px;
}

.recommendations ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.recommendations li {
    margin-bottom: 8px;
}

/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */
@media (max-width: 768px) {
    .vizorfin-ai-container {
        padding: 20px;
    }
    
    .vizorfin-steps {
        flex-direction: column;
        gap: 15px;
    }
    
    .summary-stats {
        flex-direction: column;
    }
    
    .discrepancies-table {
        font-size: 11px;
    }
    
    .discrepancies-table th,
    .discrepancies-table td {
        padding: 8px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .tutorial-step {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sample-buttons {
        flex-direction: column;
    }
    
    /* ========================================================= */
    /* SECCIÓN DE DESCARGA */
    /* ========================================================= */
    .download-section {
        margin-top: 25px;
        padding-top: 20px;
        border-top: 1px solid #e0e0e0;
        text-align: center;
    }
    
    .download-buttons {
        display: flex;
        gap: 15px;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .btn-download-csv, .btn-download-excel {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #3498db;
        color: white;
        border: none;
        padding: 10px 24px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .btn-download-csv:hover, .btn-download-excel:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .btn-download-csv {
        background: #2c3e50;
    }
    
    .btn-download-csv:hover {
        background: #1a252f;
    }
    
    .btn-download-excel {
        background: #27ae60;
    }
    
    .btn-download-excel:hover {
        background: #219a52;
    }
    
    .download-note {
        font-size: 12px;
        color: #7f8c8d;
        margin-top: 10px;
    }
    
    /*@media (max-width: 768px) {
        .download-buttons {
            flex-direction: column;
            gap: 10px;
        }
        
        .btn-download-csv, .btn-download-excel {
            width: 100%;
            justify-content: center;
        }
    }*/
}