/* ===== Compras (Agente Operações) ===== */
.cp-vistas { padding: 4px; }
.cp-vistas .aba { display: inline-flex; align-items: center; gap: 6px; }
.cp-vistas .aba .ic { width: 16px; height: 16px; }
.cp-filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 16px; }
.cp-filtros .busca { max-width: 360px; }
.cp-filtros select { width: auto; min-width: 170px; border-radius: 999px; padding: 9px 14px; }
.cp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-chips .chip b { font-size: 11.5px; opacity: .75; margin-left: 2px; }
.cp-chip-alerta:not(.ativo) { color: #be123c; border-color: #fecdd6; background: #fff0f3; }
.cp-rec { margin: 0 0 0 auto; font-size: 13.5px; font-weight: 600; color: var(--texto-2); }

/* ---- Quadro (Kanban) ---- */
.cp-quadro { display: grid; grid-template-columns: repeat(var(--cols), minmax(205px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.cp-col { border-radius: 20px; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.45); backdrop-filter: blur(16px); padding: 10px; min-height: 220px; }
.cp-col header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 4px 10px; border-bottom: 3px solid var(--cor); margin-bottom: 10px; }
.cp-col header i { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cor) 25%, transparent); }
.cp-col header b { font-size: 15px; color: #fff; text-shadow: 0 1px 8px rgba(0,40,60,.3); }
.cp-col header small { width: 100%; font-size: 11.5px; color: rgba(240,252,253,.85); }
.cp-n { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: #fff; color: var(--texto); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.cp-tot { margin-left: auto; font-size: 12px; font-weight: 750; color: #fff; background: rgba(0,0,0,.18); padding: 2px 8px; border-radius: 999px; }
.cp-col-corpo { display: flex; flex-direction: column; gap: 10px; }
.cp-vazio { text-align: center; padding: 26px 8px; border: 1.5px dashed rgba(255,255,255,.55); border-radius: 16px; color: rgba(240,252,253,.85); font-size: 13px; }

/* ---- Cartão do pedido ---- */
.cp-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--vidro-card); cursor: pointer; position: relative;
  transition: transform .18s var(--anim), box-shadow .18s; animation: sobeSuave .35s var(--anim) both; }
.cp-card:focus { outline: none; }
.cp-card:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(6,40,56,.22); }
.cp-card.urgente { box-shadow: inset 4px 0 0 var(--vermelho), var(--sombra-p); background: linear-gradient(90deg, rgba(255,228,230,.85), var(--vidro-card) 45%); }
.cp-card.atrasado { box-shadow: inset 4px 0 0 var(--amarelo), var(--sombra-p); }
.cp-card-topo { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cp-num { font-size: 12px; font-weight: 750; color: var(--texto-3); }
.cp-selo-st { margin-left: auto; }
.cp-col .cp-selo-st { display: none; }
.cp-prev { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 750; padding: 3px 8px; border-radius: 999px; background: #ede9fe; color: #6d28d9; }
.cp-prev .ic { width: 13px; height: 13px; }
.cp-prev.atras { background: #fef3c7; color: #b45309; }
.cp-desc { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.cp-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 12.5px; color: var(--texto-2); }
.cp-meta > * { display: inline-flex; align-items: center; gap: 4px; }
.cp-meta .ic { width: 14px; height: 14px; }
.cp-valor { font-weight: 800; color: #047857; background: #d1fae5; padding: 1px 8px; border-radius: 999px; }
.cp-motivo { font-size: 12.5px; padding: 7px 10px; border-radius: 12px; background: #fff0f3; color: #9f1239; }
.cp-quem { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--texto-3); }
.cp-quem .avatar.p { width: 24px; height: 24px; font-size: 10px; }
.cp-hist { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: 0; background: rgba(12,37,51,.06); color: var(--texto-2); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.cp-hist:hover { background: rgba(20,184,166,.18); color: #0f766e; }
.cp-hist .ic { width: 14px; height: 14px; }
.cp-bts { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid rgba(12,37,51,.07); }
.cp-bts .btn.p { padding: 6px 11px; font-size: 12.5px; gap: 5px; }
.cp-bts .btn .ic { width: 14px; height: 14px; }
.cp-bts .btn.btn-ic { width: 31px; height: 31px; padding: 0; margin-left: auto; flex: none; }
.cp-bts .btn-ic .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.cp-bts.g .btn { flex: 1; }

/* ---- Lista (celular) ---- */
.cp-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }

/* ---- Etapas ---- */
.cp-passos { display: flex; gap: 4px; margin: 4px 0; }
.cp-passos span { flex: 1; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--texto-3); padding-top: 9px; position: relative; }
.cp-passos span::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 4px; background: rgba(12,37,51,.1); }
.cp-passos span.feito::before { background: var(--turquesa); }
.cp-passos span.atual { color: var(--texto); }
.cp-passos span.atual::before { background: linear-gradient(90deg, var(--turquesa), var(--azul)); box-shadow: 0 0 0 3px rgba(20,184,166,.2); }
.cp-passos.recusado span.atual { color: #be123c; }
.cp-passos.recusado span.atual::before { background: var(--vermelho); box-shadow: none; }
.cp-tec { cursor: default; }
.cp-tec > .btn { align-self: flex-start; }
.cp-hist-box:empty { display: none; }
.cp-hist-box { margin-top: 4px; }

/* ---- Gaveta de detalhes ---- */
.cp-gaveta-fundo { position: fixed; inset: 0; z-index: 90; background: rgba(6,35,48,.3); backdrop-filter: blur(4px); animation: aparece .2s; display: flex; justify-content: flex-end; }
.cp-gaveta { width: 460px; max-width: 100%; height: 100%; overflow: auto; padding: 22px; border-radius: 26px 0 0 26px; background: rgba(255,255,255,.93); animation: cpEntra .28s var(--anim); }
@keyframes cpEntra { from { transform: translateX(40px); opacity: 0; } }
.cp-g-desc { font-size: 18px; margin: 12px 0 14px; line-height: 1.3; }
.cp-gaveta .cp-bts { margin-top: 16px; border-top: 0; padding-top: 0; }

@media (max-width: 820px) {
  .cp-filtros { padding: 10px; gap: 8px; }
  .cp-filtros .busca { max-width: none; flex-basis: 100%; }
  .cp-filtros select { flex: 1; min-width: 0; }
  .cp-rec { margin: 0; }
  .cp-lista { grid-template-columns: 1fr; }
  .cp-bts .btn.p { flex: 1; padding: 9px 10px; font-size: 13px; }
  .cp-bts .btn.btn-ic { flex: none; width: 38px; height: 38px; }
  .cp-gaveta { width: 100%; border-radius: 26px 26px 0 0; height: 92%; margin-top: auto; animation: cpSobe .28s var(--anim); }
  @keyframes cpSobe { from { transform: translateY(40px); opacity: 0; } }
  .cp-gaveta-fundo { align-items: flex-end; }
  .g-movel { width: 100%; }
}
