body {
    background-color: #eceff1;
}
.navbar-brand img {
    max-height: 40px;
}

/* ---------- Painel ---------- */
.caixa-estreita { max-width: 440px; }
.caixa-media { max-width: 600px; }
.foto-candidato {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f5f5f5;
}
.candidato-editar .foto-candidato,
.card-body .foto-candidato { max-width: 220px; }
.sem-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    font-size: 0.9rem;
}
details > summary { cursor: pointer; }

/* ---------- Urna ---------- */
#container-principal {
    padding: 5vh;
    margin-top: 5vh;
    background-color: white;
}
#tela {
    background-color: #eceff1;
    margin-right: 4vh;
    padding: 2vh 3vh;
    position: relative;
    min-height: 60vh;
}
.rotulo-tela {
    font-weight: bold;
    letter-spacing: 0.05em;
}
.displayUrna {
    font-size: 10vh;
    font-family: "Courier New", monospace;
    width: 100%;
    height: 16vh;
    line-height: 16vh;
    text-align: center;
    background-color: white;
    border: 1px solid #b0bec5;
}
.foto-urna {
    max-height: 30vh;
    border: 1px solid #b0bec5;
}
.linha-info .rotulo { color: #546e7a; }
.aviso-urna {
    min-height: 1.5em;
    font-size: 1.5rem;
}
.aviso-destaque {
    font-size: 6vh;
    font-weight: bold;
    text-align: center;
}
.instrucoes {
    font-size: 0.95rem;
    color: #455a64;
}
#tela-fim {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20vh;
    font-weight: bold;
    letter-spacing: 0.1em;
}
#tela-fim.d-none { display: none !important; }

.teclado {
    padding: 3vh;
    background-color: black;
    color: white;
}
.grade-teclas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2vh 3vh;
    margin: 2vh 0;
}
.tecla {
    width: 100%;
    font-size: 4vmin;
    padding: 1.2vh 0;
}
.grade-especiais {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1vh;
}
.tecla-especial {
    width: 100%;
    font-size: 2vmin;
    font-weight: bold;
    padding: 2vh 0;
}
.link-encerrar {
    color: #90a4ae;
    font-size: 0.85rem;
}

@media (max-width: 767px) {
    #container-principal { padding: 2vh; margin-top: 2vh; }
    #tela { margin-right: 0; margin-bottom: 2vh; }
    .tecla { font-size: 6vmin; }
    .tecla-especial { font-size: 3.2vmin; }
}

@media print {
    body { background: white; }
    .card { border: none; }
}
