:root {
  --black: #111;
  --red: #c8202f;
  --green: #1f9d55;
  --yellow: #ffe14d;
  --bg: #f4f4f4;
  --card: #fff;
  --muted: #6b6b6b;
  --line: #dcdcdc;
  --radius: 10px;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--black); }
body { min-height: 100dvh; }
#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid var(--line); }
.topbar img { height: 28px; }
.topbar .logo-home { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; display: flex; align-items: center; -webkit-tap-highlight-color: transparent; }
.topbar .user { font-size: 12px; color: var(--muted); text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-tag { background: var(--yellow); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }

main { flex: 1; padding: 20px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
h1 { font-size: 20px; text-align: center; margin: 4px 0 2px; letter-spacing: .5px; }
.sub { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.section-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .6px; margin-top: 10px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 12px 16px; border: 0; border-radius: var(--radius); background: var(--black); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .4px; text-align: center; cursor: pointer; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.red { background: var(--red); }
.btn.gold { background: #8C6D1F; }
.btn.blue { background: #1f6f9e; }
.btn.green, .btn.done { background: var(--green); }
.btn.outline { background: #fff; color: var(--black); border: 2px solid var(--black); }
.btn.ghost { background: transparent; color: var(--black); border: 1px solid var(--line); font-weight: 600; }
.btn.small { min-height: 40px; font-size: 13px; }
.btn .badge { background: rgba(255,255,255,.25); border-radius: 20px; padding: 1px 8px; font-size: 12px; }
.btn.soon { background: #bdbdbd; }
.btn.wpp { background: #25D366; color: #fff; }
.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.three .btn { padding: 8px 6px; font-size: 12px; }
.btn.yellow { background: #F2B705; color: #1a1a1a; }
a.btn { text-decoration: none; }
.ust-tab .icon-btn { width: 32px; height: 28px; font-size: 14px; vertical-align: middle; margin-left: 4px; }
.list-item.prot { align-items: center; }
.btn.soon::after { content: "EM BREVE"; font-size: 10px; background: #fff; color: #555; border-radius: 4px; padding: 2px 5px; }

.footer { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px; border: 1px solid #bbb; border-radius: var(--radius); background: #fff; }
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--black); border-color: transparent; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.list-item .t { font-weight: 700; }
.list-item .d { font-size: 12px; color: var(--muted); margin-top: 2px; }
.list-item .chev { font-size: 22px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

.map { width: 100%; height: 220px; border: 0; border-radius: var(--radius); background: #e8e8e8; }
.coords { font-size: 13px; color: var(--muted); }

.photos { display: flex; flex-direction: column; gap: 12px; }
.photo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; max-height: 300px; object-fit: contain; background: #222; display: block; }
.photo .row { display: flex; gap: 8px; padding: 10px; align-items: center; }
.photo .row input { flex: 1; }
.icon-btn { border: 0; background: #f1f1f1; border-radius: 8px; width: 44px; height: 44px; font-size: 18px; cursor: pointer; }
.add-photo { border: 2px dashed #aaa; border-radius: var(--radius); background: #fff; min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-weight: 600; cursor: pointer; }
.add-photo span { font-size: 34px; line-height: 1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.warn { background: var(--yellow); font-weight: 800; text-align: center; padding: 10px; border-radius: 8px; }
.warn small { display: block; font-weight: 500; margin-top: 4px; }
.success { text-align: center; padding: 30px 10px; }
.success .check { width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; font-size: 42px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.progress { height: 10px; background: #e3e3e3; border-radius: 6px; overflow: hidden; }
.progress div { height: 100%; background: var(--green); width: 0; transition: width .2s; }
.login-logo { width: 220px; margin: 30px auto 20px; display: block; }
.link { background: none; border: 0; color: var(--black); text-decoration: underline; font-size: 14px; padding: 10px; cursor: pointer; }
.hint { font-size: 13px; color: var(--muted); text-align: center; }

.modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal .sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.modal .sheet h2 { margin: 0 0 4px; font-size: 18px; text-align: center; }
.hidden { display: none !important; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--black); color: #fff; padding: 10px 16px; border-radius: 20px; font-size: 14px; z-index: 60; max-width: 90%; text-align: center; }

/* registro de laudos */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid #bbb; background: #fff; border-radius: 20px; padding: 7px 12px; font-size: 12px; font-weight: 700; letter-spacing: .4px; cursor: pointer; color: var(--black); }
.chip.on { background: var(--black); border-color: var(--black); color: #fff; }
.rlista { display: flex; flex-direction: column; gap: 8px; }
.tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 1px 6px; border-radius: 4px; background: var(--black); color: #fff; margin-right: 4px; }
.tag.v { background: var(--red); }
.kvs { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.kv span { color: var(--muted); }
.kv b { text-align: right; overflow-wrap: anywhere; }

/* agenda do Outlook no menu */
.agenda { display: flex; flex-direction: column; gap: 8px; }
.ag { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.ag.prox { border: 2px solid var(--red); }
.ag-h { display: flex; flex-direction: column; align-items: center; min-width: 58px; }
.ag-h b { font-size: 17px; }
.ag-h span { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .4px; }
.ag.prox .ag-h span { color: var(--red); }
.ag-c { flex: 1; min-width: 0; }
.ag-c .t { font-weight: 700; font-size: 14px; }
.ag-c .d { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-w { font-size: 11px; font-weight: 800; color: #fff; background: #33ccff; border-radius: 6px; padding: 4px 7px; white-space: nowrap; }

/* previsão do tempo no menu */
.tempo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tp-ic { font-size: 34px; line-height: 1; }
.tp-c { flex: 1; min-width: 0; }
.tp-t { font-size: 22px; font-weight: 800; }
.tp-t span { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.tp-d { font-size: 12px; color: var(--muted); }
.tp-ok { flex-basis: 100%; font-size: 12px; color: var(--green); font-weight: 700; }
.tp-al { flex-basis: 100%; background: #fff4c2; border: 1px solid #e8c200; color: #6b5200; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 800; }
.tp-al small { display: block; font-weight: 600; margin-top: 2px; }
.tempo.chuva { border: 2px solid #e8c200; }

/* atividades da equipe (administradores) */
.progress.mini { height: 5px; margin-top: 6px; }
.list-item.eq .d b { font-weight: 800; }
.kv b small { font-weight: 500; color: var(--muted); }

/* agenda em cartões com rolagem lateral */
.agenda { display: block; }
.ag-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 8px 8px; margin: 0 -8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ag-strip::-webkit-scrollbar { display: none; }
.agc { flex: 0 0 86%; scroll-snap-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 210px; }
.agc.foco { border: 2px solid var(--red); }
.agc.passado { background: #f7f7f7; color: #666; }
.agc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.agc-h b { color: var(--black); }
.agc.passado .agc-h b { color: #666; }
.agc-st { font-size: 10px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 10px; color: #fff; white-space: nowrap; }
.agc-st.p { background: #9e9e9e; } .agc-st.a { background: var(--green); } .agc-st.n { background: var(--red); }
.agc-t { font-weight: 800; font-size: 15px; }
.agc-l { font-size: 12px; color: var(--muted); }
.agc-b { flex: 1; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 130px; overflow-y: auto; background: #fafafa; border-radius: 6px; padding: 8px; }
.agc.passado .agc-b { background: #f0f0f0; }
.agc-w { border: 0; border-radius: 8px; background: #33ccff; color: #fff; font-weight: 800; font-size: 13px; padding: 10px; cursor: pointer; }
.agc-u { font-size: 12px; font-weight: 700; color: var(--green); }
.ag-nav { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 12px; color: var(--muted); }
.ag-nav .icon-btn { width: 36px; height: 32px; font-size: 20px; }
.tag.o { background: #1f6f9e; }

/* sugestões da agenda (Localização / Cliente) */
.sugs { display: flex; flex-direction: column; gap: 6px; }
.list-item.sug { border: 1px dashed #1f6f9e; background: #f3f8fc; }
.sug-b { font-size: 11px; font-weight: 800; color: #fff; background: #1f6f9e; border-radius: 6px; padding: 5px 9px; }
.btn.del { color: var(--red); border-color: #e7b5ba; }

/* visita técnica: conformidade por foto e marcações do item */
.conf { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 10px 0; }
.cf { border: 2px solid var(--line); background: #fff; border-radius: 8px; min-height: 42px; font-weight: 800; font-size: 13px; letter-spacing: .3px; cursor: pointer; color: #555; }
.cf.c.on { background: var(--green); border-color: var(--green); color: #fff; }
.cf.nc.on { background: var(--red); border-color: var(--red); color: #fff; }
.marcas { display: flex; flex-direction: column; gap: 10px; }
.mg-n { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .5px; margin-bottom: 6px; }
.mg-n small { font-weight: 600; }
.marcas .chip { padding: 9px 12px; }
.btn .badge.nc { background: var(--red); }
.instr { background: #eef5fb; border-left: 4px solid #1f6f9e; border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.35; }
/* perguntas da finalização da visita */
.pq { display: flex; flex-direction: column; gap: 10px; }
.pq-t { font-weight: 700; font-size: 15px; }
.pq-op { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pq-det { display: flex; flex-direction: column; gap: 6px; }
.pq-det label { font-size: 13px; font-weight: 600; }
.pq-in { display: flex; align-items: center; gap: 8px; }
.pq-in input { flex: 1; width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #bbb; border-radius: var(--radius); }
.pq-in span { font-size: 13px; color: var(--muted); font-weight: 600; }
.pq.falta { border: 2px solid var(--red); }
.pq .cf.on { background: var(--black); border-color: var(--black); color: #fff; }

/* relógio, versão e previsão (visuais alternativos) */
.relogio { text-align: center; font-size: 14px; color: var(--muted); margin: -4px 0 4px; }
.relogio b { color: var(--black); font-size: 16px; }
.versao { text-align: center; font-size: 11px; color: #9a9a9a; margin-top: 4px; }
.tempo { position: relative; }
.tp-sw { position: absolute; top: 6px; right: 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 30px; height: 28px; font-size: 15px; color: var(--muted); cursor: pointer; }
.tempo.est-cartao .tp-c, .tempo.est-horas .tp-c { padding-right: 30px; }
.tp-hs { flex-basis: 100%; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tph { display: flex; flex-direction: column; align-items: center; gap: 1px; background: #f6f6f6; border-radius: 8px; padding: 6px 2px; font-size: 12px; }
.tph span:first-child { color: var(--muted); font-size: 11px; }
.tph b { font-size: 18px; line-height: 1.2; }
.tph small { font-size: 10px; color: #1f6f9e; font-weight: 700; }
.tph.ch { background: #fff4c2; }
.tempo.est-compacto { padding: 10px 44px 10px 12px; }
.tpc { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tpc b { font-size: 16px; }
.tpc-ok { font-size: 11px; font-weight: 700; color: var(--green); }
.tpc-al { font-size: 11px; font-weight: 800; color: #6b5200; background: #fff4c2; border-radius: 6px; padding: 2px 6px; }
#sugtxt { min-height: 140px; }
.feshow { font-size: 26px; font-weight: 900; color: var(--red); letter-spacing: .5px; margin: 0 0 14px; animation: feshow .6s ease-out; }
@keyframes feshow { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.photo .ponto { background: var(--black); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .5px; padding: 6px 10px; }
.photo .row input.ohm { flex: 0 0 78px; text-align: center; }
.dados-ag { font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.dados-ag span { color: var(--muted); font-weight: 600; }
.tag-torre { display: inline-block; background: var(--black); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .5px; padding: 4px 10px; border-radius: 4px; margin: -4px 0 10px; }
.filabar { background: var(--black); color: #fff; font-size: 13px; font-weight: 700; padding: 8px 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filabar.erro { background: var(--red); }
.pmpf { display: flex; flex-direction: column; gap: 8px; }
.pmpq { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 6px; font-size: 14px; }
.pmpq small { color: var(--muted); font-size: 12px; }

/* PMP pela agenda (v68) */
.agc.pmp { border-left: 5px solid #1f6f9e; }
.agc.pmp.foco { border: 2px solid var(--red); border-left: 5px solid #1f6f9e; }
.pmp-lig { font-size: 13px; font-weight: 700; line-height: 1.35; }
.pmp-lig.sem { font-weight: 600; color: var(--muted); font-style: italic; }
.pmp-d { font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.agc-a { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.agc-w.pmp { background: #1f6f9e; }
.agc-w.sec { background: #fff; color: #1f6f9e; border: 2px solid #1f6f9e; }
.pmp-eqs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.pmp-eqs .btn { margin: 0; padding: 10px 4px; }
.pmp-kv { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pmp-kv .kv { display: flex; justify-content: space-between; gap: 10px; }
.pmp-kv .kv span { color: var(--muted); }
.pmp-kv .kv b { text-align: right; }
.pq.pf { display: flex; flex-direction: column; gap: 8px; }
.pq.pf.nc { border-left: 5px solid var(--red); }
.pq .cf.na.on { background: #757575; border-color: #757575; }
.pf-fx { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pf-nc { font-size: 12px; font-weight: 800; color: var(--red); }
.pf-f { font-size: 12px; color: var(--muted); }
.pf-th { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-th:empty { display: none; }
.pf-t { position: relative; width: 72px; height: 72px; }
.pf-t img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.pf-t button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--black); color: #fff; font-size: 12px; cursor: pointer; }
.pq.pf textarea { min-height: 0; font-size: 14px; }
.pq.pf .two { margin: 0; }
.pq.pf .two .btn { margin: 0; }
.pq.pf.nc .cf.on { background: var(--red); border-color: var(--red); }

/* Aviso das fotos na horizontal (v75) */
.horiz { background: #fff4d6; border: 1px solid #e8c45a; color: #6b4e00; border-radius: 8px; padding: 9px 12px; font-size: 13px; font-weight: 800; letter-spacing: .3px; text-align: center; margin: 4px 0 10px; }
.horiz.mini { font-size: 11px; padding: 5px 8px; margin: 0; }
.horiz small { display: block; font-size: 12px; font-weight: 700; margin-top: 3px; }
/* Lembrete de segunda-feira (v79) */
.lembrete { background: #fff1f2; border: 2px solid var(--red); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: #5c0b12; margin-bottom: 10px; }
.lembrete b { display: block; font-size: 15px; margin-bottom: 4px; color: var(--red); }

/* Aniversários (menu principal) */
.aniv-card { background: linear-gradient(135deg, #fff4d6, #ffe3e6); border: 2px solid #e8c45a; border-radius: 14px; padding: 16px; text-align: center; font-size: 14px; color: #4a3500; margin: 0 0 12px; }
.aniv-card b { display: block; font-size: 20px; color: var(--red); margin: 6px 0; }
.aniv-emoji { font-size: 34px; line-height: 1.1; }
.aniv-aviso { background: #fff; border: 1px solid var(--line); border-left: 4px solid #e8c45a; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 12px; }

/* Status das usinas (monitoramento) */
.ust { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-left: 6px solid #9aa0a6; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; cursor: pointer; font: inherit; color: inherit; }
.ust-ligada { border-left-color: #1a7f37; background: #f1faf3; }
.ust-desligada { border-left-color: #c62828; background: #fdecec; }
.ust-semcom, .ust-semdados { border-left-color: #9aa0a6; background: #f4f5f6; }
.ust-ico { font-size: 26px; line-height: 1; }
.ust-txt { flex: 1; min-width: 0; }
.ust-txt b { display: block; font-size: 15px; }
.ust-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ust-seta { font-size: 24px; color: var(--muted); }
.ust-grande { text-align: center; border-radius: 14px; padding: 16px; margin: 0 0 14px; border: 2px solid #9aa0a6; background: #f4f5f6; }
.ust-grande.ust-ligada { border-color: #1a7f37; background: #f1faf3; }
.ust-grande.ust-desligada { border-color: #c62828; background: #fdecec; }
.ust-grande .ust-ico { font-size: 40px; }
.ust-grande b { display: block; font-size: 22px; margin: 6px 0 2px; }
.ust-grande small { display: block; color: var(--muted); font-size: 13px; }
.ust-tab { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 14px; background: #fff; border-radius: 10px; overflow: hidden; }
.ust-tab td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ust-tab td:last-child { text-align: right; }
.btn.semcom { background: #8a8f95; }
.btn.desl { background: #7a1020; box-shadow: inset 0 0 0 3px #ff6b6b; } /* usina DESLIGADA: vinho com borda clara, diferente do vermelho dos outros botões */
.btn.parcial { background: #e8710a; } /* usina PARCIAL: algum skid sem rede */
.ust-parcial { border-left-color: #e8710a; background: #fff3e6; }
.ust-grande.ust-parcial { border-color: #e8710a; background: #fff3e6; }
.ust-skid { background: #fff; border: 1px solid var(--line); border-left: 6px solid #9aa0a6; border-radius: 12px; margin: 0 0 8px; }
.ust-skid.ust-ligada { border-left-color: #1a7f37; } .ust-skid.ust-desligada { border-left-color: #c62828; background: #fdecec; } .ust-skid.ust-parcial { border-left-color: #e8a10a; background: #fff8e6; }
.ust-skid summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; list-style: none; }
.ust-skid summary::-webkit-details-marker { display: none; }
.ust-skid .ust-tab { margin: 0; font-size: 13px; }
.ust-alr { color: #c62828; font-weight: 700; }
.ust-est { color: var(--muted); font-weight: 700; }
.card.locconf { display: flex; flex-direction: column; gap: 8px; border: 2px solid #1565c0; background: #eef4fd; }
.card.locconf small { color: var(--muted); font-size: 13px; }
.locok { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: #f1faf3; border: 1px solid #b7dfc1; border-radius: 10px; padding: 8px 10px; margin: 0 0 10px; font-size: 13.5px; font-weight: 600; }
.locok small { flex-basis: 100%; color: var(--muted); font-weight: 500; }
.locok .chip { margin-left: auto; }
.locok.fraca { background: #fff6e5; border-color: #f0c674; }
.tag.ob { background: #7a4b00; }
/* REGISTRO PONTO */
.pt-res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 12px; }
.pt-res > div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; }
.pt-res small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.pt-res b { font-size: 20px; }
.pt-res b.warn-t { color: #c26a00; }
.pt-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; font-size: 16px; }
.pt-dia { background: #fff; border: 1px solid var(--line); border-left: 6px solid #c26a00; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.pt-dia.ok { border-left-color: #1a7f37; }
.pt-dia.fut { border-left-color: #c9ccd1; opacity: .85; }
.pt-dia.hoje { box-shadow: 0 0 0 2px #1f6f9e inset; }
.pt-h { display: flex; align-items: center; gap: 10px; }
.pt-h b { min-width: 92px; }
.pt-h select { flex: 1; min-height: 38px; font-weight: 700; }
.pt-st { font-size: 18px; width: 22px; text-align: center; }
.pt-dia.ok .pt-st { color: #1a7f37; } .pt-dia.pend .pt-st { color: #c26a00; }
.pt-per { display: flex; align-items: center; gap: 6px; }
.pt-per > span:first-child { width: 48px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pt-per input[type=time] { flex: 1; min-width: 0; min-height: 40px; font-size: 16px; }
.pt-calc { font-size: 13.5px; color: #333; }
.pt-ex { color: #1f6f9e; font-weight: 700; } .pt-fa { color: #c62828; font-weight: 700; }
.pt-obs { min-height: 38px; font-size: 14px; }
.pt-dia .chip { align-self: flex-start; }
.pt-bar { height: 6px; background: #eceef1; border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.pt-bar span { display: block; height: 100%; background: #1a7f37; }
.pt-eq.pend .pt-bar span { background: #e8710a; }
.pt-eq.sem { opacity: .75; }
.pt-tab td, .pt-tab th { font-size: 13px; text-align: left !important; }
.pt-tab tr.pend td { background: #fff3e6; } .pt-tab tr.fut td { color: #999; }
.pt-obsd summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.pt-obsd input { margin-top: 6px; width: 100%; }
.pt-calc:empty { display: none; }

/* v111: prévia do gestor e envio da folha ponto */
.pt-previa { background: #eef6ff; border: 2px dashed #1f6fb0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: #0d3a63; margin-bottom: 12px; }
.pt-previa b { display: block; font-size: 15px; margin-bottom: 3px; }
.pt-previa small { display: block; margin: 6px 0; color: #355a7d; }
.pt-envio .btn { margin: 10px 0 0; }
.pt-ok-envio { background: #ecf8ef; border: 1.5px solid #2e9d4f; color: #14532d; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 10px; }
.pt-env { font-weight: 700; color: #b45309; }
.pt-env.ok { color: #1b7f3b; }

/* v113: dia confirmado (somente leitura) e atestado */
.pt-tipo { flex: 1; font-size: 13px; font-weight: 700; color: #555; }
.pt-resumo { font-size: 14px; margin: 4px 0; }
.pt-obsv { font-size: 13px; color: #555; margin: 4px 0; }
.pt-dia.ok .chip { margin-top: 6px; }
.pt-dia.atest .pt-h b, .pt-dia.atest .pt-tipo { color: #c62828; }
.pt-dia.atest { border-color: #e57373; }
.pt-atl { font-size: 13px; color: #c62828; background: #fff5f5; border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.pt-tab td.pt-atd { color: #c62828; font-weight: 700; }

/* v116: subtítulo de inversores dentro do cartão do disjuntor */
.ust-sub { font-size: 12px; font-weight: 700; color: #555; padding-top: 10px !important; letter-spacing: .3px; }

/* ---------- Centro de controle (TV 1920×1080, escalado para a tela) ---------- */
body.cc-modo { background: #0d1117; overflow: hidden; }
body.cc-modo #app { max-width: none; background: #0d1117; }
.cc-btn { background: #0d1117; border: 2px solid #3fb950; }
.cc-palco { position: fixed; inset: 0; background: #0d1117; }
.cc { position: absolute; width: 1920px; height: 1080px; transform-origin: 0 0; display: flex; flex-direction: column; color: #e6edf3; font-family: Inter, Arial, sans-serif; }
.cc-carregando { margin: auto; font-size: 36px; color: #8b949e; }
.cc-top { height: 96px; display: flex; align-items: center; padding: 0 32px; gap: 24px; background: #161b22; border-bottom: 2px solid #30363d; position: relative; }
.cc-logo img { height: 44px; display: block; } .cc-logo small { display: block; font-size: 14px; color: #8b949e; letter-spacing: 3px; font-weight: 700; margin-top: 4px; }
.cc-resumo { display: flex; gap: 12px; margin-left: 16px; }
.cc-pill { padding: 10px 16px; border-radius: 12px; font-size: 21px; font-weight: 700; background: #21262d; } .cc-pill b { font-size: 30px; margin-right: 6px; }
.cc-g { color: #3fb950; } .cc-o { color: #f0883e; } .cc-r { color: #f85149; } .cc-c { color: #8b949e; }
.cc-frota { margin-left: auto; text-align: right; } .cc-v { font-size: 40px; font-weight: 800; } .cc-l { font-size: 16px; color: #8b949e; }
.cc-relogio { text-align: right; min-width: 220px; } .cc-h { font-size: 52px; font-weight: 800; line-height: 1; } .cc-d { font-size: 18px; color: #8b949e; }
.cc-sair { position: absolute; right: 6px; top: 4px; background: none; border: 0; color: #30363d; font-size: 20px; cursor: pointer; }
.cc-sair:hover { color: #8b949e; }
.cc-som { position: absolute; left: 50%; top: 100px; transform: translateX(-50%); z-index: 3; background: #d29922; color: #0d1117; border: 0; border-radius: 10px; padding: 10px 20px; font-size: 20px; font-weight: 800; cursor: pointer; }
.cc-aviso { background: #4a1214; color: #ffb3ad; font-size: 22px; font-weight: 800; text-align: center; padding: 8px; }
.cc-grid { flex: 1; min-height: 0; display: grid; gap: 18px; padding: 18px 24px; }
.cc-card { background: #161b22; border: 2px solid #30363d; border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; }
.cc-card.cc-ligada { border-color: #238636; } .cc-card.cc-parcial { border-color: #d29922; } .cc-card.cc-semmon { opacity: .55; }
.cc-card.cc-desligada { border-color: #f85149; animation: ccPulsa 1.2s infinite; }
@keyframes ccPulsa { 50% { box-shadow: 0 0 40px #f85149; } }
.cc-cab { padding: 12px 20px 12px; } .cc-ligada .cc-cab { background: #12361f; } .cc-parcial .cc-cab { background: #3d2a07; } .cc-desligada .cc-cab { background: #4a1214; } .cc-semmon .cc-cab, .cc-semcom .cc-cab, .cc-semdados .cc-cab { background: #21262d; }
.cc-nome { font-size: 26px; font-weight: 800; } .cc-est { font-size: 30px; font-weight: 900; line-height: 1.1; white-space: nowrap; }
.cc-est.cc-est-longo { font-size: 24px; white-space: normal; }
.cc-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 2px; }
.cc-cab .cc-pot { font-size: 38px; line-height: 1.1; white-space: nowrap; } .cc-cab .cc-barra { background: rgba(0,0,0,.35); height: 10px; margin-top: 8px; } .cc-cab .cc-pct { margin-top: 4px; font-size: 15px; color: #b1bac4; }
.cc-ligada .cc-est { color: #3fb950; } .cc-parcial .cc-est { color: #f0883e; } .cc-desligada .cc-est { color: #f85149; } .cc-semmon .cc-est, .cc-semcom .cc-est, .cc-semdados .cc-est { color: #8b949e; }
.cc-desde { font-size: 16px; color: #c9d1d9; margin-top: 2px; }
.cc-sec { padding: 12px 20px; border-top: 1px solid #30363d; }
.cc-lab { font-size: 15px; letter-spacing: 2px; color: #8b949e; font-weight: 700; margin-bottom: 8px; }
.cc-pot { font-size: 48px; font-weight: 900; } .cc-pot small { font-size: 22px; color: #8b949e; font-weight: 600; }
.cc-barra { height: 14px; background: #30363d; border-radius: 7px; margin-top: 8px; overflow: hidden; } .cc-barra i { display: block; height: 100%; background: linear-gradient(90deg, #238636, #3fb950); }
.cc-parcial .cc-barra i { background: linear-gradient(90deg, #9e6a03, #d29922); }
.cc-pct { font-size: 16px; color: #8b949e; margin-top: 6px; }
.cc-djs { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-dj { padding: 8px 12px; border-radius: 10px; font-size: 18px; font-weight: 800; }
.cc-dj-f { background: #12361f; color: #3fb950; } .cc-dj-a { background: #4a1214; color: #ff7b72; } .cc-dj-i { background: #21262d; color: #8b949e; }
.cc-invs { display: grid; gap: 7px; }
.cc-inv { height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; color: #0d1117; }
.cc-inv-ok { background: #3fb950; } .cc-inv-al { background: #f85149; color: #fff; } .cc-inv-at { background: #d29922; } .cc-inv-sr { background: #6e7681; color: #fff; } .cc-inv-st { background: #30496b; color: #c9d1d9; }
.cc-resinv { font-size: 17px; margin-top: 8px; line-height: 1.3; }
.cc-ph { font-size: 18px; color: #6e7681; font-style: italic; }
.cc-clima { display: flex; justify-content: space-between; font-size: 20px; }
.cc-rod-l { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; } .cc-rod-cl { color: #e6edf3; white-space: nowrap; }
.cc-rod { margin-top: auto; padding: 12px 20px; background: #0d1117; font-size: 16px; color: #8b949e; line-height: 1.5; } .cc-rod b { color: #e6edf3; }
.cc-ticker { height: 64px; background: #161b22; border-top: 2px solid #30363d; display: flex; align-items: center; gap: 24px; padding: 0 28px; font-size: 21px; white-space: nowrap; }
.cc-t { color: #8b949e; font-weight: 700; } .cc-tkbox { flex: 1; overflow: hidden; }
.cc-tk { display: inline-flex; gap: 40px; } .cc-tk.cc-anda { animation: ccRola 60s linear infinite; padding-left: 100%; }
@keyframes ccRola { to { transform: translateX(-100%); } }
.cc-ev b { margin-right: 8px; }
.inv-falha td { padding-top: 0; text-align: left !important; } .inv-falha small { display: block; color: #555; font-size: 12px; line-height: 1.35; margin-top: 2px; }
.cc-sair-m { display: none; position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; background: #e3262b; color: #fff; border: 0; border-radius: 12px; padding: 12px 18px; font-size: 16px; font-weight: 800; box-shadow: 0 4px 14px rgba(0,0,0,.5); cursor: pointer; }
@media (max-width: 1000px) { .cc-sair-m { display: block; } .cc-sair { display: none; } }
.cc-trks { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.cc-trk { display: block; height: 16px; border-radius: 4px; }
.cc-trks.cc-trks-mini { grid-template-columns: repeat(15, 1fr); gap: 3px; } .cc-trks-mini .cc-trk { height: 13px; border-radius: 3px; }
.trk-grade { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; margin: 4px 0; }
.trk-q { font-size: 10px; font-weight: 700; text-align: center; border-radius: 4px; padding: 3px 0; color: #0d1117; }
.trk-q.cc-inv-al, .trk-q.cc-inv-sr { color: #fff; }
/* resumo da usina no celular = cartão do centro de controle */
.cc-mini { color: #e6edf3; font-family: Inter, Arial, sans-serif; margin-bottom: 4px; }
.cc-mini .cc-card { border-radius: 16px; }
.cc-mini .cc-rod { border-radius: 0 0 14px 14px; }
.ust-txt .ust-alerta { display: block; color: #b42318; font-weight: 700; margin-top: 2px; }
.ust-txt .ust-okl { display: block; color: #1a7f37; font-weight: 600; margin-top: 2px; }
/* Comandos remotos (v139) */
.btn.cmd-abrir { background: #fff; color: #b3261e; border: 2px solid #b3261e; margin: 12px 0; }
.instr.cmd-sim { background: #fff8e1; border-left-color: #f9a825; }
.instr.cmd-real { background: #fdecea; border-left-color: #c62828; }
.btn.cmd-btn { display: flex; flex-direction: column; align-items: center; margin: 8px 0; background: #fff; color: #222; border: 2px solid #999; }
.btn.cmd-btn small { font-size: 11px; font-weight: 600; letter-spacing: .5px; opacity: .8; }
.btn.cmd-desliga { border-color: #c62828; color: #c62828; }
.btn.cmd-liga { border-color: #1a7f37; color: #1a7f37; }
.btn.cmd-reset { border-color: #1f6f9e; color: #1f6f9e; }
.cmd-ck { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.35; margin: 10px 0 14px; }
.cmd-ck input { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.cmd-res { border: 2px solid #bbb; border-radius: 10px; padding: 12px; margin: 8px 0 12px; display: grid; gap: 6px; background: #fafafa; }
.cmd-res-t { font-weight: 800; font-size: 16px; }
.cmd-res.cmd-executado { border-color: #1a7f37; background: #eef8f0; }
.cmd-res.cmd-simulado, .cmd-res.cmd-nao_confirmado { border-color: #f9a825; background: #fff8e1; }
.cmd-res.cmd-recusado, .cmd-res.cmd-falhou { border-color: #c62828; background: #fdecea; }
.inv-sn { font-size: 11px; color: #666; font-weight: 400; letter-spacing: .3px; }
/* Câmera dentro do app (v147) */
.camapp { position: fixed; inset: 0; z-index: 10000; background: #000; display: flex; flex-direction: column; }
.camapp video { flex: 1; width: 100%; min-height: 0; object-fit: contain; background: #000; }
.camapp-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .12s; }
.camapp-flash.on { opacity: .7; }
.camapp-topo { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: linear-gradient(#000c, #0000); color: #fff; font-size: 14px; font-weight: 600; }
.camapp-sis { background: #ffffff26; color: #fff; border: 1px solid #fff8; border-radius: 16px; padding: 6px 10px; font-size: 12px; }
.camapp-barra { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); background: #000; }
.camapp-barra button { min-width: 96px; background: none; color: #fff; border: 0; font-size: 15px; font-weight: 700; }
.camapp-ok { color: #3fb950 !important; } .camapp-ok:disabled { color: #555 !important; }
.camapp-btn { width: 72px !important; min-width: 72px !important; height: 72px; border-radius: 50%; background: #fff !important; border: 5px solid #bbb !important; }
.camapp-btn:active { transform: scale(.92); }

/* Holerites */
.hol-btn { background: #1f3b57; }
.hol-novo { display: inline-block; background: #e8a317; color: #111; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 10px; margin-left: 6px; vertical-align: middle; letter-spacing: .5px; }
.hol-ano { background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; margin: 10px 0; padding: 4px 12px; }
.hol-ano > summary { font-weight: 800; font-size: 17px; padding: 10px 0; cursor: pointer; }
.hol-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #eee; }
.hol-item.novo { background: #fff8e6; margin: 0 -12px; padding: 10px 12px; }
.hol-txt { flex: 1; min-width: 0; } .hol-txt small { display: block; color: #666; margin-top: 2px; }
.hol-bts { display: flex; gap: 6px; } .hol-bts .btn { margin: 0; width: auto; padding: 8px 12px; }
.hol-form { background: #f4f7fa; border: 1px solid #dde5ee; border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.hol-form select, .hol-form input { width: 100%; box-sizing: border-box; }
.hol-form .lbl { display: block; font-size: 13px; font-weight: 600; margin: 8px 0 4px; }
.hol-form select, .hol-form input[type=month], .hol-form input[type=file] { font: inherit; font-size: 16px; padding: 10px; border: 1px solid #bbb; border-radius: var(--radius); background: #fff; }

.hol-contbtn { display: inline-block; margin-top: 6px; background: #fff; border: 1px solid #c62828; color: #c62828; font: inherit; font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 8px; cursor: pointer; }
.hol-cont.ok { color: #1b7f3b; font-weight: 600; }
.instr.err { border-color: #c62828; background: #fff5f5; }

/* EPI e uniformes */
.epi-btn { background: #9a5b00; }
.epi-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.epi-item.on { border-color: #1b7f3b; background: #f3fbf5; }
.epi-txt { flex: 1; min-width: 0; } .epi-txt b { display: block; font-size: 14px; } .epi-txt small { color: #666; }
.epi-tam { display: flex; gap: 6px; margin-top: 8px; } .epi-tam select { flex: 1; font: inherit; font-size: 15px; padding: 8px; border: 1px solid #bbb; border-radius: 8px; background: #fff; }
.epi-q { display: flex; align-items: center; gap: 6px; } .epi-q span { min-width: 22px; text-align: center; font-weight: 800; font-size: 18px; }
.epi-mb { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #bbb; background: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }

/* Prévia "ver o app como" */
.previa-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; background: #1565c0; color: #fff; font-size: 13px; padding: 8px 12px; }
.previa-bar b { margin: 0 3px; } .previa-bar button { margin-left: auto; background: #fff; color: #1565c0; border: 0; border-radius: 6px; font-weight: 800; padding: 6px 12px; cursor: pointer; }

/* Assinatura da ficha de jornada */
.assin-lab { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 13px; margin: 14px 0 6px; }
.assin-lab .btn { width: auto; margin: 0; padding: 6px 10px; }
.assin-cv { width: 100%; aspect-ratio: 3 / 1; background: #fff; border: 2px dashed #9aa7b8; border-radius: 10px; touch-action: none; display: block; }
.assin-dec { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 10px 0; } .assin-dec input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
