#printArea { display: none; }
/* Editar item em tela cheia: o <form> precisa ser coluna flex p/ o corpo rolar e o rodapé (Salvar) ficar fixo */
#lineModal .modal-content > form { display: flex; flex-direction: column; height: 100%; min-height: 0; flex: 1 1 auto; }
#lineModal .modal-body { overflow-y: auto; min-height: 0; }
@media print {
    @page { size: landscape; margin: 6mm; }
    html, body { width: 100%; }
    body * { visibility: hidden; }
    #printArea, #printArea * { visibility: visible; }
    #printArea { display: block; position: absolute; left: 0; top: 0; width: 100%;
        -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    #printArea h5 { font-size: 12px; margin: 0 0 6px; }
    #printArea .card { border: none !important; box-shadow: none !important; margin: 0 0 6px !important; }
    #printArea .table-responsive { overflow: visible !important; }
    #printArea table { width: 100% !important; font-size: 8px !important; border-collapse: collapse; }
    #printArea th, #printArea td { padding: 1px 2px !important; white-space: normal !important;
        word-break: break-word; overflow-wrap: anywhere; vertical-align: top; }
    #printArea td.text-center { white-space: nowrap !important; word-break: normal; overflow-wrap: normal; }
    #printArea tr, #printArea td, #printArea th { page-break-inside: avoid; }
}

/* ===== Redesign GR: editar linha em painel lateral, com Salvar sempre visível ===== */
#lineModal .modal-dialog {
  position: fixed; top: 0; right: 0; bottom: 0; margin: 0;
  width: min(820px, 100vw); max-width: none; height: 100%;
  transform: translateX(100%); transition: transform .22s ease-out;
}
#lineModal.show .modal-dialog { transform: none; }
#lineModal .modal-content { height: 100%; border: 0; border-radius: 0; box-shadow: -10px 0 40px rgba(0,0,0,.12); }
#lineModal .modal-header { align-items: flex-start; border-bottom: 1px solid var(--gr-border); }
#lineModal .modal-title { font-size: 1.05rem; font-weight: 600; line-height: 1.35; }
#lineModal .modal-body { background: var(--gr-surface-2); }
#lineModal .modal-footer { border-top: 1px solid var(--gr-border); background: #fff; }
#lineModal .modal-footer .btn-primary { flex: 1 1 auto; padding: .6rem; }

.gr-step-card, .gr-step { background: #fff; border: 1px solid var(--gr-border); border-radius: var(--gr-radius); padding: .85rem 1rem; }
.gr-step { margin-top: .75rem; }
.gr-step-h { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.gr-step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--gr-primary); color: #fff; font-size: .74rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.gr-step-sub { margin: .2rem 0 0 1.9rem; }
.gr-step-body { margin-top: .7rem; }
.gr-scale-row { display: grid; grid-template-columns: 110px 1fr; gap: .25rem .75rem; align-items: center; margin-bottom: .55rem; }
.gr-scale-lbl { font-size: .84rem; color: var(--gr-muted); }
.gr-scale { display: flex; border: 1px solid var(--gr-border-strong); border-radius: 8px; overflow: hidden; }
.gr-scale button { flex: 1; border: 0; border-left: 1px solid var(--gr-border); background: #fff; padding: .45rem 0; font-size: .86rem; color: var(--gr-text); }
.gr-scale button:first-child { border-left: 0; }
.gr-scale button:hover { background: var(--gr-surface-2); }
.gr-scale button.on { background: var(--gr-primary); color: #fff; font-weight: 600; }
.gr-scale .gr-scale-clear { flex: 0 0 34px; color: var(--gr-subtle); }
.gr-scale-cap { grid-column: 2; font-size: .76rem; color: var(--gr-muted); margin-top: -.1rem; }
@media (max-width: 575.98px) { .gr-scale-row { grid-template-columns: 1fr; } .gr-scale-cap { grid-column: 1; } }
