:root {
    --primary-color: #3b82f6; /* Azul, como solicitado */
    --primary-hover: #2563eb; /* Azul mais escuro para o hover */
    --secondary-color: #6c757d;
    --background-light: #f1f5f9; /* Um cinza-azulado mais moderno */
    --text-dark: #212529;
    --text-light: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Regra global para um layout mais previsível */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    min-height: 100vh; /* Garante que o corpo ocupe a tela toda */
    margin: 80px 0 80px 0; /* Adiciona margem no topo e no final do body */
}

.main-content {
    padding: 30px;
    /* Centraliza o conteúdo em telas grandes para melhor leitura */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page-header {
    display: flex;
    flex-wrap: wrap; /* Permite que os itens quebrem para a linha de baixo em telas pequenas */
    justify-content: space-between;
    align-items: center;
    gap: 15px; /* Espaçamento entre o título e os botões */
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 5px 0;
}

.page-header p {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
}

/* O .header-actions agora serve como um contêiner para botões dentro do .page-header */
.header-actions {
    display: flex;
    gap: 10px;
}

.card {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem; /* Bordas mais suaves */
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05); /* Sombra mais sutil */
    margin-bottom: 20px;
}
.card-header {
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem; /* Tamanho de fonte mais refinado */
    font-weight: 500;
}
.card-body {
    padding: 1.25rem;
}

/* --- Estilo da Página de Login --- */
.login-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: 100vh;
}

.login-box {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 1rem; /* Bordas mais arredondadas */
    box-shadow: var(--shadow);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 220px; /* Ajuste o tamanho da logo conforme necessário */
    height: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px; /* Mais preenchimento interno */
    border: 1px solid var(--border-color);
    border-radius: 0.5rem; /* Bordas mais arredondadas */
    font-size: 1rem;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-light);
    background-color: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none; /* Remove o sublinhado dos links com a classe .btn */
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.error-message {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    padding: 10px;
    border-radius: 0.3rem;
    margin-bottom: 20px;
    text-align: center;
}

/* --- Novo Cabeçalho Fixo --- */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between; /* Alinha itens nas extremidades */
    padding: 0 30px;
    z-index: 1000;
}

.top-logo-link img {
    max-height: 45px; /* Tamanho do logo */
}

.logout-button {
    color: #3b82f6; /* Azul meio escuro */
    font-size: 1.6rem; /* Tamanho do ícone */
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-button:hover {
    color: #2563eb; /* Azul mais escuro no hover */
}

/* Estilo para o link de cadastro/login */
.auth-link {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.auth-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

/* --- Novo Menu Inferior Fixo --- */
.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-decoration: none;
    color: #6c757d; /* Cor secundária para ícones e texto */
    font-size: 0.75rem;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.5rem; /* Tamanho do ícone */
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary-color); /* Cor de destaque para o item ativo */
    font-weight: 600;
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 15px;
    }
    /* Remove a margem do body apenas nas páginas de login/cadastro */
    body:has(.login-container) {
        margin: 0;
    }
    .login-box {
        padding: 25px; /* Menos padding em telas pequenas */
        border: none;
        box-shadow: none;
        border-radius: 0;
        background-color: transparent;
    }
    .top-header {
        padding: 0 15px; /* Menos padding no cabeçalho em telas pequenas */
    }
    .page-header {
        /* No mobile, o título fica em cima e o botão embaixo */
        justify-content: center;
        text-align: center;
    }
}


    font-weight: 600;
}

/* Estilos para a página de Saque */
.balance-display {
    background-color: #f0fdf4; /* Verde bem claro */
    border-left: 5px solid #22c55e; /* Verde mais forte */
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
}
.balance-display-title {
    margin: 0;
    color: #3f6212;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}
.balance-display-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: #166534; /* Verde escuro */
    margin: 0;
}
.feedback-alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    font-weight: 500;
}
.feedback-success { background-color: #dcfce7; color: #166534; border-color: #bbf7d0; }
.feedback-error { background-color: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* Estilos para a página de Integração */
.webhook-instructions .platform-section {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}
.webhook-instructions .platform-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.webhook-instructions h5 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}
.webhook-instructions h5 img {
    max-height: 28px;
}
.webhook-instructions ol {
    padding-left: 20px;
    margin-top: 10px;
}
.webhook-instructions li {
    margin-bottom: 8px;
    color: #4a5568;
}
.adapter-warning {
    background-color: #fffbeb;
    border-left: 4px solid #facc15;
    padding: 15px;
    margin-top: 20px;
}
/* --- Novo Menu Inferior Fixo --- */
.bottom-nav {
    display: flex;
