:root {
  --totem-azul: #003f7d;
  --totem-azul-fundo: #001a36;
  --totem-amarelo: #f2c300;
  --totem-creme: #eef3f8;
  --totem-tinta: #0c1b2a;
  --totem-muted: #5a6b7d;
  --totem-rota: #e85d04;
  --totem-origem: #2fb344;
  --totem-destino: #206bc4;
  --totem-radius: 1.25rem;
  --totem-fonte: "DM Sans", system-ui, sans-serif;
  --totem-display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

.totem-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--totem-fonte);
  color: var(--totem-tinta);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(242, 195, 0, 0.18), transparent 55%),
    linear-gradient(160deg, var(--totem-azul-fundo) 0%, #0a2748 42%, #12365c 100%);
}

/* —— Hub —— */
.totem-hub {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem);
  color: #fff;
  animation: totem-fade-in 0.5s ease both;
}

.totem-hub__brand {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.totem-hub__logo {
  flex-shrink: 0;
  filter: invert(1) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

.totem-hub__eyebrow {
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--totem-amarelo);
  font-weight: 600;
}

.totem-hub__title {
  margin: 0 0 0.5rem;
  font-family: var(--totem-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.totem-hub__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
}

.totem-hub__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.totem-hub__card {
  display: grid;
  gap: 0.25rem;
  padding: 1.35rem 1.5rem;
  border-radius: var(--totem-radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.totem-hub__card:hover,
.totem-hub__card:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--totem-amarelo);
  outline: none;
}

.totem-hub__codigo {
  font-weight: 700;
  color: var(--totem-amarelo);
  letter-spacing: 0.06em;
}

.totem-hub__nome {
  font-size: 1.35rem;
  font-weight: 600;
}

.totem-hub__meta {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
}

.totem-hub__vazio {
  padding: 1.5rem;
  border-radius: var(--totem-radius);
  background: rgba(214, 57, 57, 0.2);
  border: 1px solid rgba(214, 57, 57, 0.45);
}

/* —— Kiosk —— */
.totem-kiosk {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  animation: totem-fade-in 0.45s ease both;
}

.totem-painel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  background: var(--totem-creme);
  color: var(--totem-tinta);
  border-right: 4px solid var(--totem-amarelo);
  z-index: 2;
}

.totem-painel__topo {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.totem-painel__voltar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  background: var(--totem-azul);
  color: #fff;
  text-decoration: none;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.totem-painel__eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--totem-azul);
  font-weight: 700;
}

.totem-painel__predio {
  margin: 0.15rem 0 0.35rem;
  font-family: var(--totem-display);
  font-size: 1.55rem;
  line-height: 1.15;
}

.totem-painel__origem {
  margin: 0;
  font-size: 0.95rem;
  color: var(--totem-muted);
}

.totem-busca__rotulo {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.totem-busca input {
  width: 100%;
  font: inherit;
  font-size: 1.2rem;
  padding: 0.95rem 1rem;
  border: 2px solid #c9d3df;
  border-radius: 0.9rem;
  background: #fff;
}

.totem-busca input:focus {
  outline: 3px solid rgba(0, 63, 125, 0.25);
  border-color: var(--totem-azul);
}

.totem-atalhos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.totem-atalho {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 0;
  background: var(--totem-azul);
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.totem-atalho:active {
  transform: scale(0.98);
}

.totem-sugestoes {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 40vh;
  overflow: auto;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid #d7e0ea;
}

.totem-sugestoes li button {
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.9rem 1rem;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.totem-sugestoes li button:hover,
.totem-sugestoes li button:focus-visible {
  background: #e8f1fb;
  outline: none;
}

.totem-destino {
  padding: 1rem;
  border-radius: 0.9rem;
  background: #fff;
  border: 1px solid #d7e0ea;
  animation: totem-slide-up 0.35s ease both;
}

.totem-destino h2 {
  margin: 0 0 0.35rem;
  font-family: var(--totem-display);
  font-size: 1.35rem;
}

.totem-destino__meta {
  margin: 0;
  color: var(--totem-muted);
}

.totem-ocupacao {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #d7e0ea;
  font-size: 0.95rem;
}

.totem-acoes {
  margin-top: auto;
}

.totem-btn {
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 0.9rem;
  border: 2px solid var(--totem-azul);
  cursor: pointer;
  touch-action: manipulation;
}

.totem-btn--ghost {
  background: transparent;
  color: var(--totem-azul);
}

.totem-timeout {
  height: 4px;
  border-radius: 999px;
  background: #d7e0ea;
  overflow: hidden;
}

.totem-timeout__barra {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--totem-azul), var(--totem-amarelo));
  transition: transform linear;
}

.totem-mapa {
  position: relative;
  background: #fff;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
}

.totem-mapa__viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
  touch-action: pan-x pan-y;
  cursor: grab;
}

.totem-mapa__viewport.is-dragging {
  cursor: grabbing;
}

.totem-mapa__planta,
.totem-mapa__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.totem-mapa__overlay {
  pointer-events: none;
}

.totem-area {
  fill: #d8d8d8;
  stroke: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.totem-area:hover,
.totem-area.is-ativo {
  fill: rgba(232, 93, 4, 0.28);
}

.totem-andares {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.35);
}

.totem-andar {
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 0.9rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.totem-andar.is-ativo {
  background: var(--totem-amarelo);
  color: var(--totem-azul-fundo);
}

@keyframes totem-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes totem-slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes totem-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 900px) {
  .totem-kiosk {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(45vh, 1fr);
  }

  .totem-painel {
    border-right: 0;
    border-bottom: 4px solid var(--totem-amarelo);
    max-height: 55vh;
    overflow: auto;
  }
}
