@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-Medium.ttf") format("truetype"); font-weight: 500; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/BarlowCondensed-ExtraBold.ttf") format("truetype"); font-weight: 800; }

:root {
  --bg: #070b14; --painel: #0f1626; --painel2: #131c30; --linha: #1f2a42;
  --txt: #f3f6fb; --sub: #8d9bb5; --fraco: #4b5874;
  --cnc: #3b8bff; --edge: #b06bff; --custom: #ffb020; --asm: #18d49a; --pack: #ff4fa3;
  --atraso: #ff4d4d; --entrega: #22d3ee; --instal: #a3e635; --ok: #34d399;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--bg); color: var(--txt);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif; cursor: none; -webkit-font-smoothing: antialiased; }
body::before { /* brilho de fundo animado, sutil */
  content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(40% 35% at 20% 10%, rgba(59,139,255,.13), transparent 70%),
              radial-gradient(35% 30% at 85% 90%, rgba(176,107,255,.10), transparent 70%);
  animation: deriva 40s ease-in-out infinite alternate; }
@keyframes deriva { to { transform: translate(4%, -3%) rotate(3deg); } }

#tela { position: relative; z-index: 1; width: 1920px; height: 1080px; padding: 20px 28px 12px;
  display: grid; grid-template-rows: 88px 118px 1fr 206px 30px; gap: 14px; }
.oculto { display: none !important; }

/* Cores por etapa / tipo (classes, sem style inline) */
.e-cnc { --c: var(--cnc); --sc: var(--cnc); --cc: var(--cnc); }
.e-edge { --c: var(--edge); --sc: var(--edge); --cc: var(--edge); }
.e-custom { --c: var(--custom); --sc: var(--custom); --cc: var(--custom); }
.e-asm { --c: var(--asm); --sc: var(--asm); --cc: var(--asm); }
.e-pack { --c: var(--pack); --sc: var(--pack); --cc: var(--pack); }
.t-entrega { --cc: var(--entrega); } .t-instal { --cc: var(--instal); }
.barraEtapas div { background: var(--c); }

/* Topo */
#topo { position: relative; display: flex; align-items: center; justify-content: space-between; }
.marca { display: flex; align-items: center; gap: 24px; }
.nuvo { font-weight: 800; font-size: 76px; letter-spacing: 14px; line-height: 1;
  background: linear-gradient(90deg, #fff, #b9c7e6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sep { width: 4px; height: 62px; border-radius: 2px; background: linear-gradient(var(--cnc), var(--edge), var(--custom), var(--asm), var(--pack)); }
.titulo { display: flex; flex-direction: column; line-height: 1; }
.t1 { font-size: 46px; font-weight: 700; letter-spacing: 6px; }
.t2 { font-size: 26px; font-weight: 600; color: var(--sub); letter-spacing: 3px; margin-top: 6px; }
.relogio { text-align: right; line-height: 1; }
.hora { font-size: 80px; font-weight: 700; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.sub { display: flex; gap: 22px; justify-content: flex-end; font-size: 26px; color: var(--sub); font-weight: 600; margin-top: 2px; }
.atual { display: inline-flex; align-items: center; gap: 8px; }
.ponto { width: 13px; height: 13px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: pulsoVerde 2.4s infinite; }
.atual.velho .ponto { background: var(--custom); animation-name: pulsoAmbar; }
.atual.erro .ponto { background: var(--atraso); animation-name: pulsoVerm; }
@keyframes pulsoVerde { 70% { box-shadow: 0 0 0 12px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@keyframes pulsoAmbar { 70% { box-shadow: 0 0 0 12px rgba(255,176,32,0); } 100% { box-shadow: 0 0 0 0 rgba(255,176,32,0); } }
@keyframes pulsoVerm { 70% { box-shadow: 0 0 0 12px rgba(255,77,77,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,77,0); } }
.aviso { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 26px; border-radius: 40px;
  font-size: 26px; font-weight: 600; letter-spacing: 1px; background: rgba(255,176,32,.12); color: #ffcf70; border: 2px solid rgba(255,176,32,.45); white-space: nowrap; }
.aviso.erro { background: rgba(255,77,77,.12); color: #ff9a9a; border-color: rgba(255,77,77,.5); }
#rotacao { position: absolute; left: 0; right: 0; bottom: -9px; height: 3px; background: var(--linha); border-radius: 2px; overflow: hidden; }
#rotacao i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cnc), var(--pack)); }
#rotacao.anda i { animation: enche var(--dur, 15s) linear forwards; }
@keyframes enche { from { width: 0 } to { width: 100% } }

/* KPIs */
#kpis { display: grid; grid-template-columns: 1.9fr 1fr 1fr 1fr 1fr; gap: 16px; }
.kpi { background: linear-gradient(180deg, var(--painel2), var(--painel)); border: 1px solid var(--linha); border-radius: 22px;
  display: flex; align-items: center; gap: 20px; padding: 14px 26px; position: relative; overflow: hidden; }
.kpi .num { font-size: 92px; font-weight: 800; line-height: .9; font-variant-numeric: tabular-nums; }
.kpi .rot { font-size: 24px; font-weight: 700; letter-spacing: 2.5px; color: var(--sub); }
.kpi.principal { flex-direction: column; align-items: stretch; justify-content: center; gap: 4px; }
.kpi.principal .linha { display: flex; align-items: center; gap: 26px; }
.kpi.principal .num { font-size: 96px; }
.barraEtapas { flex: 1; display: flex; height: 46px; border-radius: 12px; overflow: hidden; gap: 4px; }
.barraEtapas div { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: #071022;
  transition: flex-grow 1.2s cubic-bezier(.2,.8,.2,1); min-width: 0; }
.kpi .ico { width: 70px; height: 70px; flex: none; }
.kpi .ico svg { width: 100%; height: 100%; }
.kpi.atraso .num { color: var(--atraso); } .kpi.atraso .ico { color: var(--atraso); }
.kpi.atraso.tem { border-color: rgba(255,77,77,.55); box-shadow: inset 0 0 40px rgba(255,77,77,.12); animation: alertaKpi 3s ease-in-out infinite; }
@keyframes alertaKpi { 50% { box-shadow: inset 0 0 60px rgba(255,77,77,.25); } }
.kpi.entrega .num, .kpi.entrega .ico { color: var(--entrega); }
.kpi.instal .num, .kpi.instal .ico { color: var(--instal); }
.kpi.pronto .num, .kpi.pronto .ico { color: var(--ok); }

/* Lanes */
#lanes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; min-height: 0; }
.lane { background: rgba(15,22,38,.85); border: 1px solid var(--linha); border-radius: 22px; display: flex; flex-direction: column;
  min-height: 0; overflow: hidden; position: relative; }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--c); box-shadow: 0 0 24px var(--c); }
.laneTopo { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.laneNome { font-size: 34px; font-weight: 800; letter-spacing: 2px; color: var(--c); line-height: 1; }
.laneDir { display: flex; align-items: center; gap: 12px; }
.laneQtd { font-size: 58px; font-weight: 800; line-height: .9; font-variant-numeric: tabular-nums; }
.pags { display: flex; flex-direction: column; gap: 5px; }
.pags i { width: 12px; height: 12px; border-radius: 50%; background: var(--fraco); transition: background .4s; }
.pags i.on { background: var(--c); box-shadow: 0 0 8px var(--c); }
.cards { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 6px 14px 14px; min-height: 0; }
.card { position: relative; background: linear-gradient(180deg, #172238, #121a2c); border: 1px solid #23304b; border-left: 7px solid var(--c);
  border-radius: 16px; padding: 10px 16px 12px 16px; height: var(--h, 104px); display: flex; flex-direction: column; justify-content: space-between;
  animation: entra .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes entra { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.card.sai { animation: sai .45s ease-in both; }
@keyframes sai { to { opacity: 0; transform: translateY(-12px); } }
.card.atrasado { border-left-color: var(--atraso); box-shadow: 0 0 0 1px rgba(255,77,77,.35), 0 0 26px rgba(255,77,77,.10); }
.cardL1 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cliente { font-size: 40px; font-weight: 700; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .5px; }
.numero { font-size: 30px; font-weight: 600; color: var(--sub); flex: none; font-variant-numeric: tabular-nums; }
.cardL2 { display: flex; align-items: center; gap: 12px; }
.pipe { flex: 1; display: flex; gap: 5px; }
.pipe i { flex: 1; height: 16px; border-radius: 8px; background: #26324d; position: relative; overflow: hidden; }
.pipe i.feito { background: var(--sc); opacity: .9; }
.pipe i.ausente { background: transparent; border: 2px dashed #2a3654; }
.pipe i.atual { background: var(--sc); animation: pulsa 1.6s ease-in-out infinite; }
.pipe i.atual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  transform: translateX(-100%); animation: brilho 2.2s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .45; box-shadow: 0 0 14px var(--sc); } }
@keyframes brilho { to { transform: translateX(100%); } }
.prazo { font-size: 24px; font-weight: 700; padding: 2px 12px; border-radius: 10px; background: #1f2a42; color: #c9d4ea; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prazo.hoje { background: rgba(255,176,32,.18); color: #ffd27a; }
.prazo.late { background: var(--atraso); color: #fff; animation: piscaAtraso 2s ease-in-out infinite; }
@keyframes piscaAtraso { 50% { background: #b82e2e; } }
.lane.vazia .cards { align-items: center; justify-content: center; }
.livre { font-size: 30px; font-weight: 700; letter-spacing: 4px; color: var(--fraco); border: 2px dashed var(--linha); border-radius: 18px; padding: 26px 30px; text-align: center; }

/* Semana */
#semana { background: rgba(15,22,38,.85); border: 1px solid var(--linha); border-radius: 22px; display: grid; grid-template-columns: 70px 1fr; overflow: hidden; }
.semTitulo { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800; letter-spacing: 3px; white-space: nowrap; color: var(--sub); background: #0c1322; border-right: 1px solid var(--linha); }
.dias { display: grid; grid-template-columns: repeat(7, 1fr); }
.dia { border-right: 1px solid var(--linha); padding: 10px 10px; display: flex; flex-direction: column; gap: 7px; min-width: 0; position: relative; }
.dia:last-child { border-right: 0; }
.dia.passado { opacity: .55; }
.dia.hoje { background: linear-gradient(180deg, rgba(59,139,255,.16), rgba(59,139,255,.04)); box-shadow: inset 0 0 0 2px rgba(59,139,255,.55); }
.diaTopo { display: flex; align-items: baseline; justify-content: space-between; font-weight: 800; }
.diaNome { font-size: 26px; letter-spacing: 2px; color: var(--sub); }
.dia.hoje .diaNome { color: #fff; }
.diaNum { font-size: 30px; }
.tagHoje { font-size: 18px; letter-spacing: 2px; background: var(--cnc); color: #fff; border-radius: 6px; padding: 1px 8px; margin-left: 8px; animation: pulsa2 2s infinite; }
@keyframes pulsa2 { 50% { opacity: .6; } }
.chip { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 9px;
  background: color-mix(in srgb, var(--cc) 16%, #0f1626); border: 1px solid color-mix(in srgb, var(--cc) 45%, transparent);
  font-size: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; animation: entra .6s both; animation-delay: calc(var(--i,0) * 60ms); }
.chip svg { width: 22px; height: 22px; flex: none; color: var(--cc); }
.chip .bol { width: 12px; height: 18px; border-radius: 3px; background: var(--cc); flex: none; margin-right: -4px; }
.chip .bol:last-of-type { margin-right: 2px; }
.chip .nm { overflow: hidden; text-overflow: ellipsis; }
.chip.feito { opacity: .5; }
.chip.feito .nm { text-decoration: line-through; text-decoration-thickness: 2px; }
.mais { font-size: 23px; font-weight: 700; color: var(--sub); padding-left: 6px; }

#vazio { position: absolute; inset: 0; z-index: 5; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
#vazio div { font-size: 160px; font-weight: 800; letter-spacing: 30px; color: #2a3654; }
#vazio p { font-size: 44px; color: var(--sub); font-weight: 600; }

/* v4: logo do portal 3D, dados do Asana nos cards, rodapé de fonte */
.logo { height: 66px; width: auto; display: block; }
.cardT { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task { flex: 1; min-width: 0; font-size: 21px; font-weight: 500; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st { flex: none; font-size: 19px; font-weight: 700; color: #ffd27a; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.4); border-radius: 8px; padding: 0 8px; white-space: nowrap; }
#rodape { display: flex; align-items: center; justify-content: space-between; font-size: 22px; color: var(--sub); font-weight: 600; }
#fonteTxt { display: inline-flex; align-items: center; gap: 10px; }
#fonteTxt .ponto { width: 12px; height: 12px; }
#fonteTxt.velho { color: #ffcf70; } #fonteTxt.velho .ponto { background: var(--custom); animation-name: pulsoAmbar; }
#fonteTxt.erro { color: #ff9a9a; } #fonteTxt.erro .ponto { background: var(--atraso); animation-name: pulsoVerm; }
.criterio { font-size: 18px; color: var(--fraco); font-weight: 500; }
.cardL1 .cliente { flex: 1; min-width: 0; }
.kpi .num { font-size: 80px; }
.kpi.principal .num { font-size: 86px; }
.kpi .rot { font-size: 22px; letter-spacing: 2px; line-height: 1.1; }
.kpi .ico { width: 60px; height: 60px; }
.card { padding: 9px 14px 11px 16px; }
.cliente { font-size: 36px; }

/* Filtro de colunas (engrenagem discreta; painel só na configuração) */
#btnColunas { position: absolute; right: 22px; bottom: 10px; z-index: 25;
  width: 36px; height: 36px; padding: 6px; border: 0; border-radius: 10px;
  background: transparent; color: #8a97b3; opacity: .16; cursor: pointer; }
#btnColunas svg { width: 100%; height: 100%; display: block; }
#btnColunas:hover, #btnColunas:focus-visible,
body.modo-config #btnColunas, body.painel-aberto #btnColunas {
  opacity: 1; background: rgba(20, 28, 46, .9); color: #e8eefc; }
#painelColunas { position: absolute; top: 18px; right: 18px; bottom: 18px; width: 440px; z-index: 30;
  display: flex; flex-direction: column; gap: 12px;
  background: #121a2c; border: 1px solid #2b3b5c; border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55); padding: 22px 22px 18px; color: #e8eefc; }
#painelColunas.oculto { display: none !important; }
.painelCab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.painelCab h2 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: 1px; }
#fecharColunas { width: 40px; height: 40px; border: 0; border-radius: 10px; background: #1b2740;
  color: #c9d4ea; font-size: 28px; line-height: 1; cursor: pointer; }
#fecharColunas:hover, #fecharColunas:focus-visible { background: #243250; }
.painelAjuda { margin: 0; font-size: 16px; line-height: 1.35; color: var(--sub); font-weight: 500; }
.painelAjuda code { font-family: inherit; color: #c9d4ea; }
#listaColunas { flex: 1; overflow: auto; min-height: 0; padding-right: 6px; }
.chk { display: flex; align-items: center; gap: 12px; padding: 7px 4px; cursor: pointer; font-size: 20px; font-weight: 600; }
.chk input { width: 22px; height: 22px; accent-color: var(--ok, #3ecf8e); flex: none; }
.chkNome { min-width: 0; }
.grupoFin { margin-top: 10px; padding-top: 12px; border-top: 1px solid #2b3b5c; }
.avisoFin { font-size: 14px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: #ffd27a; margin: 0 0 8px; }
.chk.fin .chkNome { color: #f0e2c0; }
.painelAcoes { display: flex; gap: 10px; justify-content: space-between; padding-top: 8px; }
.painelAcoes button { border: 1px solid #2b3b5c; background: #1b2740; color: #e8eefc;
  font: inherit; font-size: 16px; font-weight: 700; padding: 10px 14px; border-radius: 12px; cursor: pointer; }
.painelAcoes .btnPrim { background: #243e6a; border-color: #3a5a8c; }
.painelAcoes button:hover, .painelAcoes button:focus-visible { filter: brightness(1.15); }

.campos { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.campo { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.campo .lb { flex: none; max-width: 58%; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campo .vl { min-width: 0; font-size: 18px; font-weight: 650; color: #d7dfef;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.campo.fin .vl { color: #f0e2c0; }
