:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  color: var(--tinta);
  background: var(--fundo);
  --papel: #fff;
  --fundo: #f5f7fb;
  --tinta: #1c2540;
  --suave: #526078;
  --borda: #dce3f0;
  --azul: #465fb4;
  --azul-escuro: #2c458f;
  --azul-claro: #ebf0ff;
  --raio: 16px;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--azul-escuro); text-decoration: none; }
a:hover { color: var(--azul); }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #547aeb; outline-offset: 3px; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2, strong { line-height: 1.16; }
h1 { font-size: clamp(1.95rem, 3vw, 2.6rem); letter-spacing: -.052em; }
h2 { font-size: 1.24rem; letter-spacing: -.026em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.muted, small { color: var(--suave); }
.icone { display: inline-block; flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }

.topo { border-bottom: 1px solid var(--borda); background: var(--papel); }
.topo-interno { display: flex; align-items: center; gap: 26px; margin: auto; width: min(100% - 64px, 1392px); min-height: 76px; }
.marca { display: inline-grid; justify-items: start; gap: 4px; flex: none; }
.marca-logo { display: block; width: 148px; height: auto; }
.marca-texto { color: var(--suave); font-size: .78rem; line-height: 1.1; font-weight: 650; }
.topo nav { display: flex; flex: 1; gap: 3px; align-items: center; overflow: auto; scrollbar-width: thin; }
.topo nav a { display: inline-flex; flex: none; gap: 5px; align-items: center; color: var(--suave); font-weight: 620; font-size: .88rem; white-space: nowrap; padding: 9px 10px; border-radius: 8px; }
.topo nav a:hover, .topo nav a[aria-current] { background: var(--azul-claro); color: var(--azul-escuro); }
.contador { display: inline-grid; place-items: center; min-width: 19px; height: 19px; border-radius: 20px; background: #a73544; color: #fff; font-size: .74rem; padding-inline: 4px; }
.topo-acoes { display: flex; margin-left: auto; align-items: center; gap: 12px; }
.perfil-topo { display: flex; align-items: center; gap: 9px; color: var(--tinta); font-size: .88rem; font-weight: 700; white-space: nowrap; }
.perfil-topo > span:nth-child(2) { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.perfil-topo small { display: block; font-weight: 500; margin-top: 1px; font-size: .75rem; }
.perfil-topo .avatar { width: 36px; height: 36px; font-size: .85rem; }
.botao-icone { display: inline-grid; place-items: center; width: 39px; height: 39px; padding: 0; border: 1px solid var(--borda); border-radius: 9px; background: #fff; color: var(--suave); cursor: pointer; }
.botao-icone:hover { background: var(--azul-claro); }

.conteudo { width: min(100% - 64px, 1320px); margin: 0 auto; padding: 40px 0 56px; }
.titulo { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; margin-bottom: 26px; }
.titulo p, .secao-topo p { margin-top: 7px; color: var(--suave); }
.titulo p:first-letter { text-transform: uppercase; }
.acoes, .filtros { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.botao { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px; color: var(--tinta); border: 1px solid transparent; border-radius: 9px; cursor: pointer; background: #fff; font-size: .9rem; font-weight: 660; text-align: center; }
.botao .icone { width: 17px; height: 17px; }
.primario { background: var(--azul); color: #fff; }
.primario:hover { background: var(--azul-escuro); color: #fff; }
.secundario { border-color: #cdd7eb; }
.secundario:hover { background: var(--azul-claro); color: var(--azul-escuro); border-color: #abbbe0; }
.suave { background: var(--azul-claro); color: var(--azul-escuro); }
.suave:hover { background: #dae4fd; }
.perigo { background: #a33343; color: #fff; }
.perigo:hover { background: #842333; }
.pequeno { min-height: 34px; font-size: .84rem; padding: 5px 10px; }
.largo { width: 100%; }
.selo-local { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px; background: var(--azul-claro); color: var(--azul-escuro); font-weight: 670; font-size: .83rem; white-space: nowrap; }
.selo-local .icone { width: 16px; height: 16px; }

.cartao { background: var(--papel); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: 0 2px 5px #283d7210; }
.estatisticas { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.estatisticas.seis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.estatistica { display: grid; gap: 4px; padding: 17px 18px; min-height: 151px; align-content: start; color: var(--tinta); }
.estatistica .estat-icone { display: grid; place-items: center; height: 34px; width: 34px; border-radius: 9px; background: var(--azul-claro); color: var(--azul-escuro); margin-bottom: 4px; }
.estat-icone .icone { width: 18px; height: 18px; }
.estatistica .estat-icone.verde, .estatistica .estat-icone.positivo { color: #20624b; background: #e2f4ea; }
.estatistica .estat-icone.azul { color: #315b83; background: #e7f0fa; }
.estatistica .estat-icone.amarelo { color: #824f0a; background: #fff2d9; }
.estatistica .estat-icone.vermelho { color: #9c3645; background: #fae9ed; }
.estatistica .estat-icone.neutro { color: #556581; background: #edf0f6; }
.estat-rotulo { font-size: .9rem; color: var(--suave); font-weight: 650; }
.estatistica strong { font-size: clamp(1.35rem, 2.6vw, 2.22rem); font-weight: 725; letter-spacing: -.055em; }
.estatistica small { font-size: .79rem; }
.estat-link { color: var(--tinta); }
.estat-link .cartao { height: 100%; }
.estat-link:hover .cartao, .pessoa:hover { border-color: #a2b4e3; }
.secao { margin-top: 30px; }
.secao-topo { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 15px; }
.secao-topo p { font-size: .9rem; margin-top: 4px; }
.grade-pessoas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pessoa { display: flex; flex-direction: column; min-width: 0; padding: 16px 16px 13px; color: var(--tinta); }
.pessoa:hover { color: var(--tinta); }
.pessoa-topo { display: flex; align-items: center; gap: 10px; }
.pessoa-nome { min-width: 0; flex: 1; display: grid; gap: 4px; }
.pessoa-nome strong { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa-nome > span, .pessoa-marcas > span { color: var(--suave); font-size: .8rem; }
.avatar { flex: none; display: inline-grid; place-items: center; height: 42px; width: 42px; border-radius: 50%; background: #e2ebfc; color: #345297; font-size: .88rem; font-weight: 730; }
.cor-1 { background: #e5eaf8; color: #3e5489; }
.cor-2 { background: #ffebdf; color: #874e36; }
.cor-3 { background: #e0f1f2; color: #26636c; }
.cor-4 { background: #f3e7f3; color: #744677; }
.cor-5 { background: #f3eddc; color: #6d5b24; }
.etiqueta { display: inline-flex; align-items: center; min-height: 24px; border-radius: 14px; padding: 3px 8px; font-size: .78rem; line-height: 1.25; font-weight: 710; white-space: nowrap; }
.etiqueta.verde { color: #20624b; background: #e2f4ea; }
.etiqueta.amarelo { color: #764805; background: #fff0d2; }
.etiqueta.vermelho { color: #912f40; background: #fbe8ed; }
.etiqueta.azul { color: #305b84; background: #e6eff9; }
.etiqueta.neutro { color: var(--suave); background: #edf0f6; }
.pessoa-dados { padding: 12px 0; color: var(--suave); border-bottom: 1px solid #ebeff7; font-size: .86rem; }
.pessoa-dados span { display: flex; align-items: center; gap: 7px; }
.pessoa-dados .icone { width: 16px; height: 16px; color: var(--azul); }
.pessoa-dados strong { color: var(--tinta); margin-left: auto; }
.pessoa-marcas { display: flex; gap: 7px 13px; justify-content: space-between; padding-top: 10px; align-items: center; min-height: 35px; flex-wrap: wrap; }
.marcas-hoje { display: flex; gap: 4px; flex-wrap: wrap; }
.hora-tag { display: inline-block; color: #3b4b70; background: #eef2fa; padding: 2px 6px; border-radius: 5px; font-size: .8rem; font-weight: 660; margin-bottom: 2px; }
.hora-tag.ajuste { background: #e6effb; color: #275c92; }
.desconsiderada { color: var(--suave); text-decoration: line-through; }
.vazio, .carregamento { padding: 36px 20px; text-align: center; color: var(--suave); }
.vazio { grid-column: 1 / -1; border-radius: var(--raio); border: 1px dashed #c5d1ea; background: #f9faff; }
.vazio .icone { width: 24px; height: 24px; margin-bottom: 6px; color: var(--azul); }

.filtros label, .form label { display: grid; gap: 5px; font-size: .9rem; font-weight: 640; }
.filtros input, .filtros select, .form input:not([type=checkbox]), .form select, .form textarea {
  display: block; width: 100%; min-height: 42px; background: #fff; padding: 8px 10px; border: 1px solid #cdd7eb; border-radius: 8px; font-weight: 500;
}
.filtros select, .form select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23526078' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.filtros .com-icone { position: relative; }
.com-icone .icone { position: absolute; width: 17px; height: 17px; inset: 12px auto auto 10px; color: var(--suave); }
.filtros .com-icone input { padding-left: 34px; min-width: 182px; }
.faixa { margin-bottom: 17px; }
.aviso-caixa { display: flex; align-items: center; gap: 9px; padding: 11px 14px; background: var(--azul-claro); border-radius: 9px; color: var(--azul-escuro); margin-bottom: 16px; font-size: .9rem; }
.aviso-erro { color: #842333; background: #fbe8ed; }
.aviso-caixa .icone { width: 18px; height: 18px; }

.ponto-grade, .conta-grade { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.relogio-cartao { align-self: start; display: grid; justify-items: center; gap: 7px; padding: clamp(23px, 5vw, 55px) 18px; text-align: center; }
.relogio-icone { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: var(--azul-claro); color: var(--azul-escuro); margin-bottom: 8px; }
.relogio-icone .icone { width: 35px; height: 35px; }
.relogio-cartao p:first-letter { text-transform: uppercase; }
.relogio-cartao time { font-size: clamp(3rem, 8vw, 5.1rem); font-weight: 700; line-height: 1.05; letter-spacing: -.07em; color: var(--azul-escuro); }
.relogio-cartao .muted { font-size: .84rem; }
.registrar { margin-top: 18px; min-width: min(100%, 255px); min-height: 52px; font-size: 1rem; }
.ajuste-link { margin-top: 10px; font-weight: 620; text-decoration: underline; text-underline-offset: 3px; font-size: .9rem; }
.painel-lista { align-self: start; padding: 21px; }
.painel-lista > .secao-topo > .icone { color: var(--azul); }
.linha-tempo { list-style: none; padding: 0; margin: 0; }
.linha-tempo li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--borda); }
.linha-tempo-icone { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--azul-claro); color: var(--azul-escuro); }
.linha-tempo-icone .icone { width: 17px; height: 17px; }
.linha-tempo time { margin-left: auto; font-weight: 700; }
.linha-tempo small { display: block; }
.hash { overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .86rem; }

.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 14px; border-bottom: 1px solid #e8edf7; font-size: .89rem; white-space: nowrap; }
th { color: var(--suave); background: #edf1fa; font-size: .83rem; font-weight: 720; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: #f9faff; }
td small { display: block; font-size: .79rem; }
.linha-futura td { color: var(--suave); }
.celula-marcas { min-width: 160px; white-space: normal; }
.celula-alertas, .celula-texto { white-space: normal; min-width: 150px; max-width: 340px; overflow-wrap: anywhere; }
.celula-alertas span { display: block; font-size: .8rem; color: #754608; }
.positivo { color: #1b6e54; font-weight: 720; }
.negativo { color: #a33343; font-weight: 720; }
.link-tabela { display: block; margin-top: 3px; font-size: .81rem; text-decoration: underline; text-underline-offset: 2px; }
.link-tabela.principal { font-weight: 720; font-size: .9rem; }
.pessoa-celula { display: flex; gap: 9px; align-items: center; }
.pessoa-celula .avatar { width: 34px; height: 34px; font-size: .78rem; }
.abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.abas a { padding: 8px 13px; background: #fff; border: 1px solid var(--borda); border-radius: 8px; font-size: .9rem; font-weight: 650; }
.abas a[aria-current] { background: var(--azul); color: #fff; border-color: var(--azul); }
.formulario-cartao { padding: 21px; }
.formulario-cartao > h2 { margin-bottom: 16px; }
.form { display: grid; gap: 14px; }
.form-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grade.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grade.quatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form textarea { resize: vertical; }
.form > .botao:not(.largo) { justify-self: start; }
.form fieldset { margin: 0; min-width: 0; border: 1px solid var(--borda); border-radius: 10px; padding: 11px; }
.form legend { font-weight: 720; padding: 0 6px; }
.form .muted { font-size: .85rem; margin-block: 6px; }
.checks { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.checks label { display: inline-flex; gap: 4px; align-items: center; }
.checks input { accent-color: var(--azul); width: 17px; height: 17px; }
.detalhes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.detalhes dt { font-size: .81rem; color: var(--suave); }
.detalhes dd { font-weight: 650; overflow-wrap: anywhere; }
.span-total { grid-column: 1 / -1; }
.ano-atual { padding-inline: 8px; font-size: 1.1rem; }

dialog { width: min(100% - 24px, 520px); max-height: calc(100dvh - 32px); border: 1px solid var(--borda); border-radius: 16px; color: var(--tinta); padding: 20px; box-shadow: 0 18px 60px #1c2f6440; }
dialog.janela-larga { width: min(100% - 24px, 760px); }
dialog::backdrop { background: #18264aa8; }
.janela-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.janela-sub { color: var(--suave); margin-bottom: 14px; }
.senha-temporaria { display: inline-block; color: var(--azul-escuro); background: var(--azul-claro); padding: 8px 10px; border-radius: 8px; font-size: 1rem; }
.avisos { z-index: 3; position: fixed; inset: auto 16px 16px auto; display: grid; gap: 6px; max-width: calc(100% - 32px); pointer-events: none; }
.toast { padding: 10px 15px; border-radius: 8px; background: var(--azul-escuro); color: #fff; box-shadow: 0 5px 22px #1c2f6455; font-size: .9rem; }
.toast.erro { background: #8f3041; }

.acesso { width: min(100% - 60px, 1100px); min-height: min(670px, calc(100dvh - 64px)); display: grid; grid-template-columns: 1fr .95fr; margin: 32px auto; border-radius: 24px; background: #fff; border: 1px solid var(--borda); box-shadow: 0 12px 40px #263d7714; overflow: hidden; }
.acesso-form { padding: clamp(21px, 4vw, 48px); display: grid; grid-template-rows: auto 1fr; }
.acesso-form > .marca { justify-self: start; gap: 6px; }
.acesso-form .marca-logo { width: 184px; }
.acesso-centro { align-self: center; max-width: 420px; width: 100%; margin: 32px auto 16px; }
.acesso-centro > p { color: var(--suave); margin: 8px 0 23px; }
.acesso-centro .form .botao { margin-top: 4px; min-height: 46px; }
.acesso-visual { isolation: isolate; position: relative; display: grid; align-items: end; padding: 36px; overflow: hidden; background: radial-gradient(ellipse at 15% 0%, #5c80ef, transparent 61%), linear-gradient(145deg, var(--azul), #1b2d66); color: #f4f7ff; }
.fundo-relogio { position: absolute; z-index: -1; display: grid; place-items: center; width: 115%; height: 90%; right: -28%; top: -9%; color: #c9d9ff; opacity: .21; transform: rotate(-14deg); }
.fundo-relogio .icone { width: 95%; height: 95%; stroke-width: .35; }
.acesso-legenda { max-width: 330px; }
.acesso-legenda > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #ffffff24; margin-bottom: 14px; }
.acesso-legenda h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.acesso-legenda p { color: #e2eaff; margin-top: 8px; }
.atalhos-demo { padding: 12px 0 0; margin-top: 19px; border-top: 1px solid var(--borda); display: flex; gap: 7px; flex-wrap: wrap; }
.atalhos-demo p { width: 100%; display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--suave); }
.atalhos-demo .icone { width: 16px; height: 16px; color: var(--azul); }
.atalhos-demo .botao { min-height: 36px; font-size: .81rem; }
.link-botao { cursor: pointer; color: var(--azul); border: none; background: transparent; padding: 8px 0; text-decoration: underline; }

@media (max-width: 1170px) {
  .topo-interno { flex-wrap: wrap; gap: 10px 20px; padding-top: 10px; }
  .topo nav { order: 3; flex: 1 0 100%; padding-bottom: 8px; }
  .topo nav a { padding-inline: 11px; }
  .estatisticas.seis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pessoa-topo { flex-wrap: wrap; }
  .pessoa-topo .etiqueta { margin-left: auto; }
}
@media (max-width: 850px) {
  .grade-pessoas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estatisticas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .titulo { align-items: start; flex-direction: column; }
  .ponto-grade, .conta-grade { grid-template-columns: 1fr; }
}
@media (max-width: 570px) {
  .topo-interno, .conteudo { width: calc(100% - 26px); }
  .topo-interno { gap: 6px 12px; }
  .topo .marca-logo { width: 124px; }
  .topo nav a { padding-inline: 8px; font-size: .85rem; }
  .perfil-topo > span:nth-child(2) { max-width: 92px; }
  .perfil-topo small { display: none; }
  .topo-acoes { gap: 6px; }
  .conteudo { padding-top: 23px; }
  .titulo { margin-bottom: 18px; }
  .estatisticas, .estatisticas.seis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .estatistica { padding: 11px; min-height: 130px; }
  .grade-pessoas { grid-template-columns: 1fr; gap: 8px; }
  .form-grade.tres, .form-grade.quatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grade { gap: 8px; }
  .formulario-cartao, .painel-lista, dialog { padding: 14px; }
  .acesso { width: calc(100% - 22px); grid-template-columns: 1fr; margin-block: 11px; }
  .acesso-visual { display: none; }
  .acesso-form { padding: 21px; }
  .pessoa-topo { flex-wrap: nowrap; }
}

@media print {
  :root, body { background: white; color: black; }
  .topo, .acoes, .botao, .botao-icone, .filtros, .link-tabela:not(.principal), .avisos, .abas { display: none !important; }
  .conteudo { width: 100%; margin: 0; padding: 0; }
  .cartao { box-shadow: none; }
  .estatisticas, .estatisticas.seis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .estatistica { min-height: auto; padding: 8px; }
  .tabela-wrap { overflow: visible; }
  table { font-size: 10pt; }
  td, th { white-space: normal; padding: 4px; font-size: 8pt; }
  tr { break-inside: avoid; }
  body:has(dialog.janela-impressao[open]) #app { display: none; }
  dialog.janela-impressao[open] { position: static; width: 100%; max-height: none; box-shadow: none; border: 0; }
  dialog::backdrop { background: transparent; }
}
