:root {
  --totem-upper-height: 66.667dvh;
  --totem-nav-petrol: #0c6e82;
  --totem-nav-petrol-dark: #084a59;
  --totem-nav-green: #8fb51d;
  --totem-nav-ink: #17282c;
  --totem-nav-muted: #5c6e70;
  --totem-nav-line: #d5e1e2;
  --totem-nav-soft: #eff4f4;
}

.totem-navigation-view {
  position: fixed;
  inset: 0 0 33.333dvh 0;
  z-index: 2147482600;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f3f7f7;
  color: var(--totem-nav-ink);
  font-family: Inter, Montserrat, "Segoe UI", sans-serif;
}

.totem-navigation-view[hidden] { display: none !important; }

.totem-navigation-header {
  min-height: 104px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 150px;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--totem-nav-petrol-dark), var(--totem-nav-petrol));
  color: #fff;
  border-bottom: 4px solid var(--totem-nav-green);
  box-shadow: 0 5px 18px rgba(8, 74, 89, .2);
}

.totem-navigation-heading { min-width: 0; text-align: center; }
.totem-navigation-heading p { margin: 0; }
.totem-navigation-heading h1 { margin: 3px 0; font-size: clamp(24px, 2vw, 34px); line-height: 1.05; }
#totem-navigation-eyebrow { color: #d7ebef; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
#totem-navigation-description { color: rgba(255,255,255,.86); font-size: 14px; line-height: 1.25; }

.totem-navigation-header__button,
.totem-page-toolbar__button {
  min-height: 54px;
  border: 2px solid rgba(255,255,255,.42);
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255,255,255,.13);
  color: #fff;
  font: 900 16px/1 Inter, Montserrat, sans-serif;
  cursor: pointer;
}

.totem-navigation-header__button:active,
.totem-page-toolbar__button:active { transform: scale(.97); background: rgba(255,255,255,.25); }

.totem-navigation-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(136px, 1fr);
  gap: 14px;
  padding: 20px 24px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.totem-navigation-card {
  min-height: 136px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 2px solid #c6dadd;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  color: var(--totem-nav-ink);
  box-shadow: 0 5px 18px rgba(23,40,44,.08);
  text-align: left;
  cursor: pointer;
  font-family: Inter, Montserrat, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.totem-navigation-card:hover,
.totem-navigation-card:focus-visible {
  border-color: var(--totem-nav-petrol);
  outline: 4px solid rgba(12,110,130,.15);
}

.totem-navigation-card:active { transform: scale(.98); background: #eef7f8; }
.totem-navigation-card__icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #e7f3f5;
  color: var(--totem-nav-petrol);
  font-size: 34px;
  font-weight: 900;
}
.totem-navigation-card__copy { min-width: 0; }
.totem-navigation-card__copy strong { display: block; font-size: clamp(17px,1.2vw,22px); line-height: 1.12; }
.totem-navigation-card__copy small { display: block; margin-top: 7px; color: var(--totem-nav-muted); font-size: 13px; line-height: 1.3; }
.totem-navigation-card[data-action="qr"] .totem-navigation-card__icon { background: #eef2db; color: #61770d; }

/* Conserva el estilo del botón original al mover Confirmar datos a esta pantalla. */
.totem-navigation-card[data-key="datos"] {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  border-color: #007483;
  border-radius: 9px;
  background: #f8fbfb;
  text-align: center;
}
.totem-navigation-card[data-key="datos"] .totem-navigation-card__icon {
  width: 58px;
  height: 58px;
  border-radius: 0;
  background: transparent;
  color: #007c91;
}
.totem-navigation-card[data-key="datos"] .totem-navigation-card__icon svg {
  width: 54px;
  height: 54px;
}
.totem-navigation-card[data-key="datos"] .totem-navigation-card__copy strong {
  font-weight: 900;
}
.totem-navigation-card[data-key="datos"]:hover,
.totem-navigation-card[data-key="datos"]:focus-visible,
.totem-navigation-card[data-key="datos"]:active {
  border-color: #8bd5dd;
  background: #007483;
  color: #fff;
}
.totem-navigation-card[data-key="datos"]:hover .totem-navigation-card__icon,
.totem-navigation-card[data-key="datos"]:focus-visible .totem-navigation-card__icon,
.totem-navigation-card[data-key="datos"]:active .totem-navigation-card__icon,
.totem-navigation-card[data-key="datos"]:hover .totem-navigation-card__copy small,
.totem-navigation-card[data-key="datos"]:focus-visible .totem-navigation-card__copy small,
.totem-navigation-card[data-key="datos"]:active .totem-navigation-card__copy small {
  color: #fff;
}

.totem-page-toolbar {
  position: fixed;
  left: 16px;
  top: 12px;
  right: 142px;
  z-index: 2147483150;
  min-height: 58px;
  display: grid;
  grid-template-columns: 150px minmax(0,1fr);
  align-items: center;
  gap: 16px;
  pointer-events: none;
  font-family: Inter, Montserrat, sans-serif;
}
.totem-page-toolbar[hidden] { display: none !important; }
.totem-page-toolbar__button { pointer-events: auto; background: var(--totem-nav-petrol); box-shadow: 0 4px 14px rgba(0,0,0,.24); }
.totem-page-toolbar strong {
  justify-self: center;
  max-width: 620px;
  overflow: hidden;
  border-radius: 999px;
  padding: 10px 20px;
  background: rgba(255,255,255,.95);
  color: var(--totem-nav-petrol-dark);
  box-shadow: 0 3px 13px rgba(0,0,0,.16);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.totem-subview-active .totem-home-btn { left: auto; right: 46px; }

@media (max-width: 1250px) {
  .totem-navigation-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 820px) {
  .totem-navigation-header { grid-template-columns: 110px minmax(0,1fr) 110px; gap: 8px; padding: 10px; }
  .totem-navigation-header__button { padding: 8px 10px; font-size: 13px; }
  .totem-navigation-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; padding: 12px; }
  .totem-navigation-card { grid-template-columns: 48px minmax(0,1fr); gap: 10px; padding: 12px; }
  .totem-navigation-card__icon { width: 48px; height: 48px; font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .totem-navigation-card,
  .totem-navigation-header__button,
  .totem-page-toolbar__button { transition: none !important; }
}
