@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* =========================
   BASE / BACKGROUND
   ========================= */

/* Tela de login */
body.login-body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: url('fundologin.jpg.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Painel (após login) */
body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: url('fundologin.jpg.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
}

/* =========================
   LOGIN
   ========================= */

.login-wrapper {
    background: #fff;
    padding: 36px 40px;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(0,0,0,0.18);
    width: 360px;
    text-align: center;
}

.login-title {
    font-size: 22px;
    color: #c62828;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 12px;
    color: #777;
    margin-bottom: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.login-form label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
    margin-top: 8px;
}

.login-form input {
    width: 100%;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    outline: none;
    transition: border 0.2s ease;
}

.login-form input:focus {
    border-color: #c62828;
}

.login-form button {
    width: 100%;
    padding: 10px;
    background: #c62828;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 6px;
    box-shadow: 0 4px 10px rgba(198,40,40,0.3);
    transition: background 0.2s ease;
}

.login-form button:hover {
    background: #b71c1c;
}

.brand {
    font-size: 10px;
    color: #aaa;
    margin-top: 10px;
}

.erro {
    color: #d32f2f;
    font-size: 11px;
    margin-top: 10px;
}

/* =========================
   LAYOUT DO PAINEL
   ========================= */

.layout {
    max-width: 1200px;
    margin: 24px auto 40px auto;
    padding: 0 16px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.topbar-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.topbar-sub {
    font-size: 12px;
    color: #fbe9e7;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.25);
}

/* Botões do topo */
.topbar-actions a,
.topbar-actions button,
.topbar-actions form button {
    background: #ffffff;
    color: #c62828;
    border: 1px solid #f5bcbc;
    padding: 8px 20px;
    font-size: 13px;
    border-radius: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-decoration: none;
    transition: 0.25s ease-in-out;
}

.topbar-actions a:hover,
.topbar-actions button:hover,
.topbar-actions form button:hover {
    background: #ffe5e5;
    border-color: #e39d9d;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* Botão Sair com cor diferenciada */
.topbar-actions .btn-sair {
    background: #ffffff !important;
    color: #b05a00 !important;
    border: 1px solid #e6b68a !important;
}

.topbar-actions .btn-sair:hover {
    background: #ffe4c4 !important;
    border-color: #d89d5c !important;
}

.mensagem {
    background: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* =========================
   ABAS (Resumo / Indicações)
   ========================= */

.tabs-wrapper {
    display: flex;
    gap: 8px;
    margin-top: 16px;   /* topo igual nas duas abas */
    margin-bottom: 0;
}

.tab-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px 8px 0 0;
    background: #f3f3f3;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}

.tab-btn.active {
    background: #ffffff;
    color: #b00020;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    padding-top: 10px; /* pequeno espaço abaixo das abas */
}

/* faz o primeiro card de cada aba começar na mesma altura */
#aba-resumo .card-resumo,
#aba-indicacoes .card {
    margin-top: 10px !important;
}

/* =========================
   CARDS / CONTAINERS
   ========================= */

.card {
    position: relative;
    margin-bottom: 24px;
    padding: 20px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.16),
        0 0 14px rgba(198, 40, 40, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    overflow: hidden;
}

/* faixa superior */
.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #ffb74d, #ff7043, #c62828);
    opacity: 0.95;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.22),
        0 0 18px rgba(198, 40, 40, 0.18);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #c62828;
}

.card-caption {
    font-size: 10px;
    color: #999;
}

.space-between {
    justify-content: space-between;
}

/* ===== Card RESUMO (título + campanha) ===== */

.card-resumo .card-header {
    align-items: center;
}

.card-resumo .card-title {
    font-size: 15px;
    font-weight: 700;
    color: #c62828;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.card-resumo .card-caption {
    font-size: 11px;
    font-weight: 500;
    color: #b71c1c;
}

.campanha-select {
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(198, 40, 40, 0.4);
    font-size: 11px;
    color: #b71c1c;
    background: #ffffff;
    outline: none;
}

.card.card-resumo {
    margin-bottom: 26px;
}

/* =========================
   TABELAS
   ========================= */

.table-wrapper {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    height: 320px;
    min-height: 320px;
    overflow-y: auto;
   overflow-x: auto;  /* agora aparece a barra horizontal quando precisar */
}

.table-wrapper table {
    width: 100%;
    min-width: 1250px;   /* ou 1300px, ajuste conforme o quanto você quer ver */
    table-layout: auto;  /* deixa o navegador distribuir melhor as larguras */
}

.card-resumo table {
    width: 100%;
    table-layout: fixed;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

th, td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

/* cabeçalho vermelho modelo */
table thead th {
    background: #b71c1c !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 10px 6px;
    border-bottom: 0;
    border-right: 1px solid rgba(255,255,255,0.15);
    letter-spacing: 0.04em;
}

table thead th:last-child {
    border-right: 0;
}

table thead th:first-child {
    border-top-left-radius: 3px;
}

table thead th:last-child {
    border-top-right-radius: 3px;
}

/* zebra + hover */
table tbody td {
    padding: 10px 8px;
    font-size: 11px;
}

table tbody tr:nth-child(odd) {
    background: #fffdfd;
}

table tbody tr:nth-child(even) {
    background: #ffffff;
}

table tbody tr:hover {
    background: #ffecec;
}

/* alinhamentos específicos */
td:nth-child(2),
td:nth-child(4),
td.contato,
td:nth-child(10) {
    text-align: left;
}

td:nth-child(1),
td:nth-child(3),
td:nth-child(6),
td:nth-child(7),
td:nth-child(9) {
    text-align: center;
}

td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* =========================
   STATUS / FORMULÁRIOS
   ========================= */

.contato {
    font-size: 9px;
    color: #666;
    line-height: 1.3;
}

.status-pill {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px;
    margin-bottom: 2px;
}

.status-matriculado { background: #e8f5e9; color: #2e7d32; }
.status-pendente    { background: #fff8e1; color: #ff8f00; }
.status-cancelado   { background: #ffebee; color: #c62828; }
.status-inadimplente{ background: #fff3e0; color: #e65100; }
.status-bolsa       { background: #e3f2fd; color: #1565c0; }

.status-select,
.date-input,
textarea {
    font-size: 10px;
    padding: 3px 4px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

textarea {
    width: 100%;
    height: 40px;
    resize: vertical;
}

/* Botão SALVAR */
.btn-save {
    background: #ffe5e5 !important;
    color: #c62828 !important;
    border: 1px solid #f5bcbc !important;
    padding: 7px 16px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: 0.25s ease-in-out;
}

.btn-save:hover {
    background: #ffd6d6 !important;
    border-color: #e39d9d !important;
    transform: translateY(-1px);
}

/* Cabeçalho sortável */
.sortable {
    cursor: pointer;
}

.sortable.asc::after {
    content: " ▲";
    font-size: 8px;
}

.sortable:not(.asc)::after {
    content: " ▼";
    font-size: 8px;
}

/* =========================
   BOTÃO "VER PROGRESSO"
   ========================= */

.btn-progresso {
    background: #ffe5e5 !important;
    color: #c62828 !important;
    border: 1px solid #f5bcbc !important;
    padding: 7px 16px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
    font-weight: 500;
}

.btn-progresso:hover {
    background: #ffd6d6 !important;
    border-color: #e39d9d !important;
    transform: translateY(-1px) !important;
}

/* =========================
   SWEETALERT AJUSTES
   ========================= */

body.swal2-shown {
    padding-right: 0 !important;
}
body.swal2-shown.swal2-height-auto {
    height: auto !important;
}
body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) {
    overflow: auto !important;
}

/* =========================
   RESPONSIVO
   ========================= */

@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .topbar-actions {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .topbar-actions a,
    .topbar-actions button,
    .topbar-actions form button {
        margin-top: 4px;
    }

    table {
        font-size: 9px;
    }

    th, td {
        padding: 4px;
    }
}
/* Tabela padrão SÓ do painel admin */
.layout table {
    border-collapse: collapse;
    width: 100%;
}

.layout table thead th {
    background: var(--pc-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 10px 12px;
}

.layout table tbody td {
    font-size: 14px;
    padding: 8px 12px;
}

/* Deixar o título "Lista de Indicações" maior e mais forte */
.card-title {
    font-size: 20px;
    font-weight: 700;
}

/* Deixar a linha de filtro um pouco mais “solta” */
.filtros-indicacoes {
    margin-top: 8px;
    margin-bottom: 18px;
}
/* Reduzir largura da coluna ID */
#tabelaIndicacoes th:nth-child(1),
#tabelaIndicacoes td:nth-child(1) {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 35px !important;
    text-align: center !important;
}

/* Melhorar leitura do nome do indicador */
#tabelaIndicacoes th:nth-child(2),
#tabelaIndicacoes td:nth-child(2) {
    width: 190px !important;
    min-width: 180px !important;
    white-space: normal !important;
    word-break: break-word !important;
}

/* Dar largura mínima para STATUS */
#tabelaIndicacoes th:nth-child(9),
#tabelaIndicacoes td:nth-child(9) {
    width: 130px !important;
    min-width: 120px !important;
}

/* Dar largura mínima para DATA MATRÍCULA */
#tabelaIndicacoes th:nth-child(10),
#tabelaIndicacoes td:nth-child(10) {
    width: 140px !important;
    min-width: 130px !important;
}

/* Espaço entre Status e Data Matrícula */
#tabelaIndicacoes td select.status-select {
    margin-right: 8px !important;
}

/* Padding interno do input de data */
#tabelaIndicacoes td input.date-input {
    padding: 6px 10px !important;
    box-sizing: border-box;
}

/* Deixar a largura das colunas da tabela de indicações dinâmica */
#tabelaIndicacoes {
    table-layout: auto !important;
}
/* Botão "Ver detalhes →" dentro do card Minhas indicações */
.resumo-link {
    margin-top: 8px;
    background: #ffffff;
    border: 1px solid #c51212;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #c51212;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.resumo-link:hover {
    background: #c51212;
    color: #ffffff;
}
/* Descer os botões do topo (Excel, PDF, Gerenciar usuários, Sair) */
.topbar-actions {
    margin-top: 20px !important;  /* ajuste a altura conforme desejar */
}

/* Ajustar alinhamento com abas Resumo / Indicações */
.tabs-wrapper {
    margin-top: 50px !important;
}
/* Descer SOMENTE os botões do topo */
.topbar-actions {
    position: relative;
    top: 80px;   /* ajuste fino da altura */
}
/* === Deixar botões do topo com estilo de "Abas" do Pense Coin === */
.topbar-actions a,
.topbar-actions button,
.topbar-actions form button {
    background: #ffffff !important;
    color: #b00020 !important;   /* vermelho Pense Coin */
    border: 1px solid #f0b5b5 !important;
    padding: 10px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 14px !important; /* arredondado estilo cartões */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
    text-decoration: none !important;
    transition: 0.25s ease-in-out;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
}

/* Hover igual ao das abas */
.topbar-actions a:hover,
.topbar-actions button:hover,
.topbar-actions form button:hover {
    background: #ffe5e5 !important;
    border-color: #e39d9d !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12) !important;
}

/* Ícones alinhados */
.topbar-actions a i,
.topbar-actions button i {
    font-size: 15px;
}
/* === BOTÕES DO TOPO NO ESTILO DE ABA (RESUMO / INDICAÇÕES) === */

.topbar-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-top: 10px;         /* puxa os botões mais pra baixo */
}

/* Estilo igual de aba (como Resumo / Indicações) */
.topbar-actions a,
.topbar-actions button,
.topbar-actions form button {
    background: #f3f3f3 !important;      /* mesma cor da aba inativa */
    color: #555 !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;  /* só em cima, cara de aba */
    padding: 6px 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px;
}

/* Hover parecido com a aba ativa */
.topbar-actions a:hover,
.topbar-actions button:hover,
.topbar-actions form button:hover {
    background: #ffffff !important;          /* fica branquinho como aba ativa */
    color: #b00020 !important;               /* vermelho Pense */
    box-shadow: 0 -1px 3px rgba(0,0,0,0.08) !important;
}

/* Só pra ícone ficar alinhadinho se tiver */
.topbar-actions a i,
.topbar-actions button i {
    font-size: 14px;
}
