/* [checklists] estilos das telas deste módulo (agente c). Tudo sai de css/tokens.css; classes com prefixo chk-.
   Telas: lista de modelos, editor (com prévia), preencher (técnico no celular), checklists na OS, foto e assinatura. */

/* ===================== PREENCHER (técnico) ===================== */
.chk-preencher { max-width: var(--largura-leitura); margin: 0 auto; }
.chk-preencher-corpo { display: flex; flex-direction: column; gap: var(--esp-4); }

.chk-topo-progresso {
  display: flex; flex-direction: column; gap: 10px; padding: var(--esp-4) var(--esp-4) 14px;
  background: var(--cor-superficie); border-radius: var(--raio-cartao); box-shadow: var(--sombra-cartao);
}
.chk-topo-linha { display: flex; align-items: baseline; justify-content: space-between; gap: var(--esp-3); flex-wrap: wrap; }
.chk-contagem { display: flex; align-items: baseline; gap: 8px; }
.chk-contagem-num { font-family: var(--fonte-titulo); font-size: var(--texto-g); font-weight: var(--peso-negrito); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chk-contagem-rotulo { color: var(--cor-texto-2); font-size: var(--texto-p); }
.chk-salvo-geral { display: inline-flex; align-items: center; gap: 6px; font-size: var(--texto-p); font-weight: var(--peso-medio); color: var(--cor-texto-2); }
.chk-salvo-geral--ok { color: var(--cor-sucesso-texto); }
.chk-salvo-geral--fila { color: var(--cor-aviso-texto); }
.chk-salvo-geral--erro { color: var(--cor-perigo-texto); }
.chk-faltam:empty { display: none; }
.chk-faltam { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.chk-faltam-titulo { display: flex; align-items: center; gap: 6px; font-size: var(--texto-p); font-weight: var(--peso-semi); color: var(--cor-aviso-texto); }
.chk-faltam-lista { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chk-faltam-item {
  max-width: 100%; padding: 6px 12px; border: 0; border-radius: var(--raio-total); cursor: pointer;
  background: var(--cor-aviso-suave); color: var(--cor-texto); font-size: var(--texto-p); font-weight: var(--peso-medio);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color var(--transicao);
}
.chk-faltam-item:hover { background-image: linear-gradient(var(--cor-hover), var(--cor-hover)); }
.chk-faltam-mais { font-size: var(--texto-p); color: var(--cor-texto-2); }

.chk-secao { display: flex; flex-direction: column; gap: 10px; }
.chk-secao-cabeca { padding: 6px 4px 0; }
.chk-secao-titulo { font-family: var(--fonte-titulo); font-size: 20px; font-weight: var(--peso-semi); letter-spacing: -.018em; }
.chk-secao-ajuda { margin: 2px 0 0; color: var(--cor-texto-2); font-size: var(--texto-p); }
.chk-secao-corpo { background: var(--cor-superficie); border-radius: var(--raio-cartao); box-shadow: var(--sombra-cartao); overflow: hidden; }

.chk-pergunta { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px var(--esp-4); scroll-margin: 96px; transition: background-color var(--transicao-lenta); }
.chk-pergunta + .chk-pergunta { border-top: 1px solid var(--cor-separador); }
.chk-pergunta--ok::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cor-sucesso); }
.chk-pergunta--piscar { animation: chk-piscar 1.6s var(--curva); }
@keyframes chk-piscar { 0%, 60% { background-color: var(--cor-aviso-suave); } 100% { background-color: transparent; } }
.chk-pergunta-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--esp-3); }
.chk-pergunta-titulo { font-size: var(--texto-m); font-weight: var(--peso-semi); line-height: 1.3; letter-spacing: -.012em; overflow-wrap: anywhere; }
.chk-obrigatoria { color: var(--cor-perigo-texto); }
.chk-pergunta-ajuda { margin: -6px 0 0; color: var(--cor-texto-2); font-size: var(--texto-p); line-height: 1.4; }
.chk-pergunta-erro { color: var(--cor-perigo-texto); font-size: var(--texto-p); font-weight: var(--peso-medio); }
.chk-pergunta-erro:empty { display: none; }
.chk-estado { flex: none; display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; font-weight: var(--peso-medio); color: var(--cor-texto-3); white-space: nowrap; }
.chk-estado:empty { display: none; }
.chk-estado--salvo { color: var(--cor-sucesso-texto); }
.chk-estado--fila { color: var(--cor-aviso-texto); }
.chk-estado--erro { color: var(--cor-perigo-texto); }
.chk-rotulo-p { font-size: var(--texto-p); font-weight: var(--peso-medio); color: var(--cor-texto-2); }
.chk-dica { font-size: var(--texto-p); color: var(--cor-texto-3); }
.chk-erro-local { font-size: var(--texto-p); color: var(--cor-perigo-texto); font-weight: var(--peso-medio); }
.chk-erro-local:empty { display: none; }
.chk-entrada--erro, .chk-entrada--erro:focus { border-color: var(--cor-perigo); box-shadow: var(--anel-erro); }
.chk-sem-resposta { color: var(--cor-texto-3); font-size: var(--texto-p); }

/* Sim / Não / Não se aplica: botões grandes lado a lado */
.chk-escolhas { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.chk-escolha {
  min-height: var(--altura-controle-g); padding: 0 10px; border: 1px solid var(--cor-borda-forte); border-radius: var(--raio);
  background: var(--cor-superficie); color: var(--cor-texto); font-size: var(--texto-m); font-weight: var(--peso-semi);
  cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none;
  transition: background-color var(--transicao), border-color var(--transicao), color var(--transicao), transform 120ms var(--curva);
}
.chk-escolha:hover:not(.ativo) { background-image: linear-gradient(var(--cor-hover), var(--cor-hover)); }
.chk-escolha:active { transform: scale(.97); }
.chk-escolha:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-escolha.ativo { border-color: transparent; color: var(--cor-destaque-texto); }
.chk-escolha--sim.ativo { background: var(--cor-sucesso); }
.chk-escolha--nao.ativo { background: var(--cor-perigo); }
.chk-escolha--na.ativo { background: var(--st-cinza-solido); }

/* Lista (uma) e caixas (várias): linhas grandes */
.chk-opcoes { display: flex; flex-direction: column; gap: 8px; }
.chk-opcao {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--altura-controle-g); padding: 10px 14px;
  border: 1px solid var(--cor-borda-forte); border-radius: var(--raio); background: var(--cor-superficie); color: var(--cor-texto);
  font-size: var(--texto); text-align: left; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--transicao), border-color var(--transicao), transform 120ms var(--curva);
}
.chk-opcao:hover:not(.ativo) { background-image: linear-gradient(var(--cor-hover), var(--cor-hover)); }
.chk-opcao:active { transform: scale(.985); }
.chk-opcao:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-opcao-texto { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chk-opcao-marca {
  flex: none; display: grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--cor-borda-forte); border-radius: 50%;
  background: var(--cor-superficie); color: var(--cor-destaque-texto); transition: background-color var(--transicao), border var(--transicao);
}
.chk-opcao--caixa .chk-opcao-marca { border-radius: 7px; }
.chk-opcao-marca .icone { opacity: 0; width: 15px; height: 15px; stroke-width: 3; transition: opacity var(--transicao); }
.chk-opcao.ativo { border-color: var(--cor-destaque); background: var(--cor-destaque-suave); }
.chk-opcao--radio.ativo .chk-opcao-marca { border: 7px solid var(--cor-destaque); }
.chk-opcao--caixa.ativo .chk-opcao-marca { background: var(--cor-destaque); border-color: var(--cor-destaque); }
.chk-opcao--caixa.ativo .chk-opcao-marca .icone { opacity: 1; }
.chk-select { min-height: var(--altura-controle-g); font-size: var(--texto-m); }

/* Nota em estrelas */
.chk-estrelas { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.chk-estrela { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: var(--raio-p); background: none; color: var(--cor-borda-forte); cursor: pointer; touch-action: manipulation; transition: color var(--transicao), transform 120ms var(--curva); }
.chk-estrela:active { transform: scale(.9); }
.chk-estrela:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-estrela.cheia { color: var(--cor-aviso); }
.chk-estrela.cheia .icone { fill: currentColor; }
.chk-estrelas-rotulo { margin-left: 8px; color: var(--cor-texto-2); font-size: var(--texto-p); font-variant-numeric: tabular-nums; }
.chk-estrelas--leitura .chk-estrela { width: auto; height: auto; cursor: default; }

/* Número com unidade, data, texto */
.chk-numero { display: flex; flex-direction: column; gap: 6px; }
.chk-numero-caixa { display: flex; align-items: center; gap: 10px; }
.chk-numero-entrada { max-width: 200px; min-height: var(--altura-controle-g); font-size: var(--texto-m); font-variant-numeric: tabular-nums; }
.chk-numero-unidade { font-size: var(--texto-m); font-weight: var(--peso-semi); color: var(--cor-texto-2); }
.chk-linha-data { display: flex; align-items: center; gap: 8px; }
.chk-data { max-width: 220px; min-height: var(--altura-controle-g); }
.chk-texto-longo { min-height: 96px; resize: vertical; }
.chk-obs { display: flex; flex-direction: column; gap: 6px; }
.chk-obs-abrir { align-self: flex-start; }
.chk-obs-texto { min-height: 64px; }

/* Só leitura */
.chk-leitura { display: flex; flex-direction: column; gap: 8px; }
.chk-resposta-texto { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.chk-resposta-sn { align-self: flex-start; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--raio-total); font-size: var(--texto-p); font-weight: var(--peso-semi); }
.chk-resposta-sn--sim { color: var(--st-verde); background: var(--st-verde-fundo); }
.chk-resposta-sn--nao { color: var(--st-vermelho); background: var(--st-vermelho-fundo); }
.chk-resposta-sn--na { color: var(--st-cinza); background: var(--st-cinza-fundo); }
.chk-obs-leitura { margin: 0; color: var(--cor-texto-2); font-size: var(--texto-p); white-space: pre-wrap; overflow-wrap: anywhere; }
.chk-obs-rotulo { font-weight: var(--peso-semi); }

/* Barra de baixo */
.chk-barra { justify-content: space-between; }
.chk-barra .btn--grande { width: auto; }
.chk-barra-resumo { flex: none; }

/* ===================== FOTOS ===================== */
.chk-fotos { display: flex; flex-direction: column; gap: 8px; }
.chk-fotos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.chk-foto, .chk-foto-add { position: relative; aspect-ratio: 1; border-radius: var(--raio); overflow: hidden; }
.chk-foto { display: block; padding: 0; border: 0; background: var(--cor-superficie-2); cursor: zoom-in; }
.chk-foto img { width: 100%; height: 100%; object-fit: cover; }
.chk-foto:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-foto-legenda {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: var(--texto-pp); font-weight: var(--peso-medio);
  color: var(--cor-destaque-texto); background: linear-gradient(transparent, var(--cor-sobreposicao)); text-align: left;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chk-foto--fila img { opacity: .72; }
.chk-foto-selo { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cor-material); color: var(--cor-aviso-texto); box-shadow: var(--sombra-1); }
.chk-foto-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px;
  border: 1.5px dashed var(--cor-destaque-borda); background: var(--cor-destaque-suave); color: var(--cor-destaque);
  font-size: var(--texto-p); font-weight: var(--peso-semi); text-align: center; line-height: 1.2; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--transicao), transform 120ms var(--curva);
}
.chk-foto-add:hover { background-image: linear-gradient(var(--cor-hover), var(--cor-hover)); }
.chk-foto-add:active { transform: scale(.97); }
.chk-foto-add:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-foto-add--previa { cursor: default; max-width: 120px; }
.chk-selo-fila { display: inline-flex; align-items: center; gap: 6px; font-size: var(--texto-p); font-weight: var(--peso-medio); color: var(--cor-aviso-texto); }
.chk-visor { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chk-visor-img { max-height: 70vh; width: auto; border-radius: var(--raio); }
.chk-visor-legenda { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--cor-texto-2); text-align: center; }
.chk-visor-campo { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 520px; }
.chk-confirma { display: flex; flex-direction: column; gap: 12px; }
.chk-confirma-foto { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: center; }
.chk-confirma-foto img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--raio-p); }

/* ===================== ASSINATURA ===================== */
.chk-assinatura { display: flex; flex-direction: column; gap: 12px; }
.chk-assinatura-nome { display: flex; flex-direction: column; gap: 6px; }
.chk-assinatura-papel, .chk-assinar-papel { position: relative; border: 1px solid var(--cor-borda-forte); border-radius: var(--raio); background: var(--cor-superficie); overflow: hidden; }
.chk-assinatura-canvas { display: block; width: 100%; aspect-ratio: 5 / 2; touch-action: none; cursor: crosshair; }
.chk-assinatura-linha, .chk-assinar-linha { position: absolute; left: 7%; right: 7%; bottom: 24%; border-bottom: 1.5px dashed var(--cor-borda-forte); pointer-events: none; }
.chk-assinatura-dica { position: absolute; left: 0; right: 0; bottom: 8%; text-align: center; color: var(--cor-texto-3); font-size: var(--texto-p); pointer-events: none; }
.chk-assinatura-papel--previa { aspect-ratio: 5 / 2; }
.chk-assinatura-acoes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chk-assinatura-pronta {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px;
  border: 1px solid var(--cor-borda); border-radius: var(--raio); background: var(--cor-superficie);
}
.chk-assinatura-pronta figcaption { color: var(--cor-texto-2); font-size: var(--texto-p); }
/* a assinatura vem como "papel": tinta escura sobre fundo branco (igual ao relatório). Nos dois temas aparece como
   um papel branco de cantos arredondados; no claro, a borda fina separa o papel do cartão. */
.chk-assinatura-img { max-width: 100%; max-height: 150px; border-radius: var(--raio-p); box-shadow: 0 0 0 1px var(--cor-borda); }

/* Tela cheia para assinar (deitada). No celular em pé, a folha gira 90°. */
html.chk-sem-rolagem, html.chk-sem-rolagem body { overflow: hidden; }
.chk-assinar-tela { position: fixed; inset: 0; z-index: var(--z-modal); background: var(--cor-fundo); overflow: hidden; }
.chk-assinar-folha {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.chk-assinar-folha--girada {
  inset: auto; top: 50%; left: 50%; width: 100vh; width: 100dvh; height: 100vw;
  transform: translate(-50%, -50%) rotate(90deg); padding: 12px 16px;
}
.chk-assinar-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chk-assinar-nome { color: var(--cor-texto-2); font-size: var(--texto-p); }
.chk-assinar-area { flex: 1 1 auto; min-height: 0; display: grid; place-items: center; }
.chk-assinar-canvas { display: block; touch-action: none; cursor: crosshair; }
.chk-assinar-botoes { display: flex; align-items: center; gap: 8px; }

/* ===================== CHECKLISTS NA OS (componente da tela da OS) ===================== */
.chk-da-os { display: flex; flex-direction: column; gap: 10px; }
/* o componente fica dentro do cartão "Checklists" da tela da OS: uma linha por checklist, com separador */
.chk-os-lista { display: flex; flex-direction: column; }
.chk-os-cartao { display: flex; flex-direction: column; gap: 12px; padding: 14px 0; }
.chk-os-cartao:first-child { padding-top: 0; }
.chk-os-cartao:last-child { padding-bottom: 0; }
.chk-os-cartao + .chk-os-cartao { border-top: 1px solid var(--cor-separador); }
.chk-os-cabeca { display: flex; align-items: center; gap: 12px; }
.chk-os-icone, .chk-lista-icone, .chk-tipo-icone { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--cor-destaque-suave); color: var(--cor-destaque); }
.chk-os-textos { flex: 1; min-width: 0; }
.chk-os-nome { font-size: var(--texto-m); font-weight: var(--peso-semi); letter-spacing: -.012em; overflow-wrap: anywhere; }
.chk-os-sub { color: var(--cor-texto-2); font-size: var(--texto-p); font-variant-numeric: tabular-nums; }
.chk-os-fila { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; color: var(--cor-aviso-texto); font-weight: var(--peso-medio); }
.chk-os-pe { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chk-os-faltam { margin: -4px 0 0; color: var(--cor-texto-2); font-size: var(--texto-p); }
.chk-os-adicionar { display: flex; padding-top: 4px; }
.chk-os-aviso { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--cor-aviso-texto); font-size: var(--texto-p); }

/* ===================== LISTA DE MODELOS ===================== */
.chk-lista-nome { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chk-lista-icone { width: 36px; height: 36px; border-radius: 10px; }
.chk-lista-desc { max-width: 440px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===================== EDITOR DE MODELO ===================== */
.chk-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--esp-6); align-items: start; }
.chk-editor-principal { min-width: 0; }
.chk-editor-alternar { display: none; }
.chk-ed-dados { margin-bottom: var(--esp-4); }
.chk-ed-form .campo:last-child { margin-bottom: 0; }
.chk-ed-form textarea.entrada { min-height: 64px; }
.chk-editor-principal > .alerta { margin-bottom: var(--esp-4); }
.chk-ed-cabeca-lista { display: flex; align-items: baseline; gap: 10px; margin: var(--esp-5) 0 var(--esp-3); }
.chk-ed-contagem { color: var(--cor-texto-2); font-size: var(--texto-p); }
.chk-editor-principal > .alerta--erro { margin-bottom: var(--esp-3); }
.chk-ed-lista { display: flex; flex-direction: column; gap: 8px; }

.chk-ed-item { position: relative; background: var(--cor-superficie); border: 1px solid transparent; border-radius: var(--raio); box-shadow: var(--sombra-cartao); transition: border-color var(--transicao), box-shadow var(--transicao), opacity var(--transicao); }
.chk-ed-item--aberta { border-color: var(--cor-destaque-borda); box-shadow: var(--sombra-hover); }
.chk-ed-item--erro { border-color: var(--cor-perigo); }
.chk-ed-item--secao { margin-top: 10px; background: transparent; box-shadow: none; border: 1px dashed var(--cor-borda-forte); }
.chk-ed-item--secao.chk-ed-item--aberta { background: var(--cor-superficie); border-style: solid; border-color: var(--cor-destaque-borda); }
.chk-ed-item--secao .chk-ed-titulo { font-family: var(--fonte-titulo); font-size: var(--texto-m); }
.chk-ed-item--arrastando { opacity: .35; }
.chk-ed-item--antes { box-shadow: 0 -3px 0 0 var(--cor-destaque); }
.chk-ed-item--depois { box-shadow: 0 3px 0 0 var(--cor-destaque); }
.chk-ed-linha { display: flex; align-items: center; gap: 2px; padding: 4px 8px 4px 2px; }
.chk-ed-alca { flex: none; display: grid; place-items: center; width: 26px; height: 40px; color: var(--cor-texto-3); cursor: grab; touch-action: none; }
.chk-ed-alca:active { cursor: grabbing; }
.chk-ed-resumo { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 6px; border: 0; border-radius: var(--raio-p); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chk-ed-resumo:hover { background: var(--cor-hover); }
.chk-ed-resumo:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-ed-num { flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--raio-total); background: var(--cor-preenchimento); color: var(--cor-texto-2); font-size: 12px; font-weight: var(--peso-semi); font-variant-numeric: tabular-nums; }
.chk-ed-tipo-icone { flex: none; display: grid; place-items: center; color: var(--cor-destaque); }
.chk-ed-textos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chk-ed-titulo { font-weight: var(--peso-semi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-ed-sub { color: var(--cor-texto-2); font-size: var(--texto-p); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-ed-setas { flex: none; display: flex; gap: 2px; }
.chk-ed-cima .icone { transform: rotate(-90deg); }
.chk-ed-baixo .icone { transform: rotate(90deg); }
.chk-ed-detalhes { padding: 14px var(--esp-4) var(--esp-3); border-top: 1px solid var(--cor-separador); }
.chk-ed-grade { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0 var(--esp-4); }
.chk-ed-opcoes-num { margin-bottom: 0; }
.chk-ed-chaves { display: flex; flex-wrap: wrap; gap: 0 var(--esp-5); padding-top: 4px; border-top: 1px solid var(--cor-separador); margin-top: 4px; }
.chk-ed-chaves .campo { margin-bottom: 4px; }
.chk-ed-acoes { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.chk-ed-erro { display: block; color: var(--cor-perigo-texto); font-size: var(--texto-p); font-weight: var(--peso-medio); margin-bottom: 8px; }
.chk-ed-erro--fechado { padding: 0 var(--esp-4) 10px 64px; margin: 0; }
.chk-ed-adicionar { display: flex; gap: 8px; margin-top: var(--esp-3); }
.chk-ed-barra { justify-content: flex-end; }

.chk-tipos-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.chk-tipo-opcao { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--cor-borda); border-radius: var(--raio); background: var(--cor-superficie); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--transicao), border-color var(--transicao); }
.chk-tipo-opcao:hover { background: var(--cor-hover); border-color: var(--cor-borda-forte); }
.chk-tipo-opcao:focus-visible { outline: none; box-shadow: var(--anel-foco); }
.chk-tipo-textos { display: flex; flex-direction: column; min-width: 0; }
.chk-tipo-textos small { color: var(--cor-texto-2); line-height: 1.3; }

/* Prévia (como o técnico vê): moldura de celular */
.chk-editor-previa { position: sticky; top: var(--esp-4); }
.chk-previa-rotulo { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--cor-texto-2); font-size: var(--texto-p); font-weight: var(--peso-semi); }
.chk-previa-celular {
  max-height: calc(100vh - 140px); overflow-y: auto; padding: 18px 12px 24px; border: 1px solid var(--cor-borda-forte);
  border-radius: 34px; background: var(--cor-fundo); box-shadow: var(--sombra-2);
}
.chk-previa-tela { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.chk-previa-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; min-width: 0; }
.chk-previa-topo > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk-previa-topo > span { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chk-previa-nota { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 0; color: var(--cor-texto-2); font-size: var(--texto-p); }
.chk-previa-tela .chk-pergunta { padding: 14px 12px; gap: 10px; }
.chk-previa-tela .chk-pergunta-titulo { font-size: var(--texto); }
.chk-previa-tela .chk-secao-titulo { font-size: var(--texto-m); }
.chk-previa-tela .chk-escolha, .chk-previa-tela .chk-opcao { min-height: 42px; font-size: 14px; }
.chk-previa-tela .chk-estrela { width: 34px; height: 34px; }
.chk-previa-tela .chk-numero-entrada, .chk-previa-tela .chk-data, .chk-previa-tela .chk-select { min-height: var(--altura-controle); font-size: 14px; }
.chk-obs-abrir--previa { display: inline-flex; align-items: center; gap: 4px; color: var(--cor-destaque); font-size: var(--texto-p); font-weight: var(--peso-semi); }

/* ===================== TELAS MENORES ===================== */
@media (max-width: 1100px) {
  .chk-editor { grid-template-columns: minmax(0, 1fr); }
  .chk-editor-alternar { display: flex; margin-bottom: var(--esp-4); }
  .chk-editor-previa { display: none; position: static; }
  .chk-editor--previa .chk-editor-previa { display: block; }
  .chk-editor--previa .chk-editor-principal { display: none; }
  .chk-previa-celular { max-width: 420px; max-height: none; margin: 0 auto; }
}
@media (max-width: 860px) {
  .chk-pergunta { padding: 16px 14px; }
  .chk-escolha { font-size: var(--texto-m); }
  .chk-opcao { font-size: var(--texto-m); }
  .chk-fotos-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chk-preencher-corpo > .alerta { flex-wrap: wrap; }
  .chk-preencher-corpo > .alerta > .alerta-corpo { flex: 1 1 200px; }
  .chk-preencher-corpo > .alerta > .alerta-acao { flex-basis: 100%; padding-left: 30px; }
  .chk-barra-resumo { display: none; } /* no celular o que falta já aparece no topo; o botão fica inteiro */
  .chk-barra .btn--grande { flex: 1 1 auto; width: 100%; }
  .chk-ed-grade { grid-template-columns: minmax(0, 1fr); }
  .chk-ed-titulo { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
  .chk-tipos-grade { grid-template-columns: minmax(0, 1fr); }
  .chk-ed-erro--fechado { padding-left: var(--esp-4); }
  .chk-lista-desc { max-width: 60vw; }
}
@media (pointer: coarse) { .chk-ed-alca { display: none; } .chk-ed-linha { padding-left: 6px; } }
