/* style.css */

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

.animate-shimmer {
    animation: shimmer 2s infinite;
}

/* Configurações Gerais */
body {
    background-color: #F1F5F9;
    /* Fundo Cinza Claro */
    color: #334155;
    /* Texto Cinza Escuro */
    font-family: 'Inter', sans-serif;
}

/* CARD PADRÃO (O segredo do visual) */
.card {
    background-color: #FFFFFF;
    /* Fundo Branco GARANTIDO */
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border-color: #CBD5E1;
}

/* Card de Saldo (Gradiente Roxo) */
.card-saldo {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

/* Badges de Status da Tabela */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.badge-success {
    background-color: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.badge-warning {
    background-color: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.badge-danger {
    background-color: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.badge-neutral {
    background-color: #F3F4F6;
    color: #4B5563;
    border: 1px solid #E5E7EB;
}

/* Utilitários */
.live-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.live-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid #10B981;
    opacity: 0;
    animation: pulse 1.5s infinite;
}

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

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

/* Modais */
.modal {
    transition: opacity 0.2s ease-in-out;
}

body.modal-active {
    overflow: hidden;
}

/* Cores do Gráfico de Progresso (Tanque) */
.progress-success {
    background-color: #10B981;
}

.progress-warning {
    background-color: #F59E0B;
}

.progress-danger {
    background-color: #EF4444;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* --- ANIMAÇÕES SUTIS (Bordas) --- */

@keyframes borderPulseRose {
    0% {
        border-color: #E2E8F0;
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
    }

    50% {
        border-color: #FB7185;
        /* Rose 400 - Suave */
        box-shadow: 0 0 0 2px rgba(251, 113, 133, 0.2);
    }

    100% {
        border-color: #E2E8F0;
        box-shadow: 0 0 0 0 rgba(244, 63, 94, 0);
    }
}

.flash-border-rose {
    animation: borderPulseRose 2s ease-in-out;
}

@keyframes borderPulseIndigo {
    0% {
        border-color: #E2E8F0;
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }

    50% {
        border-color: #818CF8;
        box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
    }

    100% {
        border-color: #E2E8F0;
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.flash-border-indigo {
    animation: borderPulseIndigo 2s ease-in-out;
}

@keyframes borderPulseAmber {
    0% {
        border-color: #E2E8F0;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }

    50% {
        border-color: #FBBF24;
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
    }

    100% {
        border-color: #E2E8F0;
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.flash-border-amber {
    animation: borderPulseAmber 2s ease-in-out;
}

/* Para o card Roxo (sem borda): usa shadow ring branco */
@keyframes ringPulseWhite {
    0% {
        box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    }

    50% {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    }

    100% {
        box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
    }
}

.flash-border-white {
    animation: ringPulseWhite 2s ease-in-out;
}

/* --- EFEITO DE BRILHO (SHINE) --- */
@keyframes shine {
    0% {
        left: -150%;
        opacity: 0;
    }

    10% {
        opacity: 0.5;
        /* Mais visível */
    }

    50% {
        left: 150%;
        opacity: 0.5;
    }

    100% {
        left: 150%;
        opacity: 0;
    }
}

.shine-effect {
    position: relative;
    overflow: hidden !important;
}

/* Garante que o brilho fique acima dos elementos internos, mas abaixo de tooltips/modais */
.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    /* Feixe um pouco mais estreito e definido */
    height: 100%;
    /* Gradiente mais forte no centro (branco puro) */
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4) 50%, transparent);
    transform: skewX(-20deg);
    animation: shine 8s infinite ease-in-out;
    /* Mais Lento (8s) */
    pointer-events: none;
    z-index: 40;
    /* Z-Index alto para passar por cima de gráficos/textos */
    display: block;
}

/* 4. Badges de Diferença (Pop-in) */
@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

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

.diff-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 800;
    margin-left: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.diff-positive {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.diff-negative {
    background-color: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

/* Ícone de novo no ranking */
.badge-novo {
    background-color: #EFF6FF;
    color: #3B82F6;
    border: 1px solid #BFDBFE;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Badge Info Genérico */
.badge-info {
    background-color: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

/* Animação para o Badge de Evolução (Pulse Ranking) */
@keyframes badgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        filter: brightness(1.1);
    }

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

.animate-badge-pulse {
    animation: badgePulse 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Scrollbar Customizada Global */
.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scroll::-webkit-scrollbar {
    display: none;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 20px;
}

.custom-scrollbar:hover::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

/* --- LAYOUT: Alinhamento do Tanque de Campanhas --- */
#lista-campanhas > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#lista-campanhas > div > div:last-child {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* --- CLASSES UTILITÁRIAS --- */

/* Botão Primário */
.btn-primary {
    background-color: #4F46E5;
    color: white;
    font-weight: 700;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background-color: #4338CA;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Input Padrão */
.input-default {
    width: 100%;
    border: 1px solid #E2E8F0;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    outline: none;
    font-weight: 500;
    color: #334155;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-default:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-default::placeholder {
    color: #94A3B8;
}

/* Label Padrão */
.label-default {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748B;
    margin-bottom: 0.375rem;
}