/* Peora — visual simples e legível */
:root {
    --roxo: #6d28d9;
    --roxo-claro: #ede9fe;
    --verde: #059669;
    --vermelho: #dc2626;
    --amarelo: #d97706;
    --cinza: #f3f4f6;
    --texto: #1f2937;
}
* { box-sizing: border-box; }
body {
    font-family: "Segoe UI", system-ui, sans-serif;
    color: var(--texto);
    background: var(--cinza);
    margin: 0;
}
a { color: var(--roxo); }

.topo {
    background: var(--roxo);
    color: #fff;
    padding: 1.5rem 1rem;
    text-align: center;
    position: relative;
}
.topo h1 { margin: 0; font-size: 2rem; }
.topo h1 a { color: #fff; text-decoration: none; }
.slogan { margin: .4rem 0 0; opacity: .9; }

.topo .marca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
}
.topo .logo {
    height: 64px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

/* Escolha de cidade: busca (F7/F9) */
.bloco-cidade {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .8rem;
}
.cidade-atual { font-size: .95rem; opacity: .95; }
.campo-busca-cidade { position: relative; }
.campo-busca-cidade input {
    padding: .45rem .7rem;
    border-radius: 8px;
    border: 0;
    font-size: .95rem;
    width: 230px;
}
#btn-confirmar-cidade { white-space: nowrap; }

/* lista de cidades vive no cabeçalho roxo: texto escuro garantido */
#sugestoes-cidade li span { color: var(--texto); }
#sugestoes-cidade .tag-cidade {
    background: #e5e7eb;
    color: #4b5563;
}
#sugestoes-cidade .tag-cidade.tag-sim {
    background: #d1fae5;
    color: #065f46;
}
.tag-cidade {
    margin-left: auto;
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .5rem;
    border-radius: 999px;
    text-transform: uppercase;
}
.tag-cidade.tag-sim { display: none; }
.aviso-cidade {
    margin: .6rem auto 0;
    background: #fef3c7;
    color: #92400e;
    padding: .5rem .9rem;
    border-radius: 8px;
    font-size: .95rem;
    display: table;
}
.aviso-cidade[hidden] { display: none; } /* hidden vence: sem espaço fantasma */
.filtro-cidade { font-size: 1rem; font-weight: 400; color: var(--roxo); }

main {
    max-width: 720px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.caixa {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.msg { padding: .6rem 1rem; border-radius: 8px; }
.msg.ok   { background: #d1fae5; color: #065f46; }
.msg.erro { background: #fee2e2; color: #991b1b; }

.ajuda { color: #6b7280; font-size: .9rem; }

/* Nota de privacidade junto ao campo WhatsApp (pergunta real de usuária) */
.nota-privacidade {
    grid-column: 1 / -1;
    color: #6b7280;
    font-size: .78rem;
    margin: .2rem 0 0;
    text-align: center;
}
.nota-privacidade a { color: var(--roxo); }
.ajuda-centralizada { text-align: center; }
.titulo-centralizado { text-align: center; }
.vazio { color: #6b7280; font-style: italic; }

/* Formulários */
form input, form select, form textarea {
    width: 100%;
    padding: .55rem;
    margin: .25rem 0 .6rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}
form label { display: block; font-size: .95rem; }
button {
    background: var(--roxo);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: .6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
}
button:hover { background: #5b21b6; }
.btn-mini { padding: .3rem .7rem; font-size: .85rem; }

/* Formulários: um campo por linha, centralizado */
.form-voto, .form-interesse, .form-compra {
    display: grid;
    grid-template-columns: minmax(0, 420px);  /* coluna única */
    justify-content: center;                   /* coluna no meio da caixa */
    gap: 0;
}
.form-voto input, .form-interesse input, .form-compra input,
.form-voto select, .form-compra select {
    width: 100%;
    text-align: left;                /* cursor de texto à esquerda (padrão) */
}
.form-voto button, .form-interesse button, .form-compra button {
    justify-self: center;
    min-width: 240px;
    margin-top: .2rem;
}
.form-compra label select { margin-top: .25rem; }

/* Ranking (F0) */
.ranking { list-style: none; padding: 0; }
.ranking li {
    padding: .7rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.ranking-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
}
.foto-par {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sem-foto-ranking {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e5e7eb;
    flex-shrink: 0;
}
.ranking .par { font-weight: 600; }
.ranking .contagem {
    background: var(--roxo-claro);
    color: var(--roxo);
    font-weight: 700;
    padding: .3rem .8rem;
    border-radius: 999px;
    white-space: nowrap;
}
.voto-existente { margin: .5rem 0 0; display: grid; grid-template-columns: 1fr 1fr auto; gap: .4rem; }
.btn-topo { margin-top: .5rem; }

/* Janela de voto (dialog) */
.janela {
    border: 0;
    border-radius: 12px;
    padding: 1.2rem;
    width: min(90vw, 380px);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.janela::backdrop {
    background: rgba(0,0,0,.5);
}
.janela h3 { margin: 0 0 .8rem; }
.janela .form-voto { margin: 0; }
.btn-fechar {
    margin-top: .6rem;
    background: #e5e7eb;
    color: var(--texto);
    width: 100%;
}
.btn-fechar:hover { background: #d1d5db; }

/* Captcha (F10) */
.campo-captcha {
    display: flex;
    align-items: center;
    justify-content: center;  /* imagem + código centrados na coluna */
    gap: .6rem;
    flex-wrap: wrap;
}
.campo-captcha img {
    border-radius: 6px;
    cursor: pointer; /* clicável: troca o código */
    flex-shrink: 0;
}
.campo-captcha input {
    max-width: 160px;
    margin: 0;
    flex: 1;
    min-width: 120px;
}

/* Autocomplete de artista (F8) */
.campo-autocomplete { position: relative; }
.sugestoes {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin: .25rem 0 0;
    padding: .25rem;
    list-style: none;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    max-height: 260px;
    overflow-y: auto;
}
.sugestoes li {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
.sugestoes li:hover { background: var(--roxo-claro); }
.sugestoes img {
    border-radius: 50%;
    object-fit: cover;
}
.sem-foto {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
}

/* Lista de shows */
.lista-shows { list-style: none; padding: 0; }
.lista-shows li { border-bottom: 1px solid #e5e7eb; }
.show-link {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    align-items: baseline;
    text-decoration: none;
    color: inherit;
    padding: .7rem 0;
}

/* Status */
.status {
    display: inline-block;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}
.status-proposto   { background: var(--roxo-claro); color: var(--roxo); }
.status-pre_venda  { background: #fef3c7; color: var(--amarelo); }
.status-confirmado { background: #d1fae5; color: var(--verde); }
.status-cancelado { background: #fee2e2; color: var(--vermelho); }

.pg-pendente    { background: #fef3c7; color: var(--amarelo); padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pg-pago        { background: #d1fae5; color: var(--verde); padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.pg-reembolsado { background: #e5e7eb; color: #4b5563; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }

/* Página do show */
.show-cabecalho { text-align: center; }
.foto-show {
    border-radius: 50%;
    object-fit: cover;
    margin: .6rem auto 0;
    display: block;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.show-cabecalho h2 { margin: .3rem 0; font-size: 1.8rem; }
.cidade { color: #6b7280; margin: .2rem 0; }
.cabecalho .preco { margin: .4rem 0 0; }

/* Progresso (F5) */
.barra {
    height: 22px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}
.barra span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--verde), #34d399);
    border-radius: 999px;
    transition: width .4s;
}
.meta-numeros { font-weight: 700; margin: .4rem 0 0; }
.prazo { color: #6b7280; }
.prazo.encerrando { color: var(--vermelho); font-weight: 700; }

/* PIX */
.pix strong {
    font-size: 1.1rem;
    background: var(--roxo-claro);
    padding: .3rem .6rem;
    border-radius: 8px;
    word-break: break-all;
}

/* Compartilhar (F4) */
.btn-zap {
    display: inline-block;
    background: #25d366;
    color: #fff;
    padding: .7rem 1.3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}
.compartilhar { text-align: center; }
.btn-zap-msg {
    display: inline-block;
    margin-left: .6rem;
    font-size: .9rem;
    padding: .45rem 1rem;
    vertical-align: middle;
}

/* Regras */
.regras .texto-regras { white-space: pre-line; }

/* Painel admin */
.pagina-admin main { max-width: 1000px; }
.login-caixa { max-width: 380px; margin: 15vh auto; }
.tabela {
    width: 100%;
    border-collapse: collapse;
    margin: .5rem 0 1rem;
    background: #fff;
}
.tabela th, .tabela td {
    border: 1px solid #e5e7eb;
    padding: .5rem .6rem;
    text-align: left;
    vertical-align: top;
}
.tabela th { background: var(--roxo-claro); }
.tabela .numero { text-align: right; }
.acoes a, .acoes button { margin-right: .4rem; }
.acao-perigosa { color: var(--vermelho); font-weight: 700; }

/* Paginação do painel */
.paginacao {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin: .8rem 0;
}
.paginacao a, .pg-atual {
    padding: .3rem .7rem;
    border-radius: 6px;
    text-decoration: none;
}
.paginacao a { border: 1px solid var(--roxo-claro); }
.paginacao a:hover { background: var(--roxo-claro); }
.pg-atual { background: var(--roxo); color: #fff; }
.pg-ellipsis { color: #6b7280; }
.inline { display: inline; }
.form-cidade { display: flex; gap: .5rem; margin: .8rem 0; }
.form-cidade input { margin: 0; flex: 1; }
.form-cidade button { white-space: nowrap; }

footer {
    text-align: center;
    color: #6b7280;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .form-voto, .form-interesse, .form-compra {
        grid-template-columns: minmax(0, 420px); /* coluna única já é o padrão */
    }
    .tabela { font-size: .85rem; }
}