* { box-sizing: border-box; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f5f7;
    margin: 0;
    padding: 24px 16px;
    color: #1f2937;
}

.container {
    max-width: 480px;
    margin: 0 auto;
}

/* Card "Indicado por" */
.card-indicacao {
    background: #fdecec;
    border: 1px solid #f6c9c9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-indicacao .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f5cccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #c0392b;
    flex-shrink: 0;
}

.card-indicacao .label {
    font-size: 12px;
    color: #c0392b;
    margin: 0 0 2px 0;
}

.card-indicacao .nome {
    font-weight: 700;
    margin: 0;
    font-size: 15px;
}

.card-indicacao .local {
    font-size: 13px;
    color: #6b7280;
    margin: 2px 0 0 0;
}

/* Card do formulario */
.card-form {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 24px;
}

.card-form h1 {
    text-align: center;
    font-size: 20px;
    margin: 0 0 24px 0;
}

.campo {
    margin-bottom: 18px;
}

.campo label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.campo .opcional {
    color: #2563eb;
    font-weight: 600;
}

.campo input[type=text],
.campo input[type=email],
.campo input[type=tel],
.campo input[type=date],
.campo select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.campo .ajuda {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.linha-dupla {
    display: flex;
    gap: 12px;
}

.linha-dupla .campo {
    flex: 1;
}

.checkbox-linha {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 20px;
}

.checkbox-linha a {
    color: #c0392b;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-linha input {
    margin-top: 3px;
}

.btn-enviar {
    width: 100%;
    background: #d64526;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-enviar:hover {
    background: #b83c20;
}

.rodape-lgpd {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 16px;
}

.erro {
    background: #fdecea;
    color: #b91c1c;
    border: 1px solid #f5b5b1;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

.aviso-cep {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 600;
}

.sucesso-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 32px 24px;
    text-align: center;
}

.icone-sucesso {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef6ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 16px auto;
}

.sucesso-box h1 {
    font-size: 20px;
    margin: 0 0 8px 0;
}

.sucesso-box .texto-intro {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 4px 0;
}

.sucesso-box .link-box {
    background: #f4f5f7;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    word-break: break-all;
    margin: 16px 0;
    text-align: left;
    color: #374151;
}

.grupo-botoes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.btn-secundario {
    width: 100%;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secundario:hover {
    background: #f9fafb;
}

.btn-whatsapp {
    width: 100%;
    display: block;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-whatsapp:hover {
    background: #1ebe57;
}

.aviso-copiado {
    font-size: 12px;
    color: #2e7d32;
    margin-top: 8px;
    display: none;
}

/* Painel administrativo */
.container-painel {
    max-width: 1300px;
    width: 95%;
    margin: 0 auto;
}

.painel-marca {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.painel-marca h1 {
    font-size: 22px;
    margin: 0;
    color: #d64526;
    letter-spacing: -0.3px;
}

.painel-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.painel-topo h2 {
    font-size: 18px;
    margin: 0;
}

.painel-topo .subtitulo {
    font-size: 13px;
    color: #6b7280;
    margin: 2px 0 0 0;
}

.painel-acoes {
    display: flex;
    gap: 8px;
}

.btn-exportar {
    background: #1f7a4d;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-exportar:hover {
    background: #185f3c;
}

.btn-logout {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.painel-stat {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 16px 20px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.painel-stat .numero {
    font-size: 26px;
    font-weight: 800;
    color: #d64526;
}

.painel-stat .rotulo {
    font-size: 13px;
    color: #6b7280;
}

.painel-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 16px;
    overflow-x: auto;
}

.tabela-apoiadores {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tabela-apoiadores th {
    text-align: left;
    padding: 10px 12px;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
}

.tabela-apoiadores td {
    padding: 10px 12px;
    border-bottom: 1px solid #f4f5f7;
    white-space: nowrap;
}

.tabela-apoiadores tr:hover td {
    background: #fafafa;
}

.painel-vazio {
    text-align: center;
    color: #9ca3af;
    padding: 40px 0;
    font-size: 14px;
}

/* Shell principal (menu lateral + conteudo) - usado no Dashboard e Candidatos */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    flex-shrink: 0;
    background: #111827;
    color: #d1d5db;
    padding: 22px 16px;
}

.sidebar-marca {
    margin-bottom: 28px;
}

.sidebar-logo-imagem {
    width: 100%;
    max-width: 190px;
    height: auto;
    display: block;
}

.sidebar-secao {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 20px 0 8px 4px;
    font-weight: 700;
}

.sidebar-link {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: #1f2937;
    color: #fff;
}

.sidebar-link.ativo {
    background: #d64526;
    color: #fff;
    font-weight: 700;
}

.app-conteudo {
    flex: 1;
    padding: 32px;
    background: #f4f5f7;
    min-width: 0;
}

.app-conteudo h1 {
    margin: 0 0 4px 0;
    font-size: 22px;
}

.app-conteudo .subtitulo {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 20px 0;
}

@media (max-width: 720px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .sidebar-marca {
        margin-bottom: 0;
        margin-right: 12px;
    }

    .sidebar-secao {
        display: none;
    }

    .sidebar-link {
        display: inline-block;
        padding: 6px 10px;
        font-size: 13px;
    }

    .app-conteudo {
        padding: 20px 16px;
    }
}

/* Celular / tela estreita: a tabela vira uma lista de cards, sem precisar rolar de lado */
@media (max-width: 720px) {
    .tabela-apoiadores thead {
        display: none;
    }

    .tabela-apoiadores, .tabela-apoiadores tbody, .tabela-apoiadores tr, .tabela-apoiadores td {
        display: block;
        width: 100%;
    }

    .tabela-apoiadores tr {
        border: 1px solid #eee;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }

    .tabela-apoiadores td {
        border: none;
        padding: 6px 0;
        text-align: right;
        position: relative;
        padding-left: 46%;
        white-space: normal;
        word-break: break-word;
    }

    .tabela-apoiadores td::before {
        content: attr(data-rotulo);
        position: absolute;
        left: 0;
        width: 42%;
        text-align: left;
        font-weight: 600;
        color: #6b7280;
        font-size: 12px;
    }

    .painel-card {
        overflow-x: visible;
    }
}
