/* Estilos Gerais dos Cards e Grid (mantenha como está) */
.counter-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: left;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: none;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    color: white;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 120px;
}

        .counter-card::before {
            content: '';
            position: absolute;
            top: -20px;
            right: -20px;
            width: 80px;
            height: 80px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
        }

        .counter-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 35px rgba(0,0,0,0.2);
        }

        /* Variações de cores */
        .counter-card.primary { 
            background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
        }
        .counter-card.success { 
            background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
        }
        .counter-card.warning { 
            background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
        }
        .counter-card.danger { 
            background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        }
        .counter-card.info { 
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
        }
        .counter-card.secondary { 
            background: linear-gradient(135deg, #8e44ad 0%, #7d3c98 100%);
        }

/* Criar um container para o conteúdo principal */
.counter-main-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-right: 8px;
    min-width: 100px;
}

.counter-content {
    flex: 1;
}

.counter-label {
    font-size: 1.4rem;
    line-height: 1.7;
}

.counter-date {
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    padding: 4px 8px;
    border-radius: 6px;
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 3;
}

.dashboard-grid {
    display: grid;
    gap: 6px;
    margin-bottom: 8px;
}

/* Desktop: 2 colunas */
@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet: 1 coluna */
@media (min-width: 768px) and (max-width: 991px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SOLUÇÃO PARA MOBILE ===== */
/* Unifica todos os estilos para telas menores que 768px */
@media (max-width: 767px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .counter-card {
        flex-direction: row;      /* Itens em linha (ícone/número ao lado do texto) */
        align-items: center;      /* Alinha os itens verticalmente ao centro */
        text-align: left;         /* Alinha todo o texto à esquerda */
        padding: 15px;          /* Padding geral menor para um card mais compacto */
        padding-bottom: 45px;   /* Deixa espaço na base para a data */
        min-height: auto;
    }

    .counter-main-content {
        flex-direction: row;
        margin-bottom: 0;
    }

    .counter-number {
        margin-right: 4px;
        margin-bottom: 0;   /* Remove Espaço abaixo do número */
        font-size: 2rem;      /* Tamanho do número um pouco menor */
    }

    .counter-label {
        font-size: 0.95rem;   /* Rótulo um pouco menor */
        text-align: left;     /* Posiciona na esquerda o texto */
        line-height: 1.3;
    }

    .counter-date {
        /* A data continua no mesmo lugar, no canto inferior direito */
        bottom: 10px;
        right: 15px;
        left: auto;
        transform: none;
        font-size: 0.8rem;
        padding: 3px 6px;
    }
}

        /* Ajustes extras para telas muito pequenas */
        @media (max-width: 480px) {
            .counter-card {
                margin-bottom: 2px;
            }
            
            .counter-number {
                font-size: 1.8rem;
            }
            
            .counter-label {
                font-size: 0.9rem;
                line-height: 1.3;
                text-align: left;     /* Posiciona na esquerda o texto */
            }
        }

        /* Estilos para o conteúdo da página */
        body {
            background-color: #f8f9fa;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        .container {
            max-width: 1200px;
        }

        .demo-section {
            background: white;
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 20px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .demo-title {
            color: #333;
            margin-bottom: 20px;
            font-weight: 600;
        }

        /* Remover estilos conflitantes do Bootstrap */
        .dashboard-grid .col-md-3 {
            flex: unset !important;
            max-width: unset !important;
        }
        .timeline {
            position: relative;
            padding-left: 30px;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 15px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: #ddd;
        }

        .timeline-item {
            position: relative;
            margin-bottom: 14px;
            background: white;
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -22px;
            top: 20px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #667eea;
        }

        .timeline-item.completed::before {
            background: #28a745;
        }

        .timeline-item.pending::before {
            background: #ffc107;
        }

        .status-badge {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: 500;
            font-size: 1.1rem;
        }

        .badge-enviado { background: #e3f2fd; color: #1976d2; }
        .badge-na_vfs { background: #f3e5f5; color: #7b1fa2; }
        .badge-aguardando_consulado { background: #fff3e0; color: #f57c00; }
        .badge-no_consulado { background: #fce4ec; color: #c2185b; }
        .badge-devolvendo { background: #e8f5e8; color: #388e3c; }
        .badge-finalizado { background: #e8f5e8; color: #388e3c; }

.badge-pendencia {
    background: #f39c12; /* Laranja/Amarelo para indicar atenção */
    color: white;
}

        .search-result {
            display: none;
        }

        .search-result.show {
            display: block;
            animation: fadeIn 0.5s ease-in;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .detail-item {
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #667eea;
            margin-bottom: 10px;
        }

        .detail-label {
            font-weight: 600;
            color: #333;
            margin-bottom: 5px;
        }

        .detail-value {
            color: #666;
        }
    
        .conteudo-pesq {
        font-size: 1.5rem;
        }
        
.counter-card.secondary { border-left-color: #6c757d; }
.counter-card.alert-total { background-color: #ffe6e6 !important; border-left-color: #dc3545 !important; }
.counter-card.alert-consulado { background-color: #fff3cd !important; border-left-color: #ffc107 !important; }

@media (max-width: 768px) {
    .counter-card {
        margin-bottom: 8px;
    }
}

/* Para deixar os cards em coluna única como na imagem */
#dashboardCounters .col-md-3 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 7px;
}