/* Entradas — cartão com ações (Imprimir / Etiqueta / Análise / Cancelar) e modais */

.ent-card.is-cancelada .eq-pes-nome,
.ent-card.is-cancelada .eq-prod-grid > span,
.ent-card.is-cancelada .eq-prod-venda {
    color: #94a3b8;
    text-decoration: line-through;
}
.ent-acoes button[disabled] {
    color: #94a3b8;
    text-decoration: none;
    cursor: not-allowed;
}
.ent-acoes .ent-act-cancelar { margin-left: auto; color: #b91c1c; }
.ent-acoes .ent-act-cancelar[disabled] { color: #cbd5e1; }

/* Modal */
.ent-acao-card {
    width: min(760px, 96vw);
    max-height: min(90vh, 900px);
    display: flex;
    flex-direction: column;
}
.ent-acao-card--md { width: min(820px, 96vw); }
.ent-acao-card--lg { width: min(1180px, 97vw); }
.ent-acao-body {
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.ent-acao-modal .eq-cnpj-modal-foot {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.ent-acao-body .num { text-align: right; white-space: nowrap; }
.ent-acao-body table.ent-an-tab,
.ent-acao-body table.ent-etq-tab {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.ent-an-tab th,
.ent-etq-tab th {
    padding: 6px 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    text-transform: uppercase;
    border-bottom: 1px solid #e2e8f0;
}
.ent-an-tab td,
.ent-etq-tab td {
    padding: 6px 8px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: top;
}
.ent-acao-body td small {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 500;
}

/* Etiquetas */
.ent-etq-barra {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}
.ent-etq-barra label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.82rem;
}
.ent-etq-barra select { min-width: 250px; }
.ent-etq-barra .btn-acao { padding: 6px 10px; font-size: 0.78rem; }
.ent-etq-total { margin-left: auto; font-weight: 700; color: #0f172a; }
.ent-etq-tab input[type="number"] { width: 80px; text-align: right; }
.ent-etq-tab tr.ent-sem-preco td { color: #94a3b8; }

/* Análise */
.ent-an-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ent-an-topo strong { display: block; font-size: 1rem; color: #0f172a; }
.ent-an-topo span { font-size: 0.8rem; color: #64748b; }
.ent-an-regime {
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3 !important;
    font-weight: 700;
}
.ent-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
.ent-kpi {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fafc;
    min-width: 0;
}
.ent-kpi span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.02em;
}
.ent-kpi strong { display: block; font-size: 1.12rem; color: #0f172a; margin: 2px 0; white-space: nowrap; }
.ent-kpi small { font-size: 0.72rem; color: #64748b; }
.ent-kpi.is-ok { background: #ecfdf5; border-color: #a7f3d0; }
.ent-kpi.is-ok strong { color: #047857; }
.ent-kpi.is-alerta { background: #fffbeb; border-color: #fde68a; }
.ent-kpi.is-alerta strong { color: #b45309; }
.ent-kpi.is-erro { background: #fef2f2; border-color: #fecaca; }
.ent-kpi.is-erro strong { color: #b91c1c; }
.ent-an-sub {
    margin: 16px 0 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.ent-comp-bar {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}
.ent-comp-bar i { display: block; height: 100%; }
.ent-comp-leg {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 6px;
    font-size: 0.78rem;
    color: #334155;
}
.ent-comp-leg b {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: -1px;
}
.ent-insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ent-insights li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    background: #f1f5f9;
    color: #1e293b;
}
.ent-insights li i { margin-top: 2px; }
.ent-insights li.is-ok { background: #ecfdf5; }
.ent-insights li.is-ok i { color: #059669; }
.ent-insights li.is-alerta { background: #fffbeb; }
.ent-insights li.is-alerta i { color: #d97706; }
.ent-insights li.is-erro { background: #fef2f2; }
.ent-insights li.is-erro i { color: #dc2626; }
.ent-insights li.is-info i { color: #2563eb; }
.ent-an-tab tr.is-erro .ent-mg { color: #b91c1c; font-weight: 800; }
.ent-an-tab tr.is-alerta .ent-mg { color: #b45309; font-weight: 800; }
.ent-an-tab tr.is-ok .ent-mg { color: #047857; font-weight: 800; }
.ent-an-tab tr.is-sem .ent-mg { color: #94a3b8; }
.ent-an-nota { margin-top: 10px; font-size: 0.74rem; color: #64748b; }
.ent-print { overflow: visible; }

@media (max-width: 900px) {
    .ent-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ent-acoes .ent-act-cancelar { margin-left: 0; }
}

.ent-etq-tab .ent-nao-vinc, small.ent-nao-vinc { color: #b45309; font-style: italic; }
