:root {
    --cor-primaria: #7c3aed;
    --cor-livre: #16a34a;
    --cor-reservado: #f59e0b;
    --cor-vendido: #94a3b8;
    --cor-fundo: #f8fafc;
    --cor-texto: #1e293b;
    --cor-erro: #dc2626;
    --cor-sucesso: #16a34a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--cor-fundo);
    color: var(--cor-texto);
    padding-bottom: 3rem;
}

.topo, .topo-admin {
    background: var(--cor-primaria);
    color: #fff;
    padding: 1.5rem 1rem;
    text-align: center;
}

.topo-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.topo-admin a {
    color: #fff;
    text-decoration: underline;
}

.instrucoes, section {
    max-width: 700px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.instrucoes {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.alerta {
    max-width: 700px;
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 8px;
}

.alerta.erro {
    background: #fee2e2;
    color: var(--cor-erro);
}

.alerta.sucesso {
    background: #dcfce7;
    color: var(--cor-sucesso);
}

form#form-reserva {
    max-width: 700px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.grid-numeros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.numero {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid var(--cor-livre);
    color: var(--cor-livre);
    background: #fff;
    user-select: none;
}

.numero input {
    display: none;
}

.numero:has(input:checked) {
    background: var(--cor-primaria);
    border-color: var(--cor-primaria);
    color: #fff;
}

.numero-reservado {
    border-color: var(--cor-reservado);
    color: var(--cor-reservado);
    background: #fff7ed;
    cursor: not-allowed;
}

.numero-vendido {
    border-color: var(--cor-vendido);
    color: var(--cor-vendido);
    background: #f1f5f9;
    cursor: not-allowed;
    text-decoration: line-through;
}

.resumo-selecao {
    font-weight: 600;
    margin-bottom: 1rem;
    min-height: 1.2em;
}

.dados-comprador {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dados-comprador label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
}

.dados-comprador input {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}

button {
    background: var(--cor-primaria);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.botao-whatsapp {
    display: inline-block;
    margin-top: 0.75rem;
    background: #22c55e;
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}

.cartao-reserva {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cartao-reserva.confirmado {
    border-left: 4px solid var(--cor-sucesso);
}

.acoes {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.acoes form.inline {
    display: inline;
}

.botao-confirmar {
    background: var(--cor-sucesso);
}

.botao-cancelar {
    background: var(--cor-erro);
}

.resumo-livres {
    max-width: 700px;
    margin: 1rem auto;
    padding: 0 1rem;
    font-weight: 600;
}

.pagina-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.caixa-login {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 360px;
}

.caixa-login label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
}

.caixa-login input {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
}
