/* CONTROLE DE MÁQUINAS — app do celular (app.html e abrir.html) */
.pg-cel { -webkit-tap-highlight-color: transparent; }
.pg-cel main { max-width: 680px; padding: 14px 16px 24px; }
body.tem-rodape { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.cel-topo { display: flex; align-items: center; gap: 12px; padding: 9px 14px; background: var(--fundo); border-bottom: 3px solid var(--vm); position: sticky; top: 0; z-index: 20; }
.cel-topo img { height: 30px; } .cel-topo h1 { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; } .cel-topo span { margin-left: auto; color: var(--sub); font-size: 13px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-cel .topo .quem { display: none; }      /* Sair fica na Conta */
.cel-rede { margin: 0; border-radius: 0; text-align: center; position: sticky; top: 52px; z-index: 19; background: var(--perigo-fundo); }

/* pisca (só opacity) */
@keyframes cm-pisca { 50% { opacity: .5; } }
.pisca-lento { animation: cm-pisca 2s ease-in-out infinite; } .pisca-rapido { animation: cm-pisca .9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pisca-lento, .pisca-rapido { animation: none; } }

/* início */
.cel-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.cel-kpis div { background: var(--p1); border: 1px solid var(--bd); border-top: 4px solid var(--c); border-radius: 12px; padding: 8px 4px 9px; text-align: center; } .cel-kpis b { display: block; font-size: 28px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; } .cel-kpis span { font-size: 11.5px; color: var(--sub); line-height: 1.2; display: block; }
.cel-acoes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; } .cel-acoes .btn { min-height: 58px; font-size: 18px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cel-sec { margin-bottom: 20px; } .cel-sec h2 { font-size: 16px; font-weight: 650; margin: 0 0 8px; } .cel-sec h3 { font-size: 13px; font-weight: 600; color: var(--sub); margin: 14px 0 7px; } .cel-sec p.sub { margin: 0; font-size: 14px; }
.cel-n { display: inline-block; min-width: 24px; padding: 0 7px; border-radius: 99px; background: var(--p2); border: 1px solid var(--bd); font-size: 13px; text-align: center; } .cel-n:empty { display: none; }
.cel-lst { display: flex; flex-direction: column; gap: 10px; }
.cc { background: var(--p1); border: 1px solid var(--bd); border-left: 6px solid var(--c); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.cc[data-id] { border-left-color: var(--c); }
.cc:focus-visible, .cl:focus-visible, .mq:focus-visible { outline: 2px solid var(--az); outline-offset: 1px; } .cc:active, .cl:active { background: var(--p2); }
.cc-l { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cc-l > b { font-size: 18px; font-weight: 700; line-height: 1.2; } .cc-t { margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; }
.cc-nm { color: var(--sub); font-size: 13px; line-height: 1.3; } .cc-mot { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; } .cc .sub { font-size: 13px; }
.cc .cc-ac { margin-top: 6px; min-height: 56px; font-size: 19px; border-radius: 11px; }
.cl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--p1); border: 1px solid var(--bd); border-left: 6px solid var(--c); border-radius: 12px; padding: 10px 12px; color: var(--tx); } .cl > span:first-child { flex: 1 1 55%; min-width: 0; font-size: 15px; line-height: 1.3; } .cl small { display: block; color: var(--sub); font-size: 13px; }
.cel-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.mq { position: relative; overflow: hidden; min-height: 78px; border: 1px solid color-mix(in srgb, var(--c) 55%, var(--bd)); border-radius: 11px; padding: 9px 9px 8px; color: var(--tx); background: var(--p1); display: flex; flex-direction: column; } .mq i { position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--c); }
.mq b, .mq span, .mq small { position: relative; } .mq b { font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; } .mq span { font-size: 12px; line-height: 1.25; color: var(--sub); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .mq small { margin-top: auto; padding-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--texto-2); }
.mq.ev { background: var(--fundo); } .mq.ev i { height: auto; bottom: 0; } .mq.ev b, .mq.ev span, .mq.ev small { color: var(--t); }

/* faixa de alerta */
.cel-faixa { position: fixed; left: 0; right: 0; top: 0; z-index: 90; display: flex; align-items: stretch; background: var(--perigo); color: var(--branco); box-shadow: 0 8px 30px var(--sombra); padding-top: env(safe-area-inset-top); animation: cm-desce .25s ease-out; } .cel-faixa.info { background: var(--primaria); } .cel-faixa.ok { background: var(--sucesso); }
@keyframes cm-desce { from { transform: translateY(-100%); } }
.cel-faixa button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; } .cf-tx { flex: 1; min-height: 66px; padding: 12px 4px 12px 16px !important; text-align: left; font-size: 17px !important; font-weight: 700 !important; line-height: 1.25 !important; overflow-wrap: anywhere; } .cf-x { width: 56px; font-size: 20px !important; } .cel-faixa button:focus-visible { outline: 2px solid var(--branco); outline-offset: -4px; }

/* rodapé e conta */
.cel-rodape { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; background: var(--fundo); border-top: 1px solid var(--bd); padding-bottom: env(safe-area-inset-bottom); }
.cel-rodape a, .cel-rodape button { height: 63px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; color: var(--sub); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; } .cel-rodape svg { width: 24px; height: 24px; fill: currentColor; } .cel-rodape .ativo { color: var(--az); } .cel-rodape :focus-visible { outline: 2px solid var(--az); outline-offset: -4px; }
.conta-fundo { position: fixed; inset: 0; z-index: 70; background: var(--sobreposicao); display: flex; align-items: flex-end; justify-content: center; }
.conta { width: min(560px, 100%); max-height: 92%; overflow-y: auto; background: var(--p1); border: 1px solid var(--bd); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; outline: none; animation: cm-sobe .2s ease-out; } @keyframes cm-sobe { from { transform: translateY(40%); opacity: 0; } }
.conta header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; } .conta header b { display: block; font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; } .conta header span { color: var(--sub); font-size: 14px; } .conta header .btn { min-width: 48px; min-height: 48px; }
.conta > .btn, .conta-push .btn { min-height: 54px; font-size: 17px; border-radius: 11px; width: 100%; } .conta-push { display: flex; flex-direction: column; gap: 5px; } .conta-push small { color: var(--sub); font-size: 13px; text-align: center; } .conta-push small:empty { display: none; } .conta-push .btn:disabled { cursor: default; font-size: 15px; } .conta-push .btn[data-estado=ativas] { border-color: var(--sucesso); color: var(--sucesso-texto); } .conta-push .btn[data-estado=inativas] { background: var(--primaria); border-color: var(--primaria-borda); }
.conta form { display: flex; flex-direction: column; gap: 14px; } .conta label { font-size: 14px; color: var(--tx); font-weight: 600; } .conta input { height: 52px; font-size: 17px; border-radius: 10px; width: 100%; } .conta-bts { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; } .conta-bts .btn { min-height: 54px; font-size: 17px; border-radius: 11px; }

/* leitor de QR */
.cel-qr { position: fixed; inset: 0; z-index: 95; background: var(--preto); display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 12px; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); } .cel-qr video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .cel-qr i { position: absolute; left: 50%; top: 42%; width: min(66vw, 300px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 4px solid var(--branco); border-radius: 22px; box-shadow: 0 0 0 100vmax var(--sombra); }
.cel-qr p { position: relative; margin: 0; text-align: center; font-size: 17px; font-weight: 600; color: var(--branco); } .cel-qr .btn { position: relative; min-height: 58px; font-size: 18px; border-radius: 12px; }

/* máquina (QR) */
.mq-cab { background: var(--p1); border: 1px solid var(--bd); border-top: 8px solid var(--c); border-radius: 14px; padding: 14px; margin-bottom: 14px; } .mq-cab h2 { margin: 0; font-size: 26px; line-height: 1.15; } .mq-cab p { margin: 2px 0 10px; color: var(--sub); font-size: 15px; } .mq-cab .chip { font-size: 14px; padding: 5px 13px; }
.mq-aviso { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.ch-leitura { background: var(--p1); border: 1px solid var(--bd); border-left: 6px solid var(--c); border-radius: 12px; padding: 13px; margin-bottom: 14px; } .ch-leitura h3 { margin: 0 0 4px; font-size: 18px; } .ch-leitura > p { margin: 0 0 10px; color: var(--sub); font-size: 14px; } .ch-leitura > p b { color: var(--tx); } .ch-leitura .cc-l { margin-bottom: 8px; } .ch-leitura .fc-tempo li { flex-direction: row; } .ch-leitura .btn { width: 100%; min-height: 50px; font-size: 16px; margin-top: 4px; }
.pg-abrir.tem-rodape .ab-acoes { bottom: calc(63px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
.pg-cel .toast { left: 14px; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; font-size: 15px; } .pg-cel:has(.conta-fundo) .toast { top: calc(14px + env(safe-area-inset-top)); bottom: auto; }      /* não cobre os campos da Conta */
@media (max-width: 760px) { .pg-cel .fc-cab .linha .btn { min-height: 46px; } .pg-cel .fc-cab .linha [data-acao=aceitar] { flex: 1 1 100%; min-height: 58px; font-size: 19px; border-radius: 12px; } }
@media print { .cel-rodape, .cel-faixa, .cel-topo { display: none !important; } body.tem-rodape { padding-bottom: 0; } }
