@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: var(--font-sans);
    background-color: #f1f5f9;
    color: #1e293b;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

/* Animaciones */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

.personality-badge {
    animation: pulse 2s infinite;
}

/* Estadísticas tipo badge */
.badge {
    @apply inline-block text-xs font-semibold px-3 py-1 rounded-full;
}

.badge-purple {
    background-color: #ede9fe;
    color: #7c3aed;
}

.badge-green {
    background-color: #d1fae5;
    color: #059669;
}

#log-panel-inner {
    font-size: 13px;
    line-height: 1.35;
    color: #374151;
    /* Tailwind gray-700 */
}

#log-panel-inner table th,
#log-panel-inner table td {
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}


/* === SIDEBAR === */
.no-transition {
    transition: none !important;
}




/* === ESTILO JUVIBOX PARA SWEETALERT2 === */
.swal2-popup {
    border-radius: 1rem !important;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.25) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-title {
    font-size: 1.2rem !important;
    color: #1e1b4b !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: #4b5563 !important;
    font-size: 0.95rem !important;
}

.swal2-confirm {
    background: linear-gradient(90deg, #6366f1, #8b5cf6) !important;
    color: #fff !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    padding: 0.6rem 1.4rem !important;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease-in-out;
}

.swal2-confirm:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.swal2-cancel {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    padding: 0.6rem 1.4rem !important;
    transition: all 0.2s ease-in-out;
}

.swal2-cancel:hover {
    background: #e5e7eb !important;
}

.swal2-icon.swal2-warning {
    border-color: #facc15 !important;
    color: #eab308 !important;
}

/* === REGISTRO DATAINBOX ACTIVO === */
.dataInbox-active {
    position: relative;
    background-color: rgba(99, 102, 241, 0.04) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    transition: all 0.25s ease;
}

.dataInbox-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #6366f1, #8b5cf6);
    border-radius: 4px 0 0 4px;
}



/* === LINEAS DEL ANALISIS PAYLOAD DEL MÓDULO DOCS === */

#analysis-payload-viewer table.lineas-table {
    background: #fafaff;
    font-size: 12px;
    line-height: 1.2rem;
    border-collapse: separate;
    border-spacing: 0;
}

/* 📐 Ajuste de columnas */
#analysis-payload-viewer table.lineas-table th:nth-child(1),
#analysis-payload-viewer table.lineas-table td:nth-child(1) {
    width: 18%;
}

#analysis-payload-viewer table.lineas-table th:nth-child(2),
#analysis-payload-viewer table.lineas-table td:nth-child(2) {
    width: 40%;
}

#analysis-payload-viewer table.lineas-table th:nth-child(3),
#analysis-payload-viewer table.lineas-table td:nth-child(3),
#analysis-payload-viewer table.lineas-table th:nth-child(4),
#analysis-payload-viewer table.lineas-table td:nth-child(4),
#analysis-payload-viewer table.lineas-table th:nth-child(5),
#analysis-payload-viewer table.lineas-table td:nth-child(5),
#analysis-payload-viewer table.lineas-table th:nth-child(6),
#analysis-payload-viewer table.lineas-table td:nth-child(6) {
    width: 10%;
}

/* ==============================
🎨 ESTILO VISUAL DE FILAS
============================== */

/* 🟣 Fila principal (artículo / payload) */
.payload-line-row {
    background-color: rgba(99, 102, 241, 0.14);
    /* más intenso que antes */
    transition: all 0.2s ease;
}

.payload-line-row:hover {
    background-color: rgba(99, 102, 241, 0.20);
}

/* 🔴 Fila con error o sin coincidencia ERP */
.payload-line-row.no-match {
    background-color: #fee2e2 !important;
    /* red-200 */
    border-left: 4px solid #f87171;
    /* red-400 */
}

.payload-line-row.no-match:hover {
    background-color: #fecaca !important;
    /* red-300 */
}

/* 🔹 Fila ERP (segunda fila) */
.erp-line-row {
    background-color: #ffffff;
    border-top: 1px solid rgba(99, 102, 241, 0.08);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.erp-line-row:hover {
    background-color: rgba(99, 102, 241, 0.06);
}

/* 🔠 Tipografía y compacidad */
.lineas-table td,
.lineas-table th {
    padding: 0.25rem 0.4rem !important;
    vertical-align: top;
}

.lineas-table th {
    font-size: 11px;
    font-weight: 600;
}

/* 🔘 Separadores suaves */
.lineas-table tbody tr:not(:last-child) {
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

/* 💠 Badge clicable */
.unit-badge {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.unit-badge:hover {
    transform: scale(1.04);
    background-color: rgba(99, 102, 241, 0.1);
}

/* ⚠️ Iconos coherentes */
.unit-badge i.fa-triangle-exclamation,
.payload-line-row i.fa-triangle-exclamation {
    color: #f59e0b;
    /* amber-500 */
}

.payload-line-row.no-match i.fa-triangle-exclamation {
    color: #ef4444;
    /* red-500, más vivo para errores */
}

.unit-badge i.fa-box-open {
    color: #6366f1;
    /* indigo-500 */
}

#analysis-payload-viewer .factor-result {
    color: #6366f1;
    font-weight: 600;
    font-size: 11px;
    margin-top: 2px;
    display: block;
}