/* ==========================================================================
   Telas de entrada: login e selecao de empresa.
   Mesma identidade do simulador. Arquivo em ASCII puro (padrao HMTL5).
   ========================================================================== */

.auth-tela {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--brand-blue) 0%, #0b2d52 55%, #081f3a 100%);
}

/* fundo com a marca, discreto */
.auth-tela::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 199, 44, .10), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, .06), transparent 40%);
    pointer-events: none;
}

.auth-centro {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 27rem;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .45);
    overflow: hidden;
}
.auth-card--largo { max-width: 56rem; }

.auth-topo {
    background: #fff;
    padding: 1.75rem 1.75rem 0;
    text-align: center;
}
.auth-topo img { height: 46px; width: auto; margin: 0 auto .9rem; display: block; }
.auth-topo h1 {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--brand-blue);
    line-height: 1.25;
}
.auth-topo p {
    font-size: var(--fs-12);
    color: #64748b;
    margin-top: .25rem;
}

.auth-corpo { padding: 1.5rem 1.75rem 1.75rem; }

/* ----------------------------------------------------------------- campos */
.auth-campo { margin-bottom: .9rem; }
.auth-campo label {
    display: block;
    font-size: var(--fs-12);
    font-weight: 700;
    color: #334155;
    margin-bottom: .3rem;
}
.auth-campo input {
    width: 100%;
    padding: .7rem .85rem;
    font-size: .875rem;
    border: 1px solid #cbd5e1;
    border-radius: .65rem;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s;
}
.auth-campo input:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 77, 142, .15);
    background: #fff;
}

.auth-botao {
    width: 100%;
    padding: .8rem;
    border-radius: .65rem;
    font-weight: 900;
    font-size: .875rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, transform .08s;
}
.auth-botao:active { transform: scale(.99); }
.auth-botao--principal { background: var(--brand-blue); color: #fff; }
.auth-botao--principal:hover { background: #063e70; }
.auth-botao--google {
    background: #fff;
    color: #1e293b;
    border-color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
}
.auth-botao--google:hover { background: #f8fafc; }
.auth-botao:disabled { opacity: .55; cursor: not-allowed; }

.auth-ou {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.1rem 0;
    color: #94a3b8;
    font-size: var(--fs-11);
    font-weight: 700;
    text-transform: uppercase;
}
.auth-ou::before,
.auth-ou::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-erro {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: .65rem;
    padding: .7rem .85rem;
    font-size: var(--fs-12);
    line-height: 1.45;
    margin-bottom: .9rem;
}
.auth-erro--visivel { display: block; }

.auth-nota {
    font-size: var(--fs-11);
    color: #64748b;
    text-align: center;
    line-height: 1.5;
    margin-top: 1.1rem;
}

.auth-rodape {
    position: relative;
    text-align: center;
    padding: 1rem;
    color: rgba(255, 255, 255, .55);
    font-size: var(--fs-11);
}
.auth-rodape .auth-selos:not(:empty) {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: .75rem;
    /* capsula clara: inverter a cor achatava logo colorido em bloco branco */
    background: rgba(255, 255, 255, .92);
    border-radius: 999px;
    padding: .5rem 1.25rem;
}
.auth-rodape .auth-selos:empty { display: none; }
.auth-rodape p { margin: 0; }

/* -------------------------------------------------------- selecao de loja */
.loja-cabecalho {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.1rem clamp(1rem, 3vw, 2.5rem);
    background: rgba(255, 255, 255, .07);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.loja-cabecalho img { height: 34px; width: auto; }
.loja-usuario {
    text-align: right;
    color: #fff;
    font-size: var(--fs-12);
    line-height: 1.35;
}
.loja-usuario strong { display: block; font-weight: 800; }
.loja-usuario span { color: rgba(255, 255, 255, .7); }

.loja-grade {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: .85rem;
    margin-top: 1.25rem;
}

.loja-item {
    text-align: left;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: .9rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .08s;
}
.loja-item:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 10px 20px -8px rgba(0, 77, 142, .35);
}
.loja-item:active { transform: scale(.995); }
.loja-item__num {
    display: inline-block;
    font-size: var(--fs-11);
    font-weight: 900;
    color: var(--brand-blue);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: .4rem;
    padding: .15rem .5rem;
    margin-bottom: .45rem;
}
.loja-item__razao {
    display: block;
    font-size: var(--fs-13);
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
}
.loja-item__cnpj {
    display: block;
    font-size: var(--fs-11);
    color: #64748b;
    margin-top: .3rem;
}

.loja-vazio {
    background: #fff;
    border-radius: .9rem;
    padding: 2rem;
    text-align: center;
    color: #475569;
    font-size: var(--fs-13);
    line-height: 1.6;
}

/* ------------------------------------------------------- barra de teste */
/* So aparece no modo simulado. Some sozinha quando o backend assume. */
.barra-teste {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 70;
    background: #1e293b;
    color: #e2e8f0;
    font-size: var(--fs-11);
    padding: .5rem clamp(.75rem, 2vw, 1.5rem);
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    border-top: 2px solid var(--brand-yellow);
}
.barra-teste strong { color: var(--brand-yellow); text-transform: uppercase; letter-spacing: .05em; }
.barra-teste select {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #334155;
    border-radius: .4rem;
    padding: .25rem .5rem;
    font-size: var(--fs-11);
}
.barra-teste button {
    background: #334155;
    color: #e2e8f0;
    border: 0;
    border-radius: .4rem;
    padding: .3rem .7rem;
    font-size: var(--fs-11);
    font-weight: 700;
    cursor: pointer;
}
.barra-teste button:hover { background: #475569; }

@media print {
    .barra-teste { display: none !important; }
}

/* A barra de teste e fixa: reserva espaco para ela nao cobrir o rodape. */
body.com-barra-teste {
    /* border-box para o min-height:100vh ja considerar o espaco reservado,
       senao a pagina cresce e o rodape fica debaixo da barra. */
    box-sizing: border-box;
    padding-bottom: 3.25rem;
}

/* As barras Aplicar sao sticky no rodape: sobem para nao ficar atras
   da barra de teste. Em producao a barra nao existe e isso nao se aplica. */
body.com-barra-teste #barraAplicar,
body.com-barra-teste #barraAplicarMensal { bottom: 3.5rem; }
