/* =====================================================================
   Protótipo do Portal · Histórico, Clientes, Usuários, Auditoria e Conta
   ===================================================================== */

/* Histórico */
.o-historico-tela { display: grid; gap: .8rem; }
.o-banner-copia, .o-banner-senha {
    display: flex; align-items: center; flex-wrap: wrap; gap: .7rem;
    padding: .75rem .9rem; border-radius: var(--p-raio);
    background: var(--p-preto); color: #fff; font-size: .78rem;
}
.o-banner-copia > .p-icone, .o-banner-senha > .p-icone { width: 22px; height: 22px; flex-basis: 22px; color: #ff8a8a; }
.o-banner-copia span, .o-banner-senha span { flex: 1 1 220px; }
.o-banner-copia strong, .o-banner-senha strong { color: #fff; }
.o-banner-senha { background: var(--o-concluido); margin-bottom: .8rem; }
.o-banner-senha code {
    font-size: .95rem; font-weight: 700; letter-spacing: .06em; padding: .1rem .45rem; border-radius: 4px;
    background: rgba(255, 255, 255, .18); user-select: all;
}
.o-banner-senha small { color: rgba(255, 255, 255, .8); }
.o-hist-barra { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .6rem; }
.o-hist-barra .o-filtros { margin: 0; flex: 1 1 320px; }
.o-mes { width: 170px; }
.o-mes select { padding: .4rem .5rem; font-size: .78rem; text-transform: capitalize; }
.o-hist-lista { display: grid; padding: .3rem .9rem .6rem; }
.o-hist-dia {
    padding: .7rem 0 .25rem; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--p-cinza);
    border-bottom: 1px solid var(--p-borda);
}
.o-hist-item { display: flex; align-items: flex-start; gap: .65rem; padding: .55rem 0; border-bottom: 1px solid var(--p-borda); font-size: .78rem; }
.o-hist-item:last-child { border-bottom: 0; }
.o-hist-texto { flex: 1; min-width: 0; display: block; }
.o-hist-texto time { display: inline-block; min-width: 2.8rem; font-size: .7rem; font-weight: 600; color: var(--p-cinza); }
.o-hist-texto strong { color: var(--p-preto); }
.o-hist-texto > span { display: block; color: var(--p-cinza); font-size: .72rem; }
.o-hist-autor { display: grid; justify-items: center; gap: .15rem; flex: 0 0 auto; width: 3.8rem; text-align: center; }
.o-hist-autor b {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--p-vermelho); color: #fff; font-size: .62rem; font-weight: 700;
}
.o-hist-autor.estoque b { background: var(--p-preto); }
.o-hist-autor b .p-icone { width: 13px; height: 13px; flex-basis: 13px; }
.o-hist-autor small { font-size: .6rem; color: var(--p-cinza); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.o-copias { padding: .7rem .9rem; font-size: .78rem; }
.o-copias summary { cursor: pointer; font-weight: 700; color: var(--p-preto); }
.o-copias ul { display: grid; gap: .3rem; margin-top: .6rem; }
.o-copias li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; text-transform: capitalize; }
.o-copias small { text-transform: none; color: var(--o-concluido); font-weight: 600; }

/* Clientes */
.o-mapear { border-color: #f2d59a; margin-bottom: .9rem; }
.o-mapear .p-cartao-cabeca { background: var(--p-ambar-claro); }
.o-mapear h5 { display: flex; align-items: center; gap: .4rem; color: #7a4a00; }
.o-mapear-form { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.o-mapear-form select { padding: .35rem .5rem; border: 1px solid var(--p-borda-forte); border-radius: 6px; font-family: inherit; font-size: .76rem; }
.o-nome-estoque { display: inline-block; margin: .1rem 0; padding: .05rem .45rem; border-radius: 4px; background: var(--p-fundo); font-size: .7rem; font-weight: 600; white-space: nowrap; }
.o-nomes-estoque { border: 1px solid var(--p-borda); border-radius: var(--p-raio); padding: .6rem .8rem .8rem; display: grid; gap: .35rem; }
.o-nomes-estoque legend { font-size: .72rem; font-weight: 600; color: var(--p-preto); padding: 0 .3rem; }
.o-nomes-estoque .travado { color: var(--p-cinza-claro); }
.o-nomes-estoque small { color: var(--p-cinza); font-size: .68rem; }

/* Usuários e avatares */
.o-usuario { display: inline-flex; align-items: center; gap: .45rem; }
.o-avatar {
    width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; object-fit: cover;
    display: inline-grid; place-items: center; background: var(--p-preto); color: #fff; font-size: .66rem; font-weight: 700;
}
.o-novo-usuario { margin-top: 1rem; }
.o-botao-esquerda { justify-self: start; }
.o-detalhes { max-width: 260px; font-size: .7rem; color: var(--p-cinza); font-family: ui-monospace, Consolas, monospace; }

/* Minha conta */
.o-conta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.o-foto { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.o-avatar-grande {
    width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
    background: var(--p-preto); color: #fff; font-size: 2rem; font-weight: 800; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--p-borda);
}
.o-foto-texto { display: grid; gap: .5rem; justify-items: start; font-size: .78rem; }
.o-escolher { position: relative; cursor: pointer; }
.o-recorte { grid-column: 1 / -1; display: grid; gap: .6rem; justify-items: center; padding-top: .6rem; border-top: 1px solid var(--p-borda); }
.o-recorte canvas {
    width: min(256px, 100%); aspect-ratio: 1; border-radius: 50%; cursor: grab; touch-action: none;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--p-vermelho);
}
.o-recorte canvas:active { cursor: grabbing; }
.o-recorte .e-km { width: min(256px, 100%); font-size: .74rem; }
.o-recorte-botoes { display: flex; gap: .4rem; }
.proto .o-conta-texto { font-size: .78rem; color: var(--p-cinza); margin-bottom: .7rem; }
.o-atalhos-celular { display: none; }
.o-atalhos { display: grid; gap: .4rem; }
.o-atalhos .p-btn { justify-content: flex-start; }

@container (max-width: 760px) {
    .o-conta { grid-template-columns: 1fr; }
    .o-atalhos-celular { display: block; }
    .o-mes { width: 100%; }
}
