.muted { color: var(--taupe); font-size: 13px; }

.historico-lista { display: flex; flex-direction: column; gap: 8px; }

.hist-row {
  display: grid;
  grid-template-columns: 130px 70px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .12s ease, transform .05s ease;
}
.hist-row:hover { border-color: var(--azul); }
.hist-row:active { transform: translateY(1px); }

.hist-data { font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; color: var(--taupe); }
.hist-modo {
  background: var(--azul-suave); color: var(--azul);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 3px 10px; border-radius: 999px; text-align: center;
}
.hist-modo.completa { background: #fff7ed; color: #b45309; }
.hist-titulo { font-weight: 700; color: var(--navy); font-size: 14px; }
.hist-titulo small { color: var(--taupe); font-weight: 500; font-size: 12px; display: block; margin-top: 2px; }
.hist-contadores {
  display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; font-weight: 700;
}
.hist-contadores .pill {
  padding: 2px 8px; border-radius: 999px;
}
.hist-contadores .pill.ok  { background: var(--lima-suave); color: var(--ok); }
.hist-contadores .pill.no  { background: var(--no-bg); color: var(--no); }
.hist-contadores .pill.inc { background: var(--inc-bg); color: var(--inc); }
.hist-contadores .pill.na  { background: #eef2f7; color: #64748b; }
.hist-acao { font-size: 12px; color: var(--azul); font-weight: 700; }

/* Drawer */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(880px, 95vw);
  background: #fff;
  border-left: 1px solid var(--linha);
  box-shadow: -20px 0 50px rgba(15,23,42,0.18);
  z-index: 100;
  display: flex; flex-direction: column;
  animation: slideIn .18s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--linha);
  background: var(--navy); color: #fff;
}
.drawer-head h2 { margin: 0; font-size: 16px; }
.drawer-head .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.drawer-head .btn-ghost:hover { border-color: #fff; }
.drawer-corpo {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.35);
  z-index: 99;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.detalhe-secao { margin-bottom: 18px; }
.detalhe-secao h3 { margin: 0 0 8px; font-size: 14px; color: var(--navy); text-transform: uppercase; letter-spacing: 0.5px; }
.detalhe-secao .docs-mini {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px;
}
.detalhe-secao .doc-mini {
  background: #eef2f7; color: var(--tinta);
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
}
.detalhe-secao .doc-mini.principal { background: var(--azul-suave); color: var(--azul); font-weight: 700; }
.detalhe-secao .minuta-preview {
  background: #fbfcfe; border: 1px solid var(--linha); border-radius: 10px;
  padding: 12px 14px; font-family: Georgia, serif; font-size: 13px; line-height: 1.5;
  max-height: 220px; overflow-y: auto; white-space: pre-wrap;
}
.detalhe-itens { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; }
.detalhe-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  border-left: 3px solid var(--linha);
  padding: 6px 10px;
  background: #fafbfd;
  border-radius: 6px;
  font-size: 12px;
}
.detalhe-item.ok  { border-left-color: var(--ok); }
.detalhe-item.no  { border-left-color: var(--no); }
.detalhe-item.inc { border-left-color: var(--inc); }
.detalhe-item.na  { border-left-color: #94a3b8; opacity: .7; }
.detalhe-item .id { font-family: "Cascadia Code", Consolas, monospace; color: var(--taupe); font-size: 11px; }
.detalhe-item .st { font-weight: 800; text-transform: uppercase; font-size: 10px; letter-spacing: 0.5px; }
.detalhe-item .st.ok  { color: var(--ok); }
.detalhe-item .st.no  { color: var(--no); }
.detalhe-item .st.inc { color: var(--inc); }
.detalhe-item .st.na  { color: #64748b; }
