html {
    scroll-behavior: smooth;
}

:root {
    --cor-primaria: #09A552;
    --cor-primaria-hover: #078a44;
}

body {
    background-color: #f4f6f8;
    font-family: 'Segoe UI', sans-serif;
}

/* Estado normal da imagem */
.btn-imagem {
    transition: all 0.3s ease; /* Faz a animação ser suave */
    cursor: pointer;           /* Mostra a mãozinha do mouse */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Sombra suave inicial */
    border-radius: 8px;        /* Opcional: bordas arredondadas ficam mais bonitas */
}

/* Quando o mouse passa por cima (Hover) */
.btn-imagem:hover {
    transform: translateY(-7px); /* Levanta a imagem 7 pixels */
    box-shadow: 0 12px 20px rgba(0,0,0,0.25); /* A sombra cresce para dar profundidade */
}

/* Quando clica (Active) */
.btn-imagem:active {
    transform: translateY(-2px); /* Abaixa um pouco para simular o clique */
    box-shadow: 0 6px 10px rgba(0,0,0,0.2);
}

.main-card {
    /* Removemos o max-width fixo e a margem auto para ele obedecer o grid */
    width: 100%;
    margin: 0; 
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.login-card{
    max-width: 450px !important;
}

.main-card .card-body {
    flex: 1; /* Garante que o corpo estique se necessário */
}

/* --- ESTILOS DOS CARDS LATERAIS (Promocionais) --- */

.status-card {
    width: 100%; 
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* Mesma sombra do main-card */
    border-radius: 12px;
    background: #fff;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Barra superior colorida (Lecard) */
.status-card.status-card-lecard::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 6px;
    background: linear-gradient(90deg, #FAB91A, #d49a0e);
}

/* Barra superior colorida (Papa) */
.status-card.status-card-papa::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 6px;
    background: linear-gradient(90deg, #3439A5, #1e2270);
}

/* Botões promocionais */
.btn-promo {
    border: none;
    font-weight: 600;
    color: white;
    transition: all 0.2s;
}

.btn-promo:hover {
    color: white;
    opacity: 0.9;
}

/* Cores específicas para os botões dentro dos cards laterais */
.status-card-lecard .btn-promo { background-color: #FAB91A; }
.status-card-papa .btn-promo { background-color: #3439A5; }

/* --- Botão Secundário (Link do Site) --- */
.btn-site {
    background-color: transparent;
    border: 2px solid currentColor; /* A borda pega a cor do texto */
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cores específicas para a LECARD */
.status-card-lecard .btn-site {
    color: #FAB91A; /* Texto e Borda Laranja */
    border-color: #FAB91A;
}

.status-card-lecard .btn-site:hover {
    background-color: #FAB91A;
    color: white !important;
    box-shadow: 0 4px 10px rgba(250, 185, 26, 0.3);
}

/* Cores específicas para a PAPA BUSINESS */
.status-card-papa .btn-site {
    color: #3439A5; /* Texto e Borda Azul */
    border-color: #3439A5;
}

.status-card-papa .btn-site:hover {
    background-color: #3439A5;
    color: white !important;
    box-shadow: 0 4px 10px rgba(52, 57, 165, 0.3);
}

/* Ajuste global para centralizar verticalmente o conteúdo na tela */
body.login-page {
    display: block; /* Remove o flexbox que centralizava verticalmente */
    min-height: auto; /* Remove a altura forçada da tela */
    padding-top: 30px; /* Dá um respiro no topo */
    padding-bottom: 30px;
    background-color: #f4f6f8; /* Garante a cor de fundo */
}

.card-header {
    background: linear-gradient(135deg, #09A552, #077038);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    padding: 20px;
}

.btn-custom {
    background-color: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: white;
}

.btn-custom:hover {
    background-color: var(--cor-primaria-hover);
    color: white;
}

.option-card {
    border: 2px solid #979797;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.option-card:hover {
    transform: translateY(-3px);
    border-color: var(--cor-primaria);
}

.option-input:checked+.option-card {
    border-color: var(--cor-primaria);
    background-color: #eafbf2;
    box-shadow: 0 0 0 4px rgba(9, 165, 82, 0.2);
}

.card-logo {
    height: 50px;
    /* Ajuste a altura conforme necessário */
    width: auto;
    margin-bottom: 15px;
    object-fit: contain;
    /* Garante que a imagem não distorça */
}

/* Adicione estes estilos para os botões das operadoras */
.btn-lecard {
    background-color: #FAB91A;
    color: white;
    border: none;
    font-weight: 600;
}

.btn-lecard:hover {
    background-color: #ca9612;
    /* Um pouco mais escuro para efeito hover */
    color: white;
}

.btn-papa {
    background-color: #3439A5;
    color: white;
    border: none;
    font-weight: 600;
}

.btn-papa:hover {
    background-color: #232777;
    /* Um pouco mais escuro para efeito hover */
    color: white;
}

.text-lecard {
    color: #FAB91A;
}

.text-papa {
    color: #3439A5;
}

/* --- ÁREA ADMINISTRATIVA --- */

/* Navbar com Gradiente */
.admin-header {
    background: linear-gradient(135deg, #09A552, #077038);
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Cards de Seção (Fundo branco e borda suave) */
.card-section {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    background: #fff;
    transition: transform 0.2s;
}

.card-section .card-header {
    background-color: #fff;
    border-bottom: 2px solid #f0f0f0;
    padding: 15px 20px;
}

/* Efeito Hover nos Cards de Estatística */
.stat-card:hover {
    transform: translateY(-5px);
}

/* Badges Personalizadas (Cores das Marcas) */
.badge-lecard {
    background-color: #FAB91A;
    color: #fff;
}

.badge-papa {
    background-color: #3439A5;
    color: #fff;
}

.badge-pendente {
    background-color: #6c757d;
    color: #fff;
    opacity: 0.8;
}

/* Estilização para Paginação */
.page-link {
    color: #09A552;
    border: none;
    margin: 0 2px;
    border-radius: 5px;
    font-weight: 600;
}

.page-link:hover {
    background-color: #eafbf2;
    color: #077038;
}

.page-item.active .page-link {
    background-color: #09A552;
    border-color: #09A552;
    color: white;
}

.page-item.disabled .page-link {
    background-color: transparent;
    color: #ccc;
}

/* --- ESTILOS DE IMPRESSÃO (PDF) --- */
@media print {
    /* Esconde elementos desnecessários na impressão */
    .no-print, nav, .card-footer, form, .btn, .pagination {
        display: none !important;
    }
    
    /* Ajusta layout para papel */
    body, .container, .card, .card-body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
    }

    .table {
        font-size: 10pt;
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .table th, .table td {
        border: 1px solid #ddd !important;
        padding: 5px !important;
    }

    /* Força a impressão das cores de fundo (badges) */
    .badge-lecard { background-color: #FAB91A !important; -webkit-print-color-adjust: exact; }
    .badge-papa { background-color: #3439A5 !important; -webkit-print-color-adjust: exact; }
    
    /* Adiciona cabeçalho no papel */
    .card-header::before {
        content: "Relatório de Escolha de Cartão - DTI";
        display: block;
        font-size: 16pt;
        font-weight: bold;
        text-align: center;
        margin-bottom: 20px;
    }
}

/* --- DATATABLES CUSTOMIZATION (Tema Verde) --- */

/* Ajusta os botões de paginação do DataTables */
.page-item.active .page-link {
    background-color: #09A552 !important;
    border-color: #09A552 !important;
    color: white !important;
}

.page-link {
    color: #09A552 !important;
}

.page-link:hover {
    background-color: #eafbf2 !important;
    color: #077038 !important;
}

/* Remove foco azul padrão do bootstrap */
.page-link:focus {
    box-shadow: 0 0 0 0.25rem rgba(9, 165, 82, 0.25) !important;
}

/* Ajusta o campo de busca e select de quantidade */
div.dataTables_wrapper div.dataTables_filter input:focus,
div.dataTables_wrapper div.dataTables_length select:focus {
    border-color: #09A552;
    box-shadow: 0 0 0 0.25rem rgba(9, 165, 82, 0.25);
}

/* Estilo dos Botões de Exportação do DataTables */
.dt-buttons .btn-secondary {
    background-color: #6c757d;
    border: none;
}
.dt-buttons .btn-success {
    background-color: #09A552;
    border: none;
}
.dt-buttons .btn:hover {
    opacity: 0.9;
}

/* --- MODERN NAVBAR --- */

/* Ajuste no corpo para compensar a navbar fixa */
body {
    padding-top: 80px; /* Altura da navbar + espaço */
}

.admin-navbar {
    background: linear-gradient(135deg, #09A552 0%, #066030 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 0; /* Mais espaçamento vertical */
    backdrop-filter: blur(10px); /* Efeito vidro se houver transparência */
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

/* Links de Navegação (Pílulas) */
.navbar-nav .nav-item .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    border-radius: 50px; /* Formato Pílula */
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.navbar-nav .nav-item .nav-link i {
    font-size: 1.1rem;
    margin-right: 6px;
    margin-bottom: 2px;
}

/* Hover e Active State */
.navbar-nav .nav-item .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-item .nav-link.active {
    background-color: #fff;
    color: #09A552 !important;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Dropdown de Usuário */
.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 15px 6px 6px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
}

.user-dropdown .dropdown-toggle:hover,
.user-dropdown .dropdown-toggle.show {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-avatar {
    width: 35px;
    height: 35px;
    background-color: #fff;
    color: #09A552;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 10px;
}

/* Estilo do Menu Dropdown */
.dropdown-menu-animate {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 10px;
    margin-top: 10px !important;
    animation: fadeInDown 0.2s ease-out;
}

.dropdown-item {
    border-radius: 8px;
    padding: 8px 15px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: #f4f6f8;
    color: #09A552;
}

.dropdown-item.text-danger:hover {
    background-color: #fff5f5;
    color: #dc3545;
}

/* Estilos específicos para a apresentação */
.hero-banner {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}
.hero-banner img {
    width: 100%;
    height: auto;
    display: block;
}
.info-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}
.info-title {
    color: var(--cor-primaria);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Ajuste fino no ícone para alinhar verticalmente com o texto */
.info-title i {
    line-height: 0;
    margin-top: -2px; 
}
.step-circle {
    width: 35px;
    height: 35px;
    background-color: var(--cor-primaria);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Animação suave do dropdown */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ajustes Mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
        margin-top: 15px;
        border-radius: 12px;
        padding: 15px;
    }
    
    .navbar-nav .nav-item .nav-link {
        margin-bottom: 5px;
        justify-content: flex-start;
    }
    
    .user-dropdown .dropdown-toggle {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }
}