/* ══════════════════════════════════════════════════════════════════
   CHECKLISTS POR FORNECEDOR — faixa abaixo do calendário no dashboard
   Cada card é um fornecedor; o card "Compras" é transversal (categoria).
   Os itens são as mesmas ações da agenda, então o que tem data já
   aparece no calendário acima.
   ══════════════════════════════════════════════════════════════════ */
.ckf-secao { margin: 4px 0 22px; }

.ckf-secao-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.ckf-secao-head h3 { font-size: 17px; font-weight: 800; color: var(--text-dark); }
.ckf-secao-sub { font-size: 12px; color: var(--text-gray); margin-top: 3px; }
.ckf-secao-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ckf-secao-actions select {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text-mid); outline: none; max-width: 220px;
}
.ckf-secao-actions select:focus { border-color: var(--accent-dark); }

.ckf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  align-items: start;
}

.ckf-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
/* Compras é transversal a todos os fornecedores — cor própria pra não ser
   confundido com uma frente de serviço. */
.ckf-card.compras { border-color: #fcd34d; background: #fffdf5; }
/* Card da equipe da Teva: verde da marca, distinto das frentes de serviço */
.ckf-card.teva { border-color: var(--accent); }
.ckf-card.teva .ckf-nome { color: #2f6b47; }
.ckf-card.teva .ckf-bar i { background: var(--accent-dark); }

.ckf-head { padding: 11px 13px 10px; border-bottom: 1px solid var(--border); }
/* Resumo (pendentes · próxima data) só aparece no celular, com o card fechado — mobile.css */
.ckf-resumo { display: none; }
.ckf-nome {
  font-size: 13.5px; font-weight: 800; color: var(--text-dark);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ckf-card.compras .ckf-nome { color: #92400e; }
.ckf-sub { font-size: 11px; color: var(--text-gray); margin-top: 2px; font-weight: 600; }
.ckf-bar {
  height: 4px; border-radius: 3px; background: var(--bg-light);
  margin-top: 8px; overflow: hidden;
}
.ckf-bar i { display: block; height: 100%; background: var(--accent-dark); border-radius: 3px; }
.ckf-card.compras .ckf-bar i { background: #f59e0b; }

.ckf-itens { max-height: 300px; overflow-y: auto; }
.ckf-item {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 7px 11px; border-bottom: 1px solid var(--bg-light);
}
.ckf-item:last-child { border-bottom: none; }
.ckf-item:hover { background: #fafbfa; }
.ckf-item.done { opacity: .55; }
.ckf-item.done .ckf-txt { text-decoration: line-through; }
.ckf-box { flex: none; width: 15px; height: 15px; margin-top: 2px; cursor: pointer; accent-color: var(--accent-dark); }
.ckf-prio { flex: none; width: 3px; align-self: stretch; border-radius: 2px; }
.ckf-txt {
  flex: 1; min-width: 0; cursor: pointer;
  font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text-dark);
  word-break: break-word;
}
.ckf-etapa, .ckf-obra {
  display: block; font-size: 9.5px; font-weight: 700; margin-top: 2px;
  color: var(--text-gray); text-transform: uppercase; letter-spacing: .03em;
}
.ckf-obra { color: var(--accent-dark); text-transform: none; letter-spacing: 0; }
.ckf-quem {
  display: block; font-size: 9.5px; font-weight: 700; margin-top: 2px;
  color: #15803d; text-transform: none; letter-spacing: 0;
}
.ckf-sub {
  display: inline-block; font-size: 9.5px; font-weight: 800; margin-top: 3px;
  color: #3730a3; background: #eef2ff; border-radius: 20px; padding: 1px 6px;
}
.ckf-datas {
  flex: none; font-size: 10px; font-weight: 800; color: var(--text-gray);
  background: var(--bg-light); border-radius: 20px; padding: 2px 7px;
  font-variant-numeric: tabular-nums; white-space: nowrap; margin-top: 1px;
}
.ckf-datas.late { background: #fee2e2; color: #b91c1c; }
.ckf-datas.vazio { background: none; color: #cbd5e1; cursor: pointer; font-weight: 600; }
.ckf-datas.vazio:hover { color: var(--accent-dark); text-decoration: underline; }

.ckf-add { display: flex; gap: 5px; padding: 8px 10px; border-top: 1px solid var(--border); background: #fafbfa; flex-wrap: wrap; }
.ckf-add input[type=text] { flex: 1 1 100%; min-width: 0; }
.ckf-add input[type=date] { flex: 1 1 auto; min-width: 0; }
.ckf-add input {
  font-family: inherit; font-size: 12px;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--white); outline: none;
}
.ckf-add input:focus { border-color: var(--accent-dark); }
.ckf-add button {
  flex: none; width: 30px; border: none; border-radius: 6px; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 16px; line-height: 1; font-family: inherit;
}
.ckf-add button:hover { background: var(--primary-mid); }

.ckf-tudo-feito {
  padding: 18px 12px; text-align: center; font-size: 12px; color: var(--text-gray);
}
.ckf-feitas {
  width: 100%; border: none; border-top: 1px solid var(--bg-light); background: none;
  cursor: pointer; font-family: inherit; font-size: 11px; font-weight: 700;
  color: var(--text-gray); padding: 7px 10px; text-align: left;
}
.ckf-feitas:hover { background: #fafbfa; color: var(--accent-dark); }

.ckf-vazio {
  grid-column: 1 / -1; padding: 28px 18px; text-align: center;
  color: var(--text-gray); font-size: 13px; line-height: 1.6;
  background: var(--white); border: 1px dashed var(--border); border-radius: var(--radius);
}

/* ── Sugestões pendentes vindas do QR ─────────────────────────── */
.ckf-sugestoes {
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 12px;
}
.ckf-sug-titulo {
  font-size: 13px; font-weight: 800; color: #92400e;
  display: flex; align-items: center; gap: 6px; margin-bottom: 10px;
}
.ckf-sug-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px; padding: 8px 0; border-top: 1px solid #fde68a; flex-wrap: wrap;
}
.ckf-sug-txt { flex: 1; min-width: 200px; font-size: 12.5px; color: var(--text-dark); line-height: 1.45; }
.ckf-sug-txt strong { font-weight: 800; }
.ckf-sug-quem { display: block; font-size: 11px; color: #92400e; margin-top: 2px; }
.ckf-sug-motivo { display: block; font-size: 11.5px; color: var(--text-gray); margin-top: 3px; font-style: italic; }
.ckf-sug-btns { display: flex; gap: 6px; flex: none; }
.ckf-sug-btns button {
  border: 1px solid var(--border); background: var(--white); cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 6px;
}
.ckf-sug-btns .ok { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.ckf-sug-btns .ok:hover { background: var(--primary); border-color: var(--primary); }
.ckf-sug-btns .no:hover { border-color: #dc2626; color: #dc2626; }

/* ── Modal do QR ──────────────────────────────────────────────── */
.ckf-qr-box {
  width: 220px; height: 220px; margin: 0 auto 14px; padding: 10px;
  border: 2px solid var(--primary); border-radius: 12px; background: #fff;
}
.ckf-qr-box svg { width: 100%; height: 100%; display: block; }
.ckf-qr-txt { font-size: 12.5px; color: var(--text-gray); line-height: 1.5; margin-bottom: 12px; }
.ckf-qr-url input {
  width: 100%; font-family: inherit; font-size: 11.5px; color: var(--text-mid);
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-light); text-align: center;
}
.ckf-qr-btns { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }

.ckf-escolha { display: flex; flex-direction: column; gap: 7px; }
.ckf-escolha button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--white); cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--text-dark); text-align: left;
}
.ckf-escolha button:hover { border-color: var(--accent-dark); background: var(--bg-green); }

@media (max-width: 560px) {
  .ckf-grid { grid-template-columns: 1fr; }
  .ckf-secao-actions { width: 100%; }
  .ckf-secao-actions select { flex: 1; max-width: none; }
}
