.drop-highlight {
    border: 2px dashed #28a745 !important;
    background-color: rgba(40, 167, 69, 0.1) !important;
}

.ui-droppable-hover {
    background-color: #d4edda !important;
    border-left: 4px solid #28a745 !important;
    transform: scale(1.02) !important;
}

.draggable-row {
    cursor: move !important;
    transition: all 0.3s ease !important;
}

.draggable-row:hover {
    background-color: rgba(33, 150, 243, 0.1) !important;
}

.match-card-melhorado {
    transition: all 0.3s ease !important;
}

.match-card-melhorado:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.match-card-melhorado {
    position: relative;
}

.match-card-melhorado .btn {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.match-card-melhorado:hover .btn {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.conciliacao-notification {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.badge-selecao {
    animation: fadeInBounce 0.4s ease !important;
}

@keyframes fadeInBounce {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.highlight-panel {
    animation: highlightPulse 2s ease-in-out;
    border: 2px solid #007bff !important;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3) !important;
    transition: all 0.3s ease;
}

.automatch-highlight {
    border-color: #28a745 !important;
    box-shadow: 0 0 25px rgba(40, 167, 69, 0.4) !important;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05), rgba(40, 167, 69, 0.1)) !important;
}

.matches-highlight {
    border-color: #17a2b8 !important;
    box-shadow: 0 0 25px rgba(23, 162, 184, 0.4) !important;
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.05), rgba(23, 162, 184, 0.1)) !important;
}

.analysis-highlight {
    border-color: #ffc107 !important;
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.4) !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(255, 193, 7, 0.1)) !important;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    25% {
        transform: scale(1.01);
        opacity: 0.95;
    }

    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }

    75% {
        transform: scale(1.01);
        opacity: 0.95;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#panel_sugestoes {
    scroll-margin-top: 80px;
    transition: all 0.3s ease;
}

.auto-match-results,
.qualidade-analysis,
.matches-container-melhorado {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    #panel_sugestoes {
        scroll-margin-top: 60px;
    }
}

/* =====================================================
ESTILOS PARA MODAL DE DETALHES
===================================================== */

#modalDetalhes .modal-content {
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
}

#modalDetalhes .modal-header {
    border-bottom: none !important;
    position: relative;
    overflow: hidden;
}

#modalDetalhes .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

#modalDetalhes .modal-body {
    padding: 30px !important;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
}

#modalDetalhes .card {
    transition: all 0.3s ease;
    border: none !important;
    margin-bottom: 20px;
}

#modalDetalhes .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

#modalDetalhes .card-header {
    border-bottom: none !important;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

#modalDetalhes .card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
}

#modalDetalhes .card-body {
    padding: 25px !important;
}

/* Linhas de detalhes */
.detalhe-linha {
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 8px 12px !important;
    margin-bottom: 12px !important;
}

.detalhe-linha:hover {
    background: rgba(0, 123, 255, 0.05) !important;
    border-color: rgba(0, 123, 255, 0.2) !important;
    transform: translateX(3px);
}

.detalhe-linha strong {
    font-weight: 600 !important;
    color: #495057 !important;
}

/* Métricas */
.metric-box {
    transition: all 0.3s ease;
    cursor: pointer;
}

.metric-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #f1f3f4 0%, #ffffff 100%) !important;
}

/* Alerts customizados */
#modalDetalhes .alert {
    border: none !important;
    position: relative;
    overflow: hidden;
}

#modalDetalhes .alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: currentColor;
    opacity: 0.6;
}

#modalDetalhes .alert-info::before {
    background: #17a2b8;
}

/* Badges customizados */
#modalDetalhes .badge {
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

#modalDetalhes .badge:hover {
    transform: scale(1.05);
}

/* Botões do footer */
#modalDetalhes .modal-footer {
    border-top: 1px solid #e9ecef !important;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px 30px !important;
}

#modalDetalhes .modal-footer .btn {
    transition: all 0.3s ease;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

#modalDetalhes .modal-footer .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Efeitos de carregamento */
#modalDetalhes.fade.show {
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

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

/* Container principal de detalhes */
.detalhes-container {
    position: relative;
}

.detalhes-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg,
            rgba(0, 123, 255, 0.02) 0%,
            rgba(40, 167, 69, 0.02) 50%,
            rgba(255, 193, 7, 0.02) 100%);
    border-radius: 20px;
    z-index: -1;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background: linear-gradient(45deg,
                rgba(0, 123, 255, 0.02) 0%,
                rgba(40, 167, 69, 0.02) 50%,
                rgba(255, 193, 7, 0.02) 100%);
    }

    33% {
        background: linear-gradient(45deg,
                rgba(40, 167, 69, 0.02) 0%,
                rgba(255, 193, 7, 0.02) 50%,
                rgba(0, 123, 255, 0.02) 100%);
    }

    66% {
        background: linear-gradient(45deg,
                rgba(255, 193, 7, 0.02) 0%,
                rgba(0, 123, 255, 0.02) 50%,
                rgba(40, 167, 69, 0.02) 100%);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    #modalDetalhes .modal-xl {
        max-width: 95% !important;
        margin: 10px auto !important;
    }

    #modalDetalhes .modal-body {
        padding: 20px !important;
    }

    #modalDetalhes .card-body {
        padding: 15px !important;
    }

    .detalhe-linha .row {
        margin: 0 !important;
    }

    .detalhe-linha .col-5,
    .detalhe-linha .col-7 {
        padding: 2px 8px !important;
    }

    .metric-box {
        margin-bottom: 15px;
    }
}

/* Estados especiais */
#modalDetalhes .movimento-conciliado {
    border-left: 4px solid #28a745 !important;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.02) 100%) !important;
}

#modalDetalhes .movimento-pendente {
    border-left: 4px solid #ffc107 !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0.02) 100%) !important;
}

/* Tooltips customizados */
#modalDetalhes .tooltip {
    font-size: 12px !important;
}

#modalDetalhes .tooltip-inner {
    background: rgba(0, 0, 0, 0.9) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
}

/* Scrollbar customizada */
#modalDetalhes .modal-body::-webkit-scrollbar {
    width: 6px;
}

#modalDetalhes .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#modalDetalhes .modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 3px;
}

#modalDetalhes .modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003875 100%);
}

/* Efeitos especiais para elementos interativos */
#modalDetalhes [data-toggle="tooltip"]:hover {
    cursor: help;
}

#modalDetalhes .clickable:hover {
    cursor: pointer;
    color: #007bff !important;
}

/* Animações de entrada para cards */
#modalDetalhes .card {
    animation: cardSlideIn 0.6s ease-out;
    animation-fill-mode: both;
}

#modalDetalhes .card:nth-child(1) {
    animation-delay: 0.1s;
}

#modalDetalhes .card:nth-child(2) {
    animation-delay: 0.2s;
}

#modalDetalhes .card:nth-child(3) {
    animation-delay: 0.3s;
}

#modalDetalhes .card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Modal de escolha de cadastro */
#modalEscolhaCadastro .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#modalEscolhaCadastro .modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

#modalEscolhaCadastro .opcao-card {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#modalEscolhaCadastro .opcao-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

#modalEscolhaCadastro .opcao-card:hover::before {
    left: 100%;
}

#modalEscolhaCadastro .opcao-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--hover-color, #007bff);
}

#modalEscolhaCadastro .opcao-card.movimento {
    --hover-color: #28a745;
}

#modalEscolhaCadastro .opcao-card.transferencia {
    --hover-color: #007bff;
}

#modalEscolhaCadastro .opcao-card:active {
    transform: translateY(-3px) scale(0.98);
}

#modalEscolhaCadastro .opcao-card h6 {
    margin: 8px 0 5px 0;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#modalEscolhaCadastro .opcao-card small {
    font-size: 11px;
    line-height: 1.3;
}

#modalEscolhaCadastro .opcao-card i {
    display: block;
    margin-bottom: 10px;
}

#modalEscolhaCadastro .modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 15px 30px;
}

#modalEscolhaCadastro .modal-body {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

/* Animação de entrada */
#modalEscolhaCadastro.fade .modal-dialog {
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

#modalEscolhaCadastro.show .modal-dialog {
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 768px) {
    #modalEscolhaCadastro .opcao-card {
        margin-bottom: 15px;
        height: 120px;
        padding: 20px 10px;
    }
    
    #modalEscolhaCadastro .modal-body {
        padding: 20px;
    }
}

/* Estilos para Conciliação Múltipla */
.conciliacao-multipla {
    position: relative;
    transition: all 0.3s ease;
}

/* .conciliacao-multipla:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2) !important;
} */

.conciliacao-multipla::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(45deg, #28a745, #20c997, #17a2b8, #6610f2);
    border-radius: 15px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

.metric-mini {
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.metric-mini:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: scale(1.05);
}

.itens-conciliados {
    max-height: 200px;
    overflow-y: auto;
}

.itens-conciliados::-webkit-scrollbar {
    width: 4px;
}

.itens-conciliados::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.itens-conciliados::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 4px;
}

.item-conciliado {
    transition: background-color 0.2s ease;
}

.item-conciliado:hover {
    background-color: rgba(40, 167, 69, 0.05);
    border-radius: 4px;
}

.badge-lg {
    font-size: 0.9em;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acoes-multipla .btn {
    transition: all 0.2s ease;
    border-radius: 20px;
    font-weight: 600;
    font-size: 11px;
    padding: 6px 12px;
}

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

/* Indicador visual para linhas com conciliação múltipla */
tr[data-conciliacao-tipo="multipla"] {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(32, 201, 151, 0.05) 100%);
    border-left: 4px solid #28a745;
}

/* Indicador de saldo pendente */
.saldo-pendente-alert {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #856404;
}

.saldo-zerado {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #28a745;
    color: #155724;
}

/* Animação para novos itens adicionados */
@keyframes novoItemAdicionado {
    0% {
        opacity: 0;
        transform: translateX(-20px);
        background-color: #fff3cd;
    }
    50% {
        background-color: #d4edda;
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        background-color: transparent;
    }
}

.item-novo {
    animation: novoItemAdicionado 1s ease-out;
}

/* Badges especiais para tipos de conciliação */
.badge-conciliacao-multipla {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.badge-conciliacao-parcial {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

/* Tooltip customizado para detalhes rápidos */
.tooltip-multipla {
    position: relative;
    cursor: help;
}

.tooltip-multipla::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip-multipla:hover::after {
    opacity: 1;
}

/* Efeito de loading para atualizações */
.loading-conciliacao {
    position: relative;
    overflow: hidden;
}

.loading-conciliacao::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(40, 167, 69, 0.3), transparent);
    animation: loadingSlide 1.5s ease-in-out infinite;
}

@keyframes loadingSlide {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsividade para telas menores */
@media (max-width: 768px) {
    .conciliacao-multipla {
        padding: 10px;
    }
    
    .metric-mini {
        margin-bottom: 8px;
    }
    
    .acoes-multipla .btn {
        margin-bottom: 5px;
        width: 100%;
    }
    
    .itens-conciliados {
        max-height: 150px;
    }
}

/* Estados visuais para diferentes status */
.conciliacao-status-total {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
}

.conciliacao-status-parcial {
    border-color: #ffc107 !important;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
}

.conciliacao-status-pendente {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
}