/* =====================================
   RESET
   ===================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


body {
    font-family: Arial, Helvetica, sans-serif;

    background: #f4f5f7;

    color: #222;

    min-height: 100vh;

    padding-bottom: 105px;
}


/* =====================================
   CABEÇALHO
   ===================================== */

.cabecalho {
    background: #006437;

    color: white;

    text-align: center;

    padding: 25px 20px;

    position: relative;
}


.cabecalho h1 {
    font-size: 32px;

    margin-bottom: 6px;
}


.cabecalho p {
    color: #bbb;

    font-size: 15px;
}


.botao-admin-topo {
    position: absolute;

    top: 12px;

    right: 12px;

    background: rgba(255, 255, 255, 0.12);

    color: white;

    text-decoration: none;

    font-weight: bold;

    font-size: 11px;

    border: 1px solid rgba(255, 255, 255, 0.6);

    padding: 6px 10px;

    border-radius: 6px;

    cursor: pointer;

    white-space: nowrap;

    transition: 0.2s;
}


.botao-admin-topo:hover {
    background: rgba(255, 255, 255, 0.25);
}


@media (max-width: 600px) {

    .botao-admin-topo {
        top: 8px;

        right: 8px;

        font-size: 10px;

        padding: 5px 8px;
    }

}


/* =====================================
   AVISO DE COMPRA EM ANDAMENTO
   ===================================== */

.aviso-compra-andamento {
    width: min(1400px, 94%);

    margin: 15px auto 0;

    background: #fff3cd;

    border: 1px solid #ffe69c;

    color: #664d03;

    border-radius: 10px;

    padding: 14px 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    flex-wrap: wrap;

    gap: 10px;
}


.aviso-botoes {
    display: flex;

    gap: 8px;
}


.aviso-botoes button {
    border: none;

    padding: 8px 14px;

    border-radius: 7px;

    font-weight: bold;

    cursor: pointer;
}


#continuarCompraAndamento {
    background: #006437;

    color: white;
}


#continuarCompraAndamento:hover {
    background: #004e2b;
}


#descartarCompraAndamento {
    background: transparent;

    color: #664d03;

    border: 1px solid #664d03 !important;
}


#descartarCompraAndamento:hover {
    background: rgba(0, 0, 0, 0.05);
}


@media (max-width: 600px) {

    .aviso-compra-andamento {
        width: 94%;

        flex-direction: column;

        align-items: stretch;

        text-align: center;
    }

}


/* =====================================
   PÁGINA PRINCIPAL
   ===================================== */

.pagina-principal {
    width: min(1400px, 94%);

    margin: 25px auto;

    display: grid;

    grid-template-columns:
        minmax(280px, 420px)
        minmax(320px, 620px);

    justify-content: center;

    gap: 25px;

    align-items: start;
}


/* =====================================
   ÁREA DOS NÚMEROS
   ===================================== */

.area-numeros {
    background: white;

    border-radius: 14px;

    padding: 10px;

    box-shadow:
        0 3px 12px #006437;
}


.area-numeros h2 {
    font-size: 23px;

    margin-bottom: 7px;
}


.instrucao {
    color: #666;

    margin-bottom: 20px;
}


/* =====================================
   GRADE
   ===================================== */

.grade-numeros {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 2px;

    max-height: 400px;

    overflow-y: auto;

    padding: 2px;
}


.grade-numeros button {
    border: 1px solid #ddd;

    background: #f5f5f5;

    color: #333;

    border-radius: 6px;

    padding: 3px;

    font-size: 13px;

    font-weight: bold;

    cursor: pointer;

    transition:
        transform 0.12s,
        background 0.15s,
        border 0.15s;
}


.grade-numeros button:hover {
    transform: translateY(-1px);

    border-color: #999;
}


/* =====================================
   NÚMERO SELECIONADO
   ===================================== */

.grade-numeros button.selecionado {
    background: #006437;

    color: white;

    border-color: #006437;
}


/* =====================================
   PENDENTE
   ===================================== */

.grade-numeros button.pendente {
    background: #f39c12;

    color: white;

    border-color: #d68910;

    cursor: not-allowed;

    opacity: 0.95;
}


/* =====================================
   INDISPONÍVEL
   ===================================== */

.grade-numeros button.indisponivel {
    background: white;

    color: white;

    border-color: white;

    cursor: not-allowed;

    opacity: 0.9;
}


/* =====================================
   BANNER
   ===================================== */

.banner-area {
    position: sticky;

    top: 20px;

    display: flex;

    flex-direction: column;

    gap: 15px;
}


.banner {
    display: block;

    width: 100%;

    min-height: 170px;

    background: white;

    border: 1px solid #ddd;

    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.08);
}


.banner img {
    display: block;

    width: 100%;

    height: 100%;

    max-height: 320px;

    object-fit: cover;
}


.banner-clicavel {
    transition: transform 0.15s, box-shadow 0.15s;
}


.banner-clicavel:hover {
    transform: translateY(-2px);

    box-shadow:
        0 6px 18px rgba(0, 100, 55, 0.25);
}


/* =====================================
   BARRA INFERIOR
   ===================================== */

.barra-confirmacao {
    position: fixed;

    bottom: 0;

    left: 0;

    width: 100%;

    z-index: 100;

    background: rgba(255, 255, 255, 0.97);

    border-top: 1px solid #ddd;

    box-shadow:
        0 -4px 15px rgba(0, 0, 0, 0.08);
}


.barra-inner {
    width: min(1400px, 94%);

    min-height: 90px;

    margin: auto;

    display: flex;

    align-items: center;

    gap: 25px;

    padding: 12px 0;
}


/* =====================================
   NÚMEROS DA BARRA
   ===================================== */

.barra-numeros {
    flex: 1;

    min-width: 0;
}


.barra-numeros small {
    display: block;

    color: #006437;

    margin-bottom: 6px;
}


.numeros-selecionados {
    display: flex;

    flex-wrap: wrap;

    gap: 5px;

    max-height: 42px;

    overflow-y: auto;
}


.numero-selecionado {
    background: #006437;

    color: white;

    padding: 5px 8px;

    border-radius: 5px;

    font-size: 12px;

    font-weight: bold;
}


/* =====================================
   INFORMAÇÕES
   ===================================== */

.barra-info {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 4px;

    min-width: 130px;
}


.barra-info span {
    color: #006437;

    font-size: 14px;
}


.barra-info strong {
    font-size: 20px;
}


/* =====================================
   BOTÃO CONFIRMAR
   ===================================== */

.botao-confirmar {
    border: none;

    background: #006437;

    color: white;

    padding: 14px 25px;

    border-radius: 8px;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;
}


.botao-confirmar:hover {
    background: #004e2b;

    scale: 1.25px;

    transform: translateY(-1px);
}


/* =====================================
   MODAL
   ===================================== */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 200;

    background: rgba(0, 0, 0, 0.6);

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;
}


.modal {
    width: min(520px, 100%);

    max-height: 90vh;

    overflow-y: auto;

    background: white;

    border-radius: 16px;

    padding: 28px;

    box-shadow:
        0 15px 50px #006437;
}


.modal h2 {
    margin-bottom: 20px;

    font-size: 23px;
    color: #004e2b;
}


/* =====================================
   FECHAR MODAL (X)
   ===================================== */

.botao-fechar-modal {
    position: absolute;

    top: 14px;

    right: 14px;

    width: 34px;

    height: 34px;

    border: none;

    background: rgba(0, 0, 0, 0.08);

    color: #333;

    border-radius: 50%;

    font-size: 16px;

    line-height: 1;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    z-index: 5;
}


.botao-fechar-modal:hover {
    background: rgba(0, 0, 0, 0.18);
}


/* =====================================
   HISTÓRIA (caixa verde na página)
   ===================================== */

.area-historia {
    background: #006437;

    color: white;

    border-radius: 14px;

    padding: 18px 20px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.15);
}


.area-historia h2 {
    font-size: 18px;

    margin-bottom: 12px;
}


.historia-conteudo-pagina {
    display: grid;

    grid-template-columns: 120px 1fr 150px;

    gap: 14px;

    align-items: start;
}


.historia-fotos {
    display: block;
}


.historia-fotos img {
    display: block;

    width: 100%;

    height: auto;

    border-radius: 10px;

    border: 2px solid rgba(255, 255, 255, 0.35);
}


.historia-texto {
    color: white;

    font-size: 12.5px;

    line-height: 1.5;

    text-align: justify;
}


.historia-texto p {
    margin-bottom: 10px;
}


.historia-texto p:last-child {
    margin-bottom: 0;

    font-weight: bold;
}


@media (max-width: 640px) {

    .historia-conteudo-pagina {
        grid-template-columns: 1fr;
    }


    .historia-fotos img {
        max-width: 220px;

        margin: 0 auto;
    }

}


/* =====================================
   MODAL DE LOGIN DO ADMIN
   ===================================== */

.modal-login {
    position: relative;

    max-width: 380px;
}


.campo-login {
    margin-bottom: 16px;
}


.campo-login label {
    display: block;

    font-size: 13px;

    font-weight: bold;

    color: #444;

    margin-bottom: 6px;
}


.campo-login input {
    width: 100%;

    padding: 12px;

    border: 1px solid #ccc;

    border-radius: 8px;

    font-size: 14px;
}


.campo-login input:focus {
    outline: none;

    border-color: #006437;
}


.erro-login {
    background: #f8d7da;

    color: #721c24;

    padding: 10px 12px;

    border-radius: 7px;

    font-size: 13px;

    margin-bottom: 14px;
}


#botaoEntrarAdmin {
    width: 100%;
}


/* =====================================
   NÚMEROS DO MODAL
   ===================================== */

.lista-confirmacao {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    max-height: 180px;

    overflow-y: auto;

    padding: 5px 0;
}


.numero-escolhido {
    background: #006437;

    color: white;

    padding: 7px 10px;

    border-radius: 6px;

    font-size: 13px;

    font-weight: bold;
}


/* =====================================
   TOTAL MODAL
   ===================================== */

.modal-total {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-top: 20px;

    padding-top: 15px;

    border-top: 1px solid #ddd;
}


.modal-total span {
    color: #006437;
}


.modal-total strong {
    font-size: 21px;
}


/* =====================================
   SUGESTÃO
   ===================================== */

.sugestao {
    margin-top: 18px;

    padding: 14px;

    background: #f4f4f4;

    border-radius: 9px;
}


.sugestao strong {
    display: block;

    color: #006437;

    margin-bottom: 5px;
}


.sugestao p {
    color: #006437;

    font-size: 13px;

    line-height: 1.4;
}


/* =====================================
   BOTÕES MODAL
   ===================================== */

.modal-botoes {
    display: flex;

    gap: 10px;

    margin-top: 20px;
}


.modal-botoes button {
    flex: 1;

    border: none;

    padding: 13px;

    border-radius: 8px;

    font-weight: bold;

    cursor: pointer;
}


.botao-voltar {
    background: #eee;

    color: #006437;
}


.botao-continuar {
    background: #006437;

    color: white;
}


.botao-voltar:hover {
    background: #ddd;
}


.botao-continuar:hover {
    background: #004e2b;
}


/* =====================================
   RESPONSIVO
   ===================================== */

@media (max-width: 900px) {

    .pagina-principal {
        grid-template-columns: 1fr;
    }


    .banner-area {
        position: static;

        flex-direction: row;

        flex-wrap: wrap;

        gap: 12px;
    }


    .area-historia {
        flex-basis: 100%;
    }


    .banner {
        flex: 1 1 200px;

        min-height: 130px;
    }


    .banner img {
        max-height: 180px;
    }


    .grade-numeros {
        grid-template-columns:
            repeat(8, minmax(40px, 1fr));
    }

}


@media (max-width: 600px) {

    body {
        padding-bottom: 150px;
    }


    .cabecalho {
        padding: 20px 15px;
    }


    .cabecalho h1 {
        font-size: 27px;
    }


    .pagina-principal {
        width: 96%;

        margin-top: 15px;
    }


    .area-numeros {
        padding: 15px;
    }


    .grade-numeros {
        grid-template-columns:
            repeat(5, 1fr);

        gap: 5px;

        max-height: 500px;
    }


    .grade-numeros button {
        padding: 10px 2px;

        font-size: 12px;
    }


    .barra-inner {
        width: 94%;

        flex-wrap: wrap;

        gap: 8px;
    }


    .barra-numeros {
        width: 100%;

        flex-basis: 100%;
    }


    .barra-info {
        align-items: flex-start;

        min-width: auto;
    }


    .botao-confirmar {
        margin-left: auto;

        padding: 12px 18px;
    }


    .banner-area {
        flex-direction: column;
    }


    .banner img {
        max-height: 220px;
    }


    .modal {
        padding: 20px;
    }


    .modal-botoes {
        flex-direction: column;
    }

}
