* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #040816;
  --panel: rgba(9, 17, 38, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f8fbff;
  --muted: #9eaccd;
  --muted-2: #7f8dad;
  --green: #3ddc84;
  --red: #ff6b6b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: "Manrope", "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -8%, rgba(96, 124, 255, 0.24), transparent 28%),
    radial-gradient(circle at 15% 18%, rgba(82, 124, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #071126 0%, #040816 56%, #02040b 100%);
  padding: 24px 20px 48px;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

button,
input {
  font-family: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.login-conteudo {
  width: 100%;
  max-width: 420px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 200px;
}

.login-logo-fora {
  width: 210px;
  height: auto;
  margin: 0 auto 30px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
}

.login-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px 28px;
  background: linear-gradient(180deg, rgba(16, 28, 58, 0.94), rgba(8, 14, 31, 0.94));
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(16px);
}

.login-logo {
  display: none;
}

.login-card h1 {
  font-size: 2rem;
  line-height: 1.02;
  margin-bottom: 10px;
  letter-spacing: -0.04em;
}

.login-instrucao {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 22px;
}

.login-card input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding: 0 16px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  outline: none;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.login-card input::placeholder {
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

.login-card button {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: #ffffff;
  color: #0b1226;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.login-card button:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.login-erro {
  min-height: 20px;
  margin-top: 12px;
  color: #fca5a5;
  font-size: 0.86rem;
  font-weight: 800;
}

.login-rodape {
  margin-top: 28px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  font-weight: 800;
  text-transform: uppercase;
  color: #9aa6c7;
}

.login-rodape span {
  color: #8d98b8;
  margin-right: 6px;
}

.login-rodape strong {
  color: #ffffff;
  font-weight: 900;
}

#btnEntrarCliente {
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

#btnEntrarCliente:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

#btnEntrarCliente:active,
#btnEntrarCliente.carregando {
  transform: scale(0.985);
  filter: brightness(0.95);
}

.cliente-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
}

.topo-cliente {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: sticky;
  top: 0;
  z-index: 50;
  margin-bottom: 18px;
  background: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

body.rolando .topo-cliente {
  background: rgba(7, 17, 38, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.topo-conteudo {
  width: min(100%, 1240px);
  min-height: 64px;
  margin: 0 auto;
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topo-esquerda {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.logo-cliente {
  width: 240px;
  max-width: 240px;
  height: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.nome-cliente-topo {
  min-width: 0;
  max-width: 460px;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nome-cliente-topo::before {
  content: "|";
  margin-right: 10px;
  color: rgba(217, 225, 242, 0.72);
  font-weight: 900;
}

body.rolando .nome-cliente-topo {
  opacity: 1;
}

.topo-acoes {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: fit-content;
}

.topo-area-bloco {
  position: relative;
  display: flex;
  align-items: center;
}

.topo-label {
  color: #d9e1f2;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  white-space: nowrap;
  opacity: 0.95;
}

.topo-label::after {
  content: "|";
  margin-left: 12px;
}

.topo-mensagem {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  max-width: 320px;
  text-align: right;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  color: #8ef0b2;
  font-weight: 800;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.topo-mensagem.saindo {
  opacity: 0;
  transform: translateY(-6px);
}

.btn-sair,
.btn-atualizar {
  height: 38px;
  min-width: 72px;
  border: 1px solid rgba(142, 203, 255, 0.72);
  border-radius: 10px;
  padding: 0 16px;
  background: #8ecbff;
  color: #061225;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn-sair:hover,
.btn-atualizar:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}

.boas-vindas {
  position: relative;
  min-height: 112px;
  padding: 16px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 0 34px;
  text-align: center;
  transition: opacity 0.35s ease, transform 0.35s ease, min-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
}

.boas-vindas::before {
  content: "";
  position: absolute;
  inset: -36px 0 auto;
  height: 120px;
  background: radial-gradient(circle at 50% 20%, rgba(126, 162, 255, 0.1), transparent 38%);
  filter: blur(12px);
  pointer-events: none;
}

body.rolando .boas-vindas {
  opacity: 0;
  transform: translateY(-14px) scale(0.97);
  pointer-events: none;
  min-height: 0;
  padding: 0;
  margin: 0 0 12px;
}

.boas-vindas h1,
#tituloBoasVindas {
  position: relative;
  z-index: 1;
  max-width: 980px;
  font-size: clamp(1.65rem, 3vw, 3rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
  font-weight: 700;
  color: #f8fbff;
}

.boas-vindas p,
#subtituloCliente {
  display: none;
}

.hero-linha {
  display: block;
}

.hero-linha:first-child {
  font-size: 0.5em;
  line-height: 1.18;
  margin-bottom: 10px;
  letter-spacing: 0.015em;
  font-weight: 600;
  color: #cbd5e1;
  opacity: 0.9;
}

.hero-linha.nome {
  font-size: 0.9em;
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 850;
  color: #ffffff;
}

.mensagem {
  min-height: 24px;
  color: var(--muted-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.mensagem.ok {
  color: #8ef0b2;
}

.mensagem.erro {
  color: #ffb4b4;
}

.metricas-cliente {
  width: min(100%, 1120px);
  margin: 72px auto 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.metrica-card {
  min-height: 230px;
  border: 1px solid rgba(126, 162, 255, 0.18);
  border-radius: 22px;
  padding: 22px;
  background:
    radial-gradient(circle at 28% 0%, rgba(75, 118, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(17, 28, 56, 0.62), rgba(7, 13, 29, 0.82));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.metrica-topo {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 22px;
}

.metrica-icone {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #304cff, #17245f);
}

.metrica-icone.qr {
  background: linear-gradient(135deg, #7c5cff, #25155f);
}

.metrica-label {
  display: block;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.metrica-card strong {
  display: block;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

.metrica-card small {
  display: block;
  margin-top: 6px;
  color: #aeb8cc;
  font-size: 0.82rem;
  font-weight: 700;
}

.metrica-periodo {
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.grafico-barras {
  height: 130px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  padding: 0 6px;
}

.barra-dia {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}

.barra-coluna {
  width: min(100%, 30px);
  min-height: 6px;
  height: var(--altura, 4%);
  border-radius: 7px;
  background: linear-gradient(180deg, #4f6fff, #263bd9);
  box-shadow: 0 12px 26px rgba(45, 93, 255, 0.26);
}

.barra-dia span,
.grafico-ponto-label {
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 800;
}

.grafico-linha {
  height: 140px;
}

.grafico-linha svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cliente-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.coluna-esquerda {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pontos-cliente,
.detalhe-ponto,
.contrato-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  backdrop-filter: blur(12px);
}

.pontos-cliente,
.detalhe-ponto {
  background: linear-gradient(180deg, rgba(17, 28, 56, 0.5), rgba(7, 13, 29, 0.72)), var(--panel);
  box-shadow: var(--shadow);
}

.pontos-cliente {
  padding: 18px;
}

.detalhe-ponto {
  min-height: 560px;
  padding: 22px;
}

.contrato-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 245, 255, 0.92));
  color: #101827;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.contrato-card h2 {
  display: none;
}

.contrato-card p {
  color: #52607a;
  font-size: 0.92rem;
  line-height: 1.58;
  margin-bottom: 18px;
  text-align: center;
  text-align-last: center;
}

.contrato-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 auto 14px;
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.contrato-badge.pendente {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.contrato-badge.concluido {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
}

.contrato-badge.inativo {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.codigo-cliente {
  display: none;
}

.btn-assinar-contrato {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  margin-top: 14px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.btn-assinar-contrato:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.btn-assinar-contrato:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.contrato-card:has(.contrato-badge.concluido) .btn-assinar-contrato,
.btn-assinar-contrato.concluido {
  background: #22c55e;
  color: #052e16;
}

.contrato-card:has(.contrato-badge.inativo) .btn-assinar-contrato {
  display: none;
}

.historico-contrato-cliente {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secao-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.secao-topo h2 {
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.contador-pontos {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lista-pontos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ponto-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: #fff;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ponto-card:hover,
.ponto-card.ativo {
  border-color: rgba(126, 162, 255, 0.5);
  background: rgba(126, 162, 255, 0.11);
  transform: translateY(-1px);
}

.ponto-card img {
  width: 84px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.ponto-card h3 {
  font-size: 1rem;
  line-height: 1.08;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.ponto-card p {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.32;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.status-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.status-mini::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.status-mini.ativo {
  color: #86efac;
}

.status-mini.ativo::before {
  background: var(--green);
}

.status-mini.inativo,
.status-mini.indisponivel {
  color: #fca5a5;
}

.status-mini.inativo::before,
.status-mini.indisponivel::before {
  background: var(--red);
}

.estado-vazio {
  min-height: 480px;
  border: 1px dashed rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 36px;
  line-height: 1.5;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

.detalhe-cabecalho {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin: 0 0 14px;
  padding: 6px 0 0;
}

.detalhe-cabecalho > div:first-child {
  min-width: 0;
}

.detalhe-cabecalho h2 {
  font-size: clamp(1.9rem, 3.2vw, 3.5rem);
  line-height: 0.98;
  margin: 0;
  letter-spacing: -0.04em;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detalhe-cabecalho p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-top: 10px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 150px;
}

.status-grande {
  width: fit-content;
  min-width: 120px;
  border-radius: 10px;
  padding: 8px 16px;
  background: rgba(148, 163, 184, 0.12);
  color: #dbeafe;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.status-grande.ativo {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.status-grande.inativo,
.status-grande.indisponivel {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.status-desde {
  color: #e5e7eb;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
  opacity: 0.92;
}

.preview-box {
  margin: 8px 0 20px;
}

.preview-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.preview-topo h3,
.subsecao h3 {
  font-size: 1rem;
  color: #e6eeff;
  letter-spacing: -0.02em;
}

.preview-topo h3 {
  margin: 0;
}

.preview-nome {
  max-width: 520px;
  text-align: right;
  color: #aeb8cc;
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-midia {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-midia img,
.preview-midia video,
.preview-midia iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
  object-fit: cover;
  background: #000;
}

.qr-material-overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.qr-material-overlay img {
  width: 150px;
  height: 150px;
  display: block;
  border: none;
  object-fit: contain;
  background: #ffffff;
}

.qr-material-overlay span {
  color: #111827;
  font: 700 15px Arial, sans-serif;
  line-height: 1;
}

.preview-vazio {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 24px;
  font-weight: 700;
  flex-direction: column;
  gap: 6px;
}

.preview-vazio strong {
  display: block;
  color: #ffffff;
  font-size: 0.86rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.preview-vazio span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.preview-aviso-offline {
  position: absolute;
  inset: auto 18px 16px;
  z-index: 3;
  min-height: 58px;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: rgba(4, 8, 22, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  text-align: center;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.preview-aviso-offline strong {
  display: block;
  color: #ffffff;
  font-size: 0.82rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.preview-aviso-offline span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.preview-midia.offline video,
.preview-midia.offline img,
.preview-midia.offline iframe {
  filter: saturate(0.75) brightness(0.82);
}

.subsecao {
  margin-top: 22px;
}

.tabela-materiais {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
}

.linha-material-head,
.linha-material {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 130px 120px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.linha-material-head {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.linha-material {
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: #fff;
}

.linha-material:last-child {
  border-bottom: none;
}

.linha-material strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}

.linha-material small {
  display: none;
}

.linha-material span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.historico-secao {
  margin-top: 24px;
}

.historico-secao h3 {
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.historico-lista {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.historico-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 13px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.025);
}

.historico-item span:first-child {
  display: none;
}

.historico-item span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.historico-evento {
  color: #e5e7eb !important;
  font-size: 0.78rem !important;
}

.historico-item span:last-child {
  font-size: 0.68rem;
}

.historico-evento.ativo-primeiro,
.historico-item.ativo-primeiro .historico-evento {
  color: #86efac !important;
}

.historico-evento.neutro,
.historico-item.neutro span {
  color: #e5e7eb !important;
}

.historico-vazio-pequeno {
  width: min(100%, 520px);
  margin-left: auto;
  padding: 12px 14px;
  font-size: 0.82rem;
}

.vazio {
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 21, 0.34);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.loading-overlay.ativo {
  display: flex;
  opacity: 1;
}

.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  text-align: center;
}

.loading-logo {
  width: 320px;
  max-width: 80vw;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 40px rgba(255, 255, 255, 0.08));
}

.loading-texto {
  margin: 0;
  color: #f8fbff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.96;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

body.loading-page {
  overflow: hidden;
}

.rodape-creditos {
  margin-top: 24px;
  padding: 14px 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.rodape-creditos strong {
  color: #fff;
  font-weight: 800;
}

.benefits-row {
  display: none !important;
}

.visibilidade-cliente {
  width: 100%;
  margin: -12px 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(17, 28, 56, 0.66), rgba(7, 13, 29, 0.82)),
    rgba(9, 17, 38, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.visibilidade-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.visibilidade-label {
  display: block;
  margin-bottom: 7px;
  color: #aeb8cc;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.visibilidade-topo h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.visibilidade-tendencia {
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.visibilidade-grid {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.visibilidade-metricas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.visibilidade-metricas div {
  min-height: 96px;
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.visibilidade-metricas span {
  display: block;
  margin-bottom: 10px;
  color: #9eaccd;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.visibilidade-metricas strong {
  display: block;
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.visibilidade-grafico {
  min-height: 220px;
  border-radius: 20px;
  padding: 18px 18px 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 100% 44px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.vis-barras {
  height: 100%;
  min-height: 188px;
  display: grid;
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 14px;
  align-items: end;
}

.vis-barra {
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.vis-barra-coluna {
  width: min(100%, 42px);
  height: var(--altura, 20%);
  min-height: 12px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #fbbf24 0%, #fb923c 58%, #f97316 100%);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.vis-barra.ativo .vis-barra-coluna {
  background: linear-gradient(180deg, #fde68a 0%, #f59e0b 52%, #ea580c 100%);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

.vis-barra strong {
  color: #ffffff;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 900;
}

.vis-barra span {
  color: #9eaccd;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
}

.historico-contratos-concluidos {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
}

.historico-contratos-concluidos h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
}

.historico-contrato-concluido {
  min-height: 58px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(34, 197, 94, 0.08);
}

.historico-contrato-concluido strong {
  display: block;
  color: #101827;
  font-size: 0.82rem;
  line-height: 1.2;
  font-weight: 900;
}

.historico-contrato-concluido span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 800;
}

.btn-historico-contrato {
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  background: #22c55e;
  color: #052e16;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.btn-historico-contrato:hover {
  background: #16a34a;
  color: #ffffff;
}

@media (max-width: 900px) {
  .metricas-cliente {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 42px;
  }

  .metrica-card {
    min-height: 180px;
    padding: 12px 10px;
    border-radius: 18px;
  }

  .metrica-topo {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 14px;
  }

  .metrica-icone {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.72rem;
  }

  .metrica-periodo {
    grid-column: 1 / -1;
    font-size: 0.64rem;
    white-space: normal;
  }

  .metrica-label {
    font-size: 0.72rem;
    line-height: 1.15;
    margin-bottom: 5px;
  }

  .metrica-card strong {
    font-size: 1.55rem;
  }

  .metrica-card small {
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .grafico-barras {
    height: 78px;
    gap: 5px;
    padding: 0 2px;
  }

  .barra-coluna {
    width: min(100%, 18px);
    min-height: 5px;
  }

  .barra-dia {
    gap: 5px;
  }

  .barra-dia span,
  .grafico-ponto-label {
    font-size: 0.56rem;
  }

  .grafico-linha {
    height: 84px;
  }

  .visibilidade-cliente {
    margin: -24px 0 18px;
    border-radius: 22px;
    padding: 16px;
  }

  .visibilidade-topo {
    display: block;
    margin-bottom: 16px;
  }

  .visibilidade-tendencia {
    width: fit-content;
    margin-top: 12px;
    white-space: normal;
  }

  .visibilidade-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .visibilidade-metricas div {
    min-height: 82px;
    padding: 14px;
  }

  .visibilidade-grafico {
    min-height: 190px;
    padding: 14px 12px 10px;
  }

  .vis-barras {
    min-height: 156px;
    gap: 8px;
  }

  .vis-barra {
    min-height: 134px;
    gap: 7px;
  }

  .vis-barra-coluna {
    width: min(100%, 30px);
  }

  .vis-barra strong {
    font-size: 0.64rem;
  }

  .vis-barra span {
    font-size: 0.62rem;
  }

  .cliente-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .coluna-esquerda {
    gap: 12px;
  }

  .pontos-cliente,
  .detalhe-ponto,
  .contrato-card {
    width: 100%;
    max-width: 100%;
    border-radius: 22px;
    overflow: hidden;
  }

  .pontos-cliente {
    order: 1;
    padding: 16px;
  }

  .detalhe-ponto {
    order: 2;
    min-height: auto;
    padding: 16px 14px;
  }

  .contrato-card {
    order: 3;
    width: calc(100% - 28px);
    max-width: 320px;
    margin: 0 auto;
    padding: 14px 12px;
    border-radius: 18px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 18px 12px 36px;
  }

  .login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
  }

  .qr-material-overlay {
    right: 12px;
    bottom: 12px;
    padding: 6px;
    border-radius: 10px;
    gap: 5px;
  }

  .qr-material-overlay img {
    width: 96px;
    height: 96px;
  }

  .qr-material-overlay span {
    font-size: 11px;
  }

  .login-conteudo {
    width: 100%;
    max-width: 420px;
    min-height: auto;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .login-logo-fora {
    width: 140px;
    margin: 0 0 18px;
  }

  .login-card {
    width: 100%;
    margin: 0;
    min-height: auto;
    border-radius: 26px;
    padding: 24px 18px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: linear-gradient(180deg, rgba(19, 33, 68, 0.96), rgba(8, 14, 31, 0.96));
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.3);
  }

  .login-card h1 {
    font-size: 2.05rem;
    line-height: 1.02;
    letter-spacing: -0.05em;
    margin-bottom: 14px;
    text-align: center;
  }

  .login-instrucao {
    max-width: 260px;
    margin: 0 auto 26px;
    font-size: 0.98rem;
    line-height: 1.45;
    color: #b8c4df;
    text-align: center;
  }

  .login-card input {
    height: 66px;
    border-radius: 18px;
    padding: 0 18px;
    margin-bottom: 14px;
    font-size: 1.02rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .login-card input::placeholder {
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.96rem;
    font-weight: 700;
  }

  .login-card button {
    height: 66px;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 900;
  }

  .login-erro {
    min-height: 22px;
    margin-top: 14px;
    font-size: 0.84rem;
    line-height: 1.35;
    text-align: center;
  }

  .login-rodape {
    margin-top: 18px;
    padding-top: 0;
    text-align: center;
    font-size: 0.68rem;
    line-height: 1.6;
    letter-spacing: 0.18em;
    color: #8d98b8;
    opacity: 0.9;
  }

  .topo-cliente {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 18px;
    position: sticky;
    top: 0;
    z-index: 999;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  body.rolando .topo-cliente {
    background: rgba(7, 17, 38, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  .topo-conteudo {
    width: 100%;
    min-height: 54px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .topo-esquerda {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
  }

  .logo-cliente {
    width: 148px;
    max-width: 148px;
    min-width: 148px;
    height: auto;
  }

  body.rolando .logo-cliente {
    width: 100px;
    max-width: 100px;
    min-width: 100px;
  }

  .nome-cliente-topo {
    display: block;
    min-width: 0;
    max-width: 100%;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    width: 0;
    transform: translateX(-6px);
  }

  .nome-cliente-topo::before {
    content: "|";
    margin-right: 6px;
  }

  body.rolando .nome-cliente-topo {
    opacity: 1;
    width: auto;
    transform: translateX(0);
  }

  .topo-area-bloco,
  .topo-label,
  .topo-mensagem {
    display: none;
  }

  .btn-sair,
  .btn-atualizar {
    height: 34px;
    min-width: 64px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 11px;
    background: #ffffff;
    color: #061225;
    font-size: 0.81rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  }

  .boas-vindas {
    min-height: auto;
    padding: 18px 0 0;
    margin: 0 0 52px;
  }

  .boas-vindas h1,
  #tituloBoasVindas {
    font-size: 1.7rem;
    line-height: 1.08;
    text-align: center;
  }

  .hero-linha:first-child {
    margin-bottom: 14px;
  }

  .contrato-card p {
    font-size: 0.8rem;
    line-height: 1.42;
    margin-bottom: 12px;
  }

  .contrato-badge {
    padding: 6px 10px;
    font-size: 0.64rem;
    margin-bottom: 10px;
  }

  .btn-assinar-contrato {
    min-height: 42px;
    padding: 11px 12px;
    margin-top: 10px;
    font-size: 0.82rem;
    border-radius: 12px;
  }

  .lista-pontos {
    gap: 10px;
  }

  .ponto-card {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .ponto-card img {
    width: 74px;
    height: 58px;
  }

  .ponto-card h3 {
    white-space: normal;
  }

  .detalhe-cabecalho {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
    padding: 0;
  }

  .detalhe-cabecalho h2 {
    width: 100%;
    font-size: 1.28rem;
    line-height: 1.05;
  }

  .detalhe-cabecalho p {
    margin-top: 4px;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .status-area {
    min-width: 0;
    align-items: flex-end;
    gap: 0;
  }

  .status-grande {
    min-width: 84px;
    padding: 7px 12px;
    font-size: 0.68rem;
    border-radius: 10px;
  }

  .status-desde {
    display: none;
  }

  .preview-box {
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
  }

  .preview-topo {
    order: 2;
    display: block;
    margin-top: 8px;
    margin-bottom: 0;
  }

  .preview-topo h3 {
    display: none;
  }

  .preview-nome {
    display: block;
    max-width: 100%;
    text-align: left;
    font-size: 0.8rem;
    line-height: 1.15;
    font-weight: 800;
    color: #e6eeff;
  }

  .preview-nome::before {
    content: "EXIBIÇÃO EM TEMPO REAL | ";
    color: #ffffff;
    font-weight: 900;
  }

  .preview-midia {
    order: 1;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
  }

  .preview-aviso-offline {
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-height: 54px;
    padding: 10px 12px;
  }

  .preview-aviso-offline strong {
    font-size: 0.74rem;
  }

  .preview-aviso-offline span {
    font-size: 0.64rem;
  }

  .linha-material-head {
    display: none;
  }

  .tabela-materiais {
    border-radius: 18px;
  }

  .linha-material {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px;
  }

  .linha-material strong {
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .linha-material span {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .historico-lista {
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    scrollbar-width: thin;
  }

  .historico-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }

  .rodape-creditos {
    margin-top: 18px;
    padding: 10px 0 0;
    font-size: 10px;
  }
}

@media (max-width: 520px) {
  .metricas-cliente {
    gap: 8px;
    margin-top: 34px;
  }

  .metrica-card {
    min-height: 168px;
    padding: 10px 8px;
    border-radius: 17px;
  }

  .metrica-topo {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    margin-bottom: 12px;
  }

  .metrica-icone {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.64rem;
  }

  .metrica-label {
    font-size: 0.66rem;
  }

  .metrica-card strong {
    font-size: 1.35rem;
  }

  .metrica-card small {
    font-size: 0.6rem;
  }

  .metrica-periodo {
    font-size: 0.58rem;
  }

  .grafico-barras {
    height: 68px;
    gap: 4px;
  }

  .barra-coluna {
    width: min(100%, 14px);
  }

  .barra-dia span,
  .grafico-ponto-label {
    font-size: 0.5rem;
  }

  .grafico-linha {
    height: 74px;
  }
}

.btn-ir-inicial {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 9999;
  min-height: 42px;
  padding: 0 18px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #ffffff;
  color: #07111d;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease, filter 0.18s ease;
}

body.login-ativo .btn-ir-inicial {
  display: inline-flex;
}

.btn-ir-inicial:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

.login-screen .btn-ir-inicial {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 9999;
  min-height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #ffffff;
  color: #07111d;
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.login-screen .btn-ir-inicial:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

@media (max-width: 768px) {
  .btn-ir-inicial {
    display: none;
  }
}

.login-screen {
  align-items: flex-start !important;
}

.login-conteudo {
  min-height: auto !important;
  padding-top: clamp(120px, 18vh, 180px) !important;
  justify-content: flex-start !important;
}

@media (max-width: 768px) {
  .login-screen {
    align-items: flex-start !important;
    padding-top: 0 !important;
  }

  .login-conteudo {
    min-height: auto !important;
    padding-top: 135px !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 430px) {
  .login-conteudo {
    padding-top: 120px !important;
  }
}

