/* =========================================================
   ESTILO DO TOTEM DA RECEPÇÃO (MODO KIOSK 24 HORAS)
   Design Hospitalar Futurista & Sofisticado | Alto Contraste
   Otimizado para Tablets, Monitores e TVs da Portaria
   ========================================================= */

:root {
  --totem-bg: #0b1329;          /* Azul escuro cirúrgico profundo */
  --totem-card-bg: #131e3a;
  --totem-text: #f8fafc;
  --totem-accent: #38bdf8;      /* Ciano de alta visibilidade */
  --totem-green: #10b981;
  --totem-border: #1e293b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body.totem-body {
  font-family: var(--font-sans);
  background-color: var(--totem-bg);
  background-image: radial-gradient(circle at 50% 20%, rgba(2, 132, 199, 0.15) 0%, transparent 60%);
  color: var(--totem-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  overflow: hidden;
  user-select: none;
}

/* Cabeçalho do Totem */
.totem-header {
  width: 100%;
  max-width: 960px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 18px;
}

.totem-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.totem-hospital-icon {
  font-size: 38px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.totem-hospital-name {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.totem-hospital-sub {
  font-size: 14px;
  color: var(--totem-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* Relógio do Totem */
.totem-clock-area {
  text-align: right;
}

.totem-time {
  font-size: 48px;
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.totem-date {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 700;
  margin-top: 6px;
  text-transform: capitalize;
}

/* Área Central do QR Code */
.totem-main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto 0;
  text-align: center;
}

.totem-qr-card {
  background: #ffffff;
  padding: 24px;
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border: 4px solid #ffffff;
}

#qrcode-container {
  width: 290px;
  height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode-container canvas {
  width: 290px !important;
  height: 290px !important;
  border-radius: 20px;
}

/* Barra de Expiração dos 15 Segundos */
.totem-timer-bar-wrap {
  width: 100%;
  height: 12px;
  background: #e2e8f0;
  border-radius: 12px;
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

.totem-timer-bar-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 12px;
  transition: width 0.1s linear;
}

.totem-timer-label {
  font-size: 14px;
  font-weight: 800;
  color: #64748b;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Instruções Visuais no Totem */
.totem-instructions {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(19, 30, 58, 0.85);
  padding: 16px 32px;
  border-radius: 24px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.totem-instructions-icon {
  font-size: 42px;
  animation: pulseScannerIcon 2s infinite ease-in-out;
}

@keyframes pulseScannerIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.totem-instructions-text {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.totem-instructions-sub {
  font-size: 14px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 2px;
}

/* Rodapé e Botões */
.totem-footer {
  width: 100%;
  max-width: 960px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  padding-top: 18px;
}

.totem-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.totem-dot-green {
  width: 10px;
  height: 10px;
  background: var(--totem-green);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--totem-green);
  animation: totemBlink 2s infinite ease-in-out;
}

@keyframes totemBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.totem-actions {
  display: flex;
  gap: 10px;
}

.btn-totem-util {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-totem-util:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  body.totem-body {
    padding: 16px;
  }
  .totem-hospital-name {
    font-size: 20px;
  }
  .totem-time {
    font-size: 36px;
  }
  #qrcode-container, #qrcode-container canvas {
    width: 240px !important;
    height: 240px !important;
  }
  .totem-instructions-text {
    font-size: 17px;
  }
}
