/* =============================================================================================
   Pedidos / justificações (VB6 Pedidos.frm, List_Pedidos.frm, rec_tabs.frm). The validation screen and the
   tables reuse the Empregados / Códigos de justificação frame (list | card with fixed footer); the report
   reuses the Logins frame (filter bar + table under a fixed header).
   ============================================================================================= */
.ped-ano {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.ped-ano .campo-rotulo {
    overflow: visible;
}

.ped-ano .form-select {
    width: auto;
}

.ped-filtros {
    display: flex;
    flex-wrap: wrap;
}

    .ped-filtros a {
        flex: 1 1 auto;
        text-align: center;
    }

.ped-lista-opcao.riscado .emp-lista-nome {
    text-decoration: line-through;
    color: var(--cr-text-2);
}

.ped-numero {
    display: inline-grid;
    place-items: center;
    min-width: 3.4rem;
    height: 2.6rem;
    padding: 0 .5rem;
    border-radius: 8px;
    background: var(--cr-blue-100);
    color: var(--cr-blue-600);
    font-size: 1.15rem;
    font-weight: 700;
}

/* Only this part of the card scrolls: origin and reason side by side, the decision below. */
.ped-corpo {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    align-content: start;
}

.ped-decisao {
    grid-column: 1 / -1;
}

.ped-dados {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .25rem .8rem;
    margin: 0;
}

    .ped-dados dt {
        font-family: var(--cr-font-display);
        font-size: .8rem;
        font-weight: 700;
        text-transform: uppercase;
        color: var(--cr-blue-600);
    }

    .ped-dados dd {
        margin: 0;
    }

.ped-passo {
    display: inline-block;
    min-width: 9.5rem;
    color: var(--cr-text-2);
    font-size: .84rem;
}

.ped-sem {
    color: var(--cr-text-2);
}

.ped-motivo {
    margin: 0 0 .4rem;
    font-weight: 600;
}

.ped-memo td,
.ped-respostas td,
.ped-respostas th {
    padding: .2rem .9rem .2rem 0;
    vertical-align: middle;
}

.ped-respostas {
    width: 100%;
}

    .ped-respostas th {
        width: 10rem;
        font-weight: 600;
        color: var(--cr-text-2);
    }

.ped-acoes {
    text-align: right;
    white-space: nowrap;
}

.ped-decidir {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: .6rem;
    margin-top: .5rem;
}

.ped-memo-decisao {
    margin: .5rem 0 0;
    padding: .4rem .6rem;
    border-radius: 6px;
    background: var(--cr-blue-100);
    font: inherit;
    white-space: pre-wrap;
}

/* ---- Tabelas: the four grids side by side, as the VB6 window ---- */
.ped-tabelas {
    display: grid;
    grid-template-columns: repeat(4, minmax(15rem, 1fr));
    gap: .6rem;
    align-content: start;
}

.ped-tabela {
    width: 100%;
}

    .ped-tabela th {
        font-size: .8rem;
        color: var(--cr-text-2);
        font-weight: 600;
    }

    .ped-tabela td {
        padding: 1px 2px 1px 0;
    }

        .ped-tabela td:first-child {
            width: 6.5rem;
        }

/* ---- Relatório ---- */
.ped-rel-filtros {
    flex-wrap: wrap;
}

.ped-rel-filtros {
    gap: .5rem .9rem;
}

.ped-rel-campo {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin: 0;
    font-size: .84rem;
}

    .ped-rel-campo input {
        width: 5rem;
    }

.ped-rel-ordem {
    width: auto;
}

.ped-rel-grupo td {
    font-weight: 700;
    color: var(--cr-blue-600);
    background: var(--cr-blue-100);
}

.ped-rel-tabela tr.riscado td {
    text-decoration: line-through;
    color: var(--cr-text-2);
}

@media (max-width: 1100px) {
    .ped-corpo,
    .ped-decidir {
        grid-template-columns: minmax(0, 1fr);
    }

    .ped-tabelas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .ped-rel-filtros,
    .pedidos-relatorio .kpis {
        display: none;
    }
}
