:root {
  --verde: #0f766e;
  --verde-escuro: #115e59;
  --verde-claro: #ccfbf1;
  --amarelo: #fbbf24;
  --amarelo-claro: #fef3c7;
  --vermelho: #b91c1c;
  --vermelho-claro: #fee2e2;
  --texto: #0f172a;
  --suave: #475569;
  --linha: #e2e8f0;
  --fundo: #f1f5f4;
  --branco: #ffffff;
  --raio: 12px;
  --sombra: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--texto); background: var(--fundo); font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }
a { color: var(--verde); }

/* ---------- Topo ---------- */
.topo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--branco); border-bottom: 1px solid var(--linha); }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; }
.marca strong { display: block; font-size: 1rem; }
.marca small { display: block; color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--verde); color: var(--amarelo); font-weight: 800; font-size: .9rem; flex: none; }
.marca.grande { justify-content: center; margin-bottom: 20px; font-size: 1.2rem; }
.abas { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.aba { border: 0; background: none; padding: 8px 12px; border-radius: 8px; color: var(--suave); font-weight: 600; white-space: nowrap; }
.aba:hover { background: var(--fundo); }
.aba.ativa { background: var(--verde-claro); color: var(--verde-escuro); }
.cadeado { font-size: .8em; }
.topo-dir { display: flex; align-items: center; gap: 10px; }
.plano { padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--fundo); color: var(--suave); }
.plano-completo { background: var(--amarelo-claro); color: #92400e; }
.plano-pro { background: #ede9fe; color: #5b21b6; }
.status, .email { color: var(--suave); font-size: .8rem; }
.btn-icone { border: 0; background: none; width: 36px; height: 36px; border-radius: 8px; font-size: 1.2rem; line-height: 1; flex: none; }
.btn-icone:hover { background: var(--fundo); }
.faixa-teste { background: var(--amarelo-claro); color: #78350f; text-align: center; padding: 6px 16px; font-size: .85rem; }

/* ---------- Layout em duas colunas ---------- */
.grade { display: grid; grid-template-columns: minmax(360px, 430px) 1fr; gap: 20px; padding: 20px; max-width: 1600px; margin: 0 auto; align-items: start; }
.assistente, .folha-col > div { background: var(--branco); border-radius: var(--raio); box-shadow: var(--sombra); }
.assistente { position: sticky; top: 76px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; }
.passo-corpo { padding: 4px 20px 20px; overflow-y: auto; }
.folha-col > div { padding: 20px; min-width: 0; }
.passos { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; padding: 12px; border-bottom: 1px solid var(--linha); }
.passos button { width: 100%; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; color: var(--suave); padding: 4px; border-radius: 8px; }
.passos button span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fundo); font-weight: 700; }
.passos .atual { color: var(--verde-escuro); }
.passos .atual span { background: var(--verde); color: #fff; }
.passos .feito span { background: var(--verde-claro); color: var(--verde-escuro); }
.passo-nav { display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--linha); }
.ajuda { color: var(--suave); font-size: .88rem; }
.muted { color: var(--suave); font-size: .85rem; }

/* ---------- Formulário ---------- */
.campo { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; min-width: 0; }
.campo span { font-size: .82rem; font-weight: 600; color: var(--suave); }
.campo input, .campo select, .especial input, .especial select, .equipe input:not([type]) { width: 100%; border: 1px solid #cbd5e1; border-radius: 8px; padding: 9px 10px; background: #fff; min-height: 42px; }
.campo input:focus, .campo select:focus, .equipe input:focus { outline: 2px solid var(--verde); outline-offset: 0; border-color: var(--verde); }
.campo.curto { max-width: 150px; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tres { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mais { margin-top: 10px; border-top: 1px solid var(--linha); padding-top: 10px; }
.mais summary { cursor: pointer; font-weight: 600; color: var(--verde-escuro); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; font-size: .9rem; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--verde); }
.btn { border: 1px solid #cbd5e1; background: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; min-height: 42px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: var(--verde); }
.btn.primario { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.primario:hover { background: var(--verde-escuro); }
.btn.leve { border-style: dashed; color: var(--verde-escuro); margin: 6px 0; }
.btn.perigo, .perigo { color: var(--vermelho); }
.btn.largo { width: 100%; }
.link { border: 0; background: none; color: var(--verde); text-decoration: underline; padding: 0; }

.modelos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modelo { text-align: left; border: 1.5px solid var(--linha); background: #fff; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.modelo strong { font-size: .88rem; }
.modelo small { color: var(--suave); font-size: .76rem; line-height: 1.3; }
.modelo em { font-style: normal; font-size: .72rem; font-weight: 700; color: #92400e; }
.modelo.sel { border-color: var(--verde); background: #f0fdfa; box-shadow: 0 0 0 1px var(--verde); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1.5px solid #cbd5e1; background: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 600; min-width: 52px; }
.chip.on { background: var(--verde); border-color: var(--verde); color: #fff; }
.selo { display: inline-block; margin: 6px 0 10px; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: .85rem; }
.selo.ok { background: var(--verde-claro); color: var(--verde-escuro); }
.selo.ruim { background: var(--vermelho-claro); color: var(--vermelho); }
.especial { display: flex; align-items: center; gap: 6px; margin: 6px 0; }
.especial select { flex: 1.3; }
.especial input { flex: 1; }

.linha-acoes { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.equipe { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.equipe li { display: flex; align-items: center; gap: 8px; }
.equipe .num { width: 22px; text-align: right; color: var(--suave); font-size: .85rem; flex: none; }
.equipe input:not([type]) { flex: 1; }
.mini { display: flex; align-items: center; gap: 3px; font-size: .75rem; color: var(--suave); white-space: nowrap; }

/* ---------- Alertas ---------- */
.alerta { border-left: 4px solid; border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: #f8fafc; }
.alerta strong { display: block; }
.alerta p { margin: 4px 0; font-size: .88rem; }
.alerta small { color: var(--suave); font-size: .75rem; }
.alerta .quem { font-size: .85rem; font-weight: 600; color: var(--suave); }
.alerta.grave { border-color: var(--vermelho); background: var(--vermelho-claro); }
.alerta.atencao { border-color: #d97706; background: var(--amarelo-claro); }
.alerta.info { border-color: #64748b; }
.alerta.ok { border-color: var(--verde); background: var(--verde-claro); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; }
.pill.grave { background: var(--vermelho-claro); color: var(--vermelho); }
.pill.atencao { background: var(--amarelo-claro); color: #92400e; }
.cobertura { border-collapse: collapse; width: 100%; font-size: .85rem; }
.cobertura th, .cobertura td { border: 1px solid var(--linha); padding: 5px; text-align: center; }
.cobertura .baixo { background: var(--vermelho-claro); color: var(--vermelho); font-weight: 700; }
.cobertura .fechado { color: #94a3b8; font-size: .72rem; }

/* ---------- Folha ---------- */
.barra-folha { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.semanas, .vistas { display: flex; gap: 4px; background: var(--fundo); padding: 3px; border-radius: 10px; }
.semanas:empty { display: none; }
.semanas button, .vistas button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; color: var(--suave); }
.semanas .ativa, .vistas .ativa { background: #fff; color: var(--verde-escuro); box-shadow: var(--sombra); }
.conferir { width: 100%; text-align: left; border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.conferir.grave { background: var(--vermelho-claro); color: var(--vermelho); }
.conferir.atencao { background: var(--amarelo-claro); color: #92400e; }
.conferir.ok { background: var(--verde-claro); color: var(--verde-escuro); }
.dica { font-size: .85rem; color: var(--suave); margin: 10px 0; }
.aviso-pendente { background: var(--amarelo-claro); border: 1px solid #fcd34d; border-radius: 10px; padding: 12px; margin-bottom: 12px; font-weight: 600; }
.aviso-pendente div { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

.folha-topo { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--texto); padding-bottom: 8px; margin-bottom: 10px; }
.folha-topo h1 { font-size: 1.35rem; margin: 0; }
.folha-topo p { margin: 2px 0; font-size: .85rem; color: var(--suave); }
.folha-info p { color: var(--texto); }
.rolagem { overflow-x: auto; }
.escala { width: 100%; border-collapse: collapse; font-size: .85rem; }
.escala th, .escala td { border: 1px solid #cbd5e1; padding: 0; text-align: center; height: 44px; }
.escala th { background: #f8fafc; font-weight: 700; padding: 4px; }
.escala th small { display: block; font-weight: 500; color: var(--suave); font-size: .72rem; }
.escala .n { width: 32px; color: var(--suave); }
.escala .nome { text-align: left; padding: 4px 8px; min-width: 130px; font-weight: 600; white-space: nowrap; }
.escala .vazio { color: #94a3b8; font-weight: 400; }
.escala .horas { font-weight: 700; padding: 0 6px; white-space: nowrap; }
.escala .rubrica { width: 70px; }
.ruim { color: var(--vermelho) !important; }
.escala tfoot td { background: #f8fafc; font-weight: 700; height: 34px; }
.escala tfoot .baixo { background: var(--vermelho-claro); color: var(--vermelho); }

.cel { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: relative; min-width: 66px; }
.cel[data-p] { cursor: grab; transition: background .15s; }
.cel[data-p]:hover { background: #f0fdfa; }
.cel span { font-weight: 600; font-size: .8rem; white-space: nowrap; }
.cel i { font-style: normal; font-size: .62rem; font-weight: 800; color: #fff; background: var(--cor); border-radius: 4px; padding: 0 4px; margin-right: 3px; vertical-align: 1px; }
.cel.turno { box-shadow: inset 3px 0 0 var(--cor); }
.cel.outro { box-shadow: inset 3px 0 0 #475569; background: #f8fafc; }
.cel.folga { background: repeating-linear-gradient(135deg, #fef3c7 0 6px, #fde68a 6px 12px); }
.cel.folga span { font-weight: 800; letter-spacing: .04em; color: #78350f; }
.cel.branco span { color: #94a3b8; }
.cel.arrastando { opacity: .4; }
.cel.alvo { outline: 3px dashed var(--verde); outline-offset: -3px; background: var(--verde-claro) !important; }
.modo-arraste, .modo-arraste * { cursor: grabbing !important; }
.fantasma { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; background: var(--amarelo); color: #78350f; font-weight: 800; padding: 6px 10px; border-radius: 8px; box-shadow: var(--sombra); font-size: .8rem; }

.legenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .8rem; color: var(--suave); }
.legenda i { font-style: normal; font-weight: 800; color: #fff; background: var(--cor); border-radius: 4px; padding: 0 5px; }
.leg-folga { background: #fde68a; color: #78350f; padding: 0 5px; border-radius: 4px; }
.folha-rodape { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 18px; font-size: .85rem; }

.cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.cartao { border: 1px solid var(--linha); border-radius: 10px; padding: 10px; }
.cartao header { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.dias-cartao { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dias-cartao .cel { min-width: 0; border-radius: 8px; border: 1px solid var(--linha); padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dias-cartao .cel b { font-size: .7rem; color: var(--suave); }
.dias-cartao .cel span { font-size: .66rem; white-space: normal; text-align: center; line-height: 1.15; }
.dias-cartao .cel.turno { box-shadow: inset 0 3px 0 var(--cor); }

.flutuante { display: none; }

/* ---------- Recursos pagos ---------- */
.recurso { max-width: 900px; margin: 24px auto; padding: 24px; background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); }
.recurso.bloqueado { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; }
.recurso li { margin: 6px 0; }
.previa { position: relative; }
.papel { background: #fff; border: 1px solid var(--linha); border-radius: 8px; padding: 20px; filter: blur(2px); box-shadow: var(--sombra); }
.papel p { height: 10px; background: #e2e8f0; border-radius: 4px; margin: 10px 0; }
.papel p:nth-child(3n) { width: 70%; }
.marca-dagua { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 2rem; color: rgba(15, 118, 110, .35); transform: rotate(-18deg); letter-spacing: .1em; }
.preco { font-size: 1.6rem; font-weight: 800; color: var(--verde-escuro); margin: 12px 0; }
.preco small { display: block; font-size: .8rem; font-weight: 500; color: var(--suave); }

/* ---------- Documentos ---------- */
.docs { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; gap: 20px; padding: 20px; max-width: 1500px; margin: 0 auto; align-items: start; }
.docs-lado { background: #fff; border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px; position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.docs-lado .btn.largo { margin-top: 8px; }
.docs-tipos { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.docs-tipos button { text-align: left; border: 1.5px solid var(--linha); background: #fff; border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.docs-tipos button small { color: var(--suave); font-size: .76rem; }
.docs-tipos button.sel { border-color: var(--verde); background: #f0fdfa; box-shadow: 0 0 0 1px var(--verde); }
.docs-pessoas { display: flex; flex-direction: column; gap: 8px; }
.docs-pessoas fieldset { border: 1px solid var(--linha); border-radius: 10px; padding: 6px 10px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.docs-pessoas legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.docs-pessoas input { border: 1px solid #cbd5e1; border-radius: 8px; padding: 7px 9px; min-width: 0; }
.docs-pessoas input:first-of-type { grid-column: span 2; }
.progresso { height: 10px; background: var(--fundo); border-radius: 99px; overflow: hidden; }
.progresso div { height: 100%; background: var(--verde); transition: width .3s; }
.docs-previa { min-width: 0; }
.papel-a4 { background: #fff; box-shadow: var(--sombra); border-radius: 4px; padding: 14mm 14mm; max-width: 210mm; margin: 0 auto; }

/* Conteúdo dos documentos (tela e papel) */
.doc { font-size: 9.5pt; line-height: 1.36; color: #000; }
.doc h1 { font-size: 12.5pt; text-align: center; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 7px; }
.doc h3 { font-size: 10.5pt; margin: 12px 0 4px; }
.doc p { margin: 4px 0; text-align: justify; }
.doc table { border-collapse: collapse; width: 100%; margin: 4px 0; }
.doc th, .doc td { border: 1px solid #555; padding: 2px 5px; text-align: left; vertical-align: top; }
.doc .dados th { width: 26mm; background: #f1f5f9; font-weight: 700; white-space: nowrap; }
.doc .horarios th { background: #f1f5f9; }
.linha-branca { display: inline-block; border-bottom: 1px solid #000; height: 1em; vertical-align: bottom; }
.doc .local { text-align: right; margin-top: 10px; }
.assinaturas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin-top: 20px; text-align: center; font-size: 9pt; }
.assinaturas.duas { margin-top: 18px; }
.assinaturas.tres { grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 18px; font-size: 8pt; }
.assinaturas span { display: block; border-top: 1px solid #000; margin-bottom: 3px; height: 0; }
.assinaturas small { display: block; color: #333; }
.aviso-doc { font-size: 7.5pt; color: #555; text-align: center !important; margin-top: 12px !important; }
.doc.ponto h1 { margin-bottom: 6px; }
.tabela-ponto { font-size: 8.5pt; }
.tabela-ponto th { background: #f1f5f9; text-align: center !important; font-size: 7.5pt; padding: 2px 3px !important; }
.tabela-ponto td { height: 6.6mm; padding: 0 4px !important; text-align: center !important; vertical-align: middle !important; }
.tabela-ponto td:first-child { width: 8mm; font-weight: 700; }
.tabela-ponto td:nth-child(2) { width: 9mm; }
.tabela-ponto td.prev { width: 24mm; font-size: 7.5pt; color: #333; }
.tabela-ponto tr.folga td { background: #eee; }
.tabela-ponto tr.folga td.prev { font-weight: 800; color: #000; }
.tabela-ponto td.riscado { background: repeating-linear-gradient(135deg, #eee 0 2mm, #ddd 2mm 4mm) !important; }
.doc .obs { margin-top: 8px; font-size: 9pt; }
.ficha { border: 1.5px dashed #777; border-radius: 6px; padding: 8px 12px; margin-bottom: 8mm; font-size: 10pt; color: #000; height: 80mm; display: flex; flex-direction: column; }
.ficha h2 { font-size: 12pt; margin: 0 0 6px; display: flex; justify-content: space-between; gap: 10px; }
.ficha h2 small { font-size: 9pt; font-weight: 600; color: #333; }
.ficha p { margin: 5px 0; line-height: 1.7; }
.ficha .assinaturas { margin-top: auto; }
.mini-aviso { font-size: 8pt; color: #444; }
.checklist ul { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px solid #e2e8f0; }
.checklist li input { width: 18px; height: 18px; accent-color: var(--verde); margin-top: 1px; flex: none; }
.caixa-check { display: inline-grid; place-items: center; width: 4.5mm; height: 4.5mm; border: 1px solid #000; flex: none; font-weight: 800; }

/* ---------- Janelas ---------- */
.modal-fundo { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .45); display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal.largo { max-width: 680px; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.opcoes { display: flex; flex-direction: column; gap: 6px; }
.opcao { text-align: left; border: 1.5px solid var(--linha); background: #fff; border-radius: 10px; padding: 10px 12px; font-weight: 600; }
.opcao i { font-style: normal; color: #fff; background: var(--cor); border-radius: 4px; padding: 0 5px; margin-right: 6px; font-size: .75rem; }
.opcao.sel { border-color: var(--verde); background: #f0fdfa; }
.opcao.folga { background: #fffbeb; }
.outro { border: 1px solid var(--linha); border-radius: 10px; margin: 12px 0 0; padding: 8px 12px 12px; }
.outro legend { font-weight: 700; font-size: .85rem; padding: 0 4px; }
.menu-lista { display: flex; flex-direction: column; gap: 2px; }
.menu-lista > button, .menu-lista > a, .btn-arquivo { text-align: left; border: 0; background: none; padding: 11px 10px; border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--texto); cursor: pointer; }
.menu-lista > button:hover, .menu-lista > a:hover, .btn-arquivo:hover { background: var(--fundo); }
.tres-passos li { margin: 8px 0; }
.texto-legal { font-size: .92rem; }
.texto-legal li { margin: 4px 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 60; background: var(--texto); color: #fff; padding: 10px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; transition: transform .25s; max-width: calc(100vw - 32px); }
.toast.visivel { transform: translate(-50%, 0); }
.toast button { border: 0; background: none; color: var(--amarelo); font-weight: 700; }

.tela-simples { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.caixa { background: #fff; border-radius: 16px; box-shadow: var(--sombra); padding: 28px; width: 100%; max-width: 420px; }
.caixa h1 { font-size: 1.3rem; }

.rodape { text-align: center; color: var(--suave); font-size: .78rem; padding: 8px 16px 90px; }
#impressao { display: none; }

/* ---------- Telas menores ---------- */
@media (max-width: 1100px) {
  .grade { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .assistente { position: static; max-height: none; }
  .abas { display: none; }
  .status, .email { display: none; }
}
@media (max-width: 1100px) {
  .docs { grid-template-columns: 1fr; padding: 12px; }
  .docs-lado { position: static; max-height: none; }
}
@media (max-width: 600px) {
  .papel-a4 { padding: 6mm; }
  .doc { font-size: 9pt; }
  .docs-previa { overflow-x: auto; }
  .topo { padding: 8px 12px; gap: 8px; }
  .grade { padding: 8px 0; }
  .assistente, .folha-col > div { border-radius: 0; }
  .passo-corpo { padding: 4px 16px 16px; }
  .folha-col > div { padding: 16px; }
  .modelos { grid-template-columns: 1fr; }
  .duas, .tres { grid-template-columns: 1fr 1fr; }
  .tres > :last-child { grid-column: span 2; }
  .folha-topo { flex-direction: column; gap: 4px; }
  .recurso.bloqueado { grid-template-columns: 1fr; }
  .flutuante { display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 30; box-shadow: 0 6px 20px rgba(15, 118, 110, .4); border-radius: 99px; }
  .cartoes { grid-template-columns: 1fr; }
}

/* ---------- Impressão A4 (boa também em preto e branco) ---------- */
@media print {
  body { background: #fff; font-size: 10pt; }
  body > *:not(#impressao) { display: none !important; }
  #impressao { display: block; }
  .pagina { break-after: page; }
  .pagina:last-child { break-after: auto; }
  .rolagem { overflow: visible; }
  .escala { font-size: 9pt; }
  .escala th, .escala td { height: 9mm; border-color: #000; }
  .escala .nome { min-width: 0; max-width: 45mm; white-space: normal; }
  .cel { min-width: 0; }
  .cel span { font-size: 8.5pt; white-space: normal; }
  .folha-topo { border-color: #000; }
  .folha-topo p, .legenda { color: #000; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cel.turno { box-shadow: none; }
  .cel.folga { background: repeating-linear-gradient(135deg, #fff 0 2mm, #ddd 2mm 4mm); }
  .cel.folga span { color: #000; }
  .cel i, .legenda i { background: #fff !important; color: #000; border: 1px solid #000; }
  .leg-folga { background: #ddd; color: #000; }
  .pagina-doc .doc th { background: #eee !important; }
  .ficha { break-inside: avoid; }
}
