/* SitesJÁ Painel — Demandas internas (v1.1.0). Tudo com prefixo dm- para não interferir no resto do painel. */
.dm-nav { position: relative; }
.dm-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.dm-badge.dm-badge-atr { background: #dc2626; }
.dm-badge[hidden] { display: none; }

.dm { max-width: 1100px; }
.dm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.dm-head-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-btn { appearance: none; border: 0; border-radius: 10px; background: #d62839; color: #fff; font: inherit; font-weight: 700; padding: 10px 16px; cursor: pointer; }
.dm-btn:hover { background: #b81f2f; }
.dm-btn:disabled { opacity: .6; cursor: wait; }
.dm-btn-sec { background: #fff; color: #1f2937; border: 1px solid #d1d5db; }
.dm-btn-sec:hover { background: #f3f4f6; }
.dm-btn[hidden] { display: none; }

.dm-aviso { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 14px; }

.dm-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 16px; }
.dm-tabs { display: inline-flex; background: #f3f4f6; border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.dm-tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font: inherit; font-weight: 600; color: #4b5563; cursor: pointer; }
.dm-tabs button.on { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dm-filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-filtros select, .dm-filtros input { font: inherit; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; min-width: 180px; }
.dm-filtros select[hidden] { display: none; }

.dm-lista { display: flex; flex-direction: column; gap: 18px; }
.dm-vazio { color: #6b7280; padding: 28px 8px; text-align: center; }
.dm-grupo h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin: 0 0 8px; }
.dm-grupo h2 small { background: #e5e7eb; color: #374151; border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }
.dm-g-atr h2 { color: #b91c1c; }
.dm-g-atr h2 small { background: #fee2e2; color: #b91c1c; }

.dm-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.dm-item:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(15,23,42,.06); }
.dm-g-atr .dm-item { border-left: 4px solid #dc2626; }
.dm-feito .dm-titulo { text-decoration: line-through; color: #6b7280; }
.dm-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #cbd5e1; background: #fff; color: transparent; font-weight: 900; cursor: pointer; line-height: 1; padding: 0; }
.dm-check:hover { border-color: #16a34a; color: #16a34a; }
.dm-check.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.dm-corpo { cursor: pointer; min-width: 0; }
.dm-corpo:focus { outline: 2px solid #93c5fd; outline-offset: 4px; border-radius: 6px; }
.dm-titulo { font-weight: 700; color: #111827; overflow-wrap: anywhere; }
.dm-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: #6b7280; margin-top: 4px; }
.dm-tag { background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 0 6px; }
.dm-prio { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; border-radius: 6px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
.dm-prio-URGENTE { background: #dc2626; color: #fff; }
.dm-prio-ALTA { background: #fee2e2; color: #b91c1c; }
.dm-prio-BAIXA { background: #f3f4f6; color: #6b7280; }
.dm-lado { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dm-prazo { font-size: 13px; font-weight: 700; color: #374151; background: #f3f4f6; border-radius: 8px; padding: 4px 8px; white-space: nowrap; }
.dm-prazo.hoje { background: #fef3c7; color: #92400e; }
.dm-prazo.atr { background: #fee2e2; color: #b91c1c; }
.dm-sit { font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 8px; border: 1px solid #d1d5db; background: #fff; }
.dm-sit-FAZENDO { border-color: #93c5fd; background: #eff6ff; }
.dm-sit-AGUARDANDO { border-color: #fcd34d; background: #fffbeb; }
.dm-sit-FEITO { border-color: #86efac; background: #f0fdf4; }

@media (max-width: 700px) {
  .dm-item { grid-template-columns: auto 1fr; }
  .dm-lado { grid-column: 1 / -1; justify-content: flex-start; padding-left: 40px; }
}

/* janelas */
.dm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; z-index: 1000; overflow-y: auto; }
.dm-dialog { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.dm-dialog.dm-largo { max-width: 860px; }
.dm-dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.dm-dlg-head h2 { margin: 0; font-size: 18px; }
.dm-x { border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: #6b7280; }
.dm-dlg-body { padding: 18px 20px 20px; }
.dm-dlg-body h3 { font-size: 15px; margin: 18px 0 6px; }
.dm-dlg-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dm-dlg-acoes.dm-esq { justify-content: flex-start; }
.dm-form { display: flex; flex-direction: column; gap: 12px; }
.dm-campo { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.dm-campo > span { font-weight: 700; font-size: 14px; color: #374151; }
.dm-campo small { font-weight: 400; color: #6b7280; }
.dm-campo input, .dm-campo select, .dm-campo textarea, .dm-coment textarea, .dm-tabela input, .dm-tabela select { font: inherit; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.dm-campo textarea { resize: vertical; }
.dm-linha { display: flex; gap: 12px; flex-wrap: wrap; }
.dm-prazo-campos { display: flex; gap: 8px; }
.dm-prazo-campos input { flex: 1; }
.dm-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dm-chips button { border: 1px solid #d1d5db; background: #fff; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.dm-chips button:hover { background: #f3f4f6; }
.dm-conv-busca { margin-bottom: 6px; }
.dm-dica { color: #6b7280; font-size: 13px; }
.dm-erro { color: #b91c1c; font-weight: 600; min-height: 1em; }

.dm-det-topo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.dm-det-topo small { color: #6b7280; }
.dm-sits { display: flex; flex-wrap: wrap; gap: 6px; }
.dm-sitbtn { border: 1px solid #d1d5db; background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dm-sitbtn.on { background: #111827; color: #fff; border-color: #111827; }
.dm-sitbtn.dm-sit-FEITO.on { background: #16a34a; border-color: #16a34a; }
.dm-sitbtn.dm-sit-CANCELADA.on { background: #6b7280; border-color: #6b7280; }

.dm-hist { border-top: 1px solid #e5e7eb; margin-top: 18px; padding-top: 4px; }
.dm-hist ul { list-style: none; margin: 0 0 10px; padding: 0; max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.dm-hist li p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-hist li time { color: #9ca3af; font-size: 12px; }
.dm-com { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 12px; }
.dm-sis { color: #6b7280; font-size: 13px; padding: 0 12px; }
.dm-sis p { margin: 0; }
.dm-coment { display: flex; gap: 8px; align-items: flex-end; }
.dm-coment textarea { flex: 1; resize: vertical; }

.dm-tabela-wrap { overflow-x: auto; }
.dm-tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.dm-tabela th { text-align: left; color: #6b7280; font-weight: 600; padding: 6px; border-bottom: 1px solid #e5e7eb; }
.dm-tabela td { padding: 6px; border-bottom: 1px solid #f3f4f6; }
.dm-tabela .dm-c { text-align: center; }
.dm-tabela input[type=checkbox] { width: auto; }
.dm-status { font-weight: 700; }
.dm-erros { color: #b91c1c; font-size: 13px; }
.dm-chave { background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px; padding: 10px 14px; margin-top: 10px; }
.dm-chave[hidden] { display: none; }
.dm-chave-linha { display: flex; gap: 8px; }
.dm-chave-linha input { flex: 1; font-family: monospace; font-size: 13px; padding: 8px; border: 1px solid #d1d5db; border-radius: 8px; }
.dm-nav.active .dm-badge { background: #fff; color: #d62839; }
.dm-vinculo { font-size: 13px; color: #6b7280; }
.dm-vinculo.ok { color: #15803d; font-weight: 600; }
.dm-vinculo.sem { color: #b45309; }
