/* Precito Live — TV. Tudo em rem: o JS ajusta o tamanho da fonte raiz à largura da tela (Full HD e 4K ficam iguais). Sem rolagem. Sem recursos externos. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; background: #0b0d10; color: #f2f4f7; font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; cursor: none; }
#raiz { width: 100vw; height: 100vh; overflow: hidden; position: relative; }
.mini { font-size: .8rem; color: #9aa4b2; }
.pill { display: inline-block; padding: .12rem .6rem; border-radius: 1rem; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; background: #2b313b; color: #cbd2dc; }
.pill.ok { background: #12391f; color: #5be08a; } .pill.warn { background: #473410; color: #ffc457; } .pill.bad { background: #4a1616; color: #ff7b7b; } .pill.off { background: #2b313b; color: #8a94a3; }
.pos { color: #5be08a; } .neg { color: #ff6b6b; } .amb { color: #ffc457; } .mut { color: #8a94a3; }

/* ---- telas de apoio (pareamento, iniciar, erro) ---- */
.centro { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem; }
.marca { font-size: 1.6rem; font-weight: 800; letter-spacing: .28em; color: #f5c400; margin-bottom: 2rem; }
.codigo-tv { font-size: 7rem; font-weight: 800; letter-spacing: .12em; font-family: Consolas, "Courier New", monospace; color: #fff; background: #151a21; border: .25rem solid #f5c400; border-radius: 1.2rem; padding: 1.2rem 3rem; margin: 1.5rem 0; }
.passos { font-size: 1.5rem; line-height: 1.7; color: #cbd2dc; max-width: 62rem; }
.btn-grande { font-size: 3rem; font-weight: 800; padding: 1.2rem 4rem; border-radius: 1.2rem; border: .3rem solid #f5c400; background: #f5c400; color: #111; cursor: pointer; margin: 2rem 0 1rem; outline: none; }
.btn-grande:focus { box-shadow: 0 0 0 .5rem rgba(245, 196, 0, .45); }
.grande-txt { font-size: 2.4rem; font-weight: 700; }
.erro-txt { color: #ff7b7b; font-size: 1.6rem; margin-top: 1rem; max-width: 60rem; }

/* ---- painel ---- */
.painel { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; }
.lateral { width: 27%; height: 100%; background: #10141a; border-right: .15rem solid #222a34; padding: 1rem 1.1rem; display: flex; flex-direction: column; overflow: hidden; }
.central { width: 73%; height: 100%; display: flex; flex-direction: column; padding: 1rem 1.6rem .6rem; overflow: hidden; }

.cab-lat { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; }
.logo { font-weight: 800; letter-spacing: .22em; color: #f5c400; font-size: 1.15rem; }
.relogio { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.bloco-cons { background: #161c24; border-radius: .9rem; padding: .8rem 1rem; margin-bottom: .6rem; }
.rot { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #8a94a3; font-weight: 600; }
.valor-gg { font-size: 3.1rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.linha-kpi { display: flex; justify-content: space-between; align-items: baseline; margin-top: .35rem; font-size: 1.15rem; gap: .5rem; }
.linha-kpi b { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.lojas-lat { flex: 0 0 auto; overflow: hidden; }
.loja-lat { display: flex; justify-content: space-between; align-items: center; padding: .38rem .2rem; border-bottom: .06rem solid #222a34; font-size: 1.05rem; }
.loja-lat .cod { font-weight: 800; width: 3.4rem; }
.loja-lat .fat { font-weight: 700; font-variant-numeric: tabular-nums; flex: 1; text-align: right; padding-right: .7rem; }
.loja-lat .mg { width: 4.4rem; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.lat-rod { margin-top: auto; padding-top: .5rem; display: flex; gap: .5rem; }
.mini-bloco { flex: 1; background: #161c24; border-radius: .8rem; padding: .55rem .8rem; }
.rot.sep { margin-top: .4rem; }
.bloco-mes { background: #161c24; border-radius: .9rem; padding: .6rem 1rem; margin-top: .5rem; }
.mini-bloco .n { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.cab-cen { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.titulo-tela { font-size: 2.3rem; font-weight: 800; letter-spacing: -.01em; }
.sub-tela { font-size: 1rem; color: #8a94a3; }
.pontos { display: flex; gap: .4rem; margin-top: .3rem; }
.ponto { width: .7rem; height: .7rem; border-radius: 50%; background: #2b313b; }
.ponto.at { background: #f5c400; }
.estado { text-align: right; }
.estado .linha { font-size: .95rem; color: #9aa4b2; margin-top: .25rem; }
.corpo-tela { flex: 1 1 auto; min-height: 0; overflow: hidden; position: relative; }
.rodape { margin-top: .5rem; height: 2.3rem; display: flex; align-items: center; gap: 1rem; overflow: hidden; }
.ticker { flex: 1; overflow: hidden; white-space: nowrap; font-size: 1.1rem; position: relative; }
.ticker-in { display: inline-block; padding-left: 100%; animation: rola 40s linear infinite; }
.ticker-in.parado { animation: none; padding-left: 0; }
@keyframes rola { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
.sem-som { font-weight: 800; color: #ffc457; background: #473410; border-radius: .6rem; padding: .2rem .8rem; font-size: 1rem; white-space: nowrap; }

/* faixa de aviso (desconexão/atraso) */
.faixa { background: #473410; color: #ffc457; border-radius: .6rem; padding: .35rem .9rem; font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.faixa.bad { background: #4a1616; color: #ff9a9a; }

/* ---- telas ---- */
.grade-lojas { display: flex; flex-wrap: wrap; gap: .8rem; align-content: flex-start; height: 100%; }
.grade-lojas { align-content: stretch; }
.card-loja { background: #161c24; border-radius: 1rem; padding: 1rem 1.2rem; width: calc(50% - .4rem); height: calc(50% - .4rem); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.grade-lojas.n1 .card-loja, .grade-lojas.n2 .card-loja, .grade-lojas.n3 .card-loja { justify-content: center; gap: 1.2rem; }
.grade-lojas.n1 .card-loja .fat, .grade-lojas.n2 .card-loja .fat, .grade-lojas.n3 .card-loja .fat { font-size: 4.6rem; margin: .8rem 0; }
.grade-lojas.n1 .card-loja .ln, .grade-lojas.n2 .card-loja .ln, .grade-lojas.n3 .card-loja .ln { padding: .7rem 0; font-size: 1.5rem; }
.grade-lojas.n1 .card-loja, .grade-lojas.n2 .card-loja { height: 100%; } .grade-lojas.n1 .card-loja { width: 100%; } .grade-lojas.n2 .card-loja { width: calc(50% - .4rem); }
.grade-lojas.n3 .card-loja { width: calc(33.33% - .55rem); height: 100%; }
.grade-lojas.n5 .card-loja, .grade-lojas.n6 .card-loja { width: calc(33.33% - .55rem); }
.grade-lojas.n7 .card-loja, .grade-lojas.n8 .card-loja { width: calc(25% - .6rem); }
.card-loja h3 { margin: 0; font-size: 2rem; display: flex; justify-content: space-between; align-items: baseline; }
.card-loja .nome { font-size: 1.1rem; color: #8a94a3; font-weight: 500; }
.card-loja .fat { font-size: 3.3rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.grade-lojas.n7 .card-loja .fat, .grade-lojas.n8 .card-loja .fat { font-size: 2.5rem; }
.card-loja .ln { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.35rem; padding: .25rem 0; border-top: .06rem solid #222a34; }
.card-loja .ln b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.barra { height: .5rem; background: #232b35; border-radius: .3rem; overflow: hidden; margin: .25rem 0 .5rem; }
.barra i { display: block; height: 100%; background: #f5c400; }

.dois-col { display: flex; gap: 1.2rem; height: 100%; }
.dois-col > div { flex: 1 1 50%; min-width: 0; background: #161c24; border-radius: 1rem; padding: .9rem 1.1rem; overflow: hidden; }
.dois-col h4, .tit-bloco { margin: 0 0 .9rem; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .08em; color: #8a94a3; }
.barra-h { margin-bottom: 1rem; }
.barra-h .barra { height: .7rem; }
.barra-h .t { display: flex; justify-content: space-between; font-size: 1.55rem; }
.barra-h .t b { font-variant-numeric: tabular-nums; }
.tipo-linha { display: flex; align-items: center; gap: .9rem; padding: .85rem 0; border-bottom: .06rem solid #222a34; font-size: 1.5rem; }
.tipo-linha .n { width: 2.6rem; height: 2.6rem; flex: none; border-radius: 50%; background: #f5c400; color: #111; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tipo-linha .nm { width: 9rem; font-weight: 700; flex: none; }
.tipo-linha .vals { flex: 1; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

table.tab { width: 100%; border-collapse: collapse; font-size: 1.6rem; }
table.tab th { text-align: right; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; color: #8a94a3; padding: .35rem .6rem; border-bottom: .12rem solid #2b313b; }
table.tab td { padding: .85rem .6rem; text-align: right; border-bottom: .06rem solid #222a34; font-variant-numeric: tabular-nums; }
table.tab th.l, table.tab td.l { text-align: left; }
table.tab td.prod { font-weight: 600; max-width: 34rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk { display: inline-block; width: 1.7rem; height: 1.7rem; line-height: 1.7rem; border-radius: 50%; background: #2b313b; text-align: center; font-weight: 800; font-size: 1rem; margin-right: .6rem; }

.kpis { display: flex; gap: .9rem; margin-bottom: .9rem; }
.kpi { flex: 1; background: #161c24; border-radius: 1rem; padding: .8rem 1.1rem; }
.kpi .v { font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.clima-grade { display: flex; flex-wrap: wrap; gap: .9rem; height: 100%; align-content: stretch; }
.clima-card { background: #161c24; border-radius: 1rem; padding: 1.2rem 1.4rem; width: calc(33.33% - .6rem); height: calc(100% - 2rem); display: flex; flex-direction: column; justify-content: center; }
.clima-grade.c4 .clima-card { width: calc(50% - .5rem); height: calc(50% - 1.3rem); }
.clima-card .temp { font-size: 8rem; font-weight: 800; line-height: 1; }
.clima-card .grande-txt { font-size: 2.8rem; } .clima-card .mini { font-size: 1.2rem; margin-top: .6rem; }
.clima-grade > .mini { width: 100%; }
.noticia { background: #161c24; border-radius: 1rem; padding: 1.1rem 1.4rem; margin-bottom: .9rem; }
.noticia .tt { font-size: 2.1rem; font-weight: 700; line-height: 1.25; }
.vazio-tela { color: #9aa4b2; font-size: 1.6rem; padding: 2rem; }

/* alerta em tela cheia (faixa grande sobre o painel) */
.alerta-ov { position: absolute; left: 0; right: 0; top: 0; z-index: 20; padding: 1.1rem 2rem; display: flex; align-items: center; gap: 1.4rem; font-weight: 800; animation: pisca 1s linear infinite; }
.alerta-ov.alta { background: #b3141b; color: #fff; } .alerta-ov.media { background: #c47a00; color: #fff; }
.alerta-ov .ic { font-size: 3rem; } .alerta-ov .tx { font-size: 2.1rem; line-height: 1.15; } .alerta-ov .dt { font-size: 1.25rem; font-weight: 500; opacity: .95; margin-top: .2rem; }
@keyframes pisca { 0% { filter: brightness(1); } 50% { filter: brightness(1.25); } 100% { filter: brightness(1); } }

/* ======================= VISUAL "VIDEO WALL" (widescreen) ======================= */
html, body { background: #05080d; }
#raiz { background: radial-gradient(120% 90% at 15% 0%, #0f2038 0%, #070b12 55%, #04060a 100%); }
#raiz::before { content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(rgba(80,140,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(80,140,255,.05) 1px, transparent 1px); background-size: 4rem 4rem; }
.painel { z-index: 1; }
.lateral { width: 25%; background: linear-gradient(180deg, rgba(14,24,40,.92), rgba(8,12,20,.92)); border-right: .08rem solid rgba(90,150,255,.25); box-shadow: .4rem 0 2rem rgba(0,0,0,.5); }
.central { width: 75%; padding: 1rem 1.8rem .6rem; }
@media (min-aspect-ratio: 21/10) { .lateral { width: 21%; } .central { width: 79%; } }
.logo { font-size: 1.25rem; text-shadow: 0 0 1rem rgba(245,196,0,.6); }
.relogio { font-size: 2.2rem; letter-spacing: .02em; text-shadow: 0 0 1rem rgba(120,180,255,.5); }
.bloco-cons, .mini-bloco, .bloco-mes, .card-loja, .dois-col > div, .kpi, .clima-card, .noticia { background: linear-gradient(145deg, rgba(24,38,62,.85), rgba(13,20,33,.9)); border: .06rem solid rgba(110,165,255,.22); box-shadow: 0 .4rem 1.6rem rgba(0,0,0,.45), inset 0 .06rem 0 rgba(255,255,255,.05); }
.bloco-cons { border-color: rgba(245,196,0,.45); box-shadow: 0 0 2rem rgba(245,196,0,.12), 0 .4rem 1.6rem rgba(0,0,0,.5); }
.valor-gg { font-size: 3.6rem; background: linear-gradient(180deg, #fff 30%, #9fc4ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.titulo-tela { font-size: 2.8rem; letter-spacing: -.02em; text-shadow: 0 0 1.4rem rgba(120,180,255,.35); }
.ponto.at { background: #f5c400; box-shadow: 0 0 .8rem #f5c400; width: 1.6rem; border-radius: .4rem; }
.ponto { transition: width .3s; }
.pill.ok { box-shadow: 0 0 .9rem rgba(91,224,138,.35); }
.barra { background: rgba(120,160,230,.15); } .barra i { background: linear-gradient(90deg, #f5c400, #ffdf6a); box-shadow: 0 0 .8rem rgba(245,196,0,.6); }
.pos { color: #4be27f; text-shadow: 0 0 .8rem rgba(75,226,127,.25); } .neg { color: #ff5c5c; text-shadow: 0 0 .8rem rgba(255,92,92,.3); } .amb { color: #ffc03a; }
table.tab th { border-bottom: .12rem solid rgba(110,165,255,.35); } table.tab tr:nth-child(even) td { background: rgba(120,160,230,.05); }
.ticker { border-top: .06rem solid rgba(110,165,255,.2); padding-top: .2rem; }
.card-loja .fat { background: linear-gradient(180deg, #fff 35%, #a9c9ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grafico { display: flex; align-items: center; gap: 1.6rem; } .grafico svg { flex: none; filter: drop-shadow(0 0 .8rem rgba(80,150,255,.35)); }
.anel-txt { font-weight: 800; fill: #fff; font-family: inherit; }
.legenda { flex: 1; min-width: 0; }
.alerta-ov { box-shadow: 0 0 3rem rgba(255,0,0,.55); border-bottom: .2rem solid rgba(255,255,255,.7); }

/* ---- faixas rolantes (temperatura no topo, notícias no rodapé) ---- */
.painel { top: 2.5rem; }
.topo { position: absolute; left: 0; right: 0; top: 0; height: 2.5rem; z-index: 2; overflow: hidden; white-space: nowrap; display: flex; align-items: center; background: linear-gradient(180deg, rgba(8,14,26,.98), rgba(12,22,40,.95)); border-bottom: .08rem solid rgba(110,165,255,.3); font-size: 1.15rem; }
.ticker { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 1.1rem; position: relative; }
.marq-in { display: inline-block; white-space: nowrap; will-change: transform; -webkit-animation: marq 60s linear infinite; animation: marq 60s linear infinite; }
@-webkit-keyframes marq { from { -webkit-transform: translateX(0); } to { -webkit-transform: translateX(-50%); } }
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.mq-cod { color: #ffd23a; font-weight: 800; } .mq-cid { color: #cfd9ea; } .mq-temp { color: #fff; font-weight: 800; } .mq-det { color: #8ea3c4; } .mq-sep { color: #3d5a8a; }
.mq-rot { color: #0b1220; background: #ffd23a; font-weight: 800; padding: 0 .5rem; border-radius: .2rem; } .mq-not { color: #e9f0ff; }
.mq-alerta { color: #ff6b6b; font-weight: 700; } .mq-aviso { color: #ffc03a; font-weight: 700; }
