/* =========================================================
   NEXTTRIAGE
   TELA DE LOGIN — IDENTIDADE VISUAL
   NFC + AUTENTICAÇÃO FACIAL
   ANIMAÇÕES SUAVES / PREMIUM
========================================================= */

/* =========================================================
   VARIÁVEIS
========================================================= */

:root {
  --nt-primary: #0b63ce;
  --nt-primary-dark: #084b9b;
  --nt-primary-deep: #063b7a;
  --nt-secondary: #12a8e8;
  --nt-accent: #16c784;

  --nt-bg: #f7f9fc;
  --nt-card: #ffffff;

  --nt-text: #172033;
  --nt-text-soft: #697586;
  --nt-text-muted: #94a3b8;

  --nt-border: #e8edf4;

  --nt-radius: 24px;

  --nt-shadow:
    0 20px 55px rgba(15, 23, 42, 0.07), 0 3px 12px rgba(15, 23, 42, 0.025);
}

/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================================================
   HTML / BODY
========================================================= */

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background: var(--nt-bg);
  color: var(--nt-text);

  overflow: hidden;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   PÁGINA PRINCIPAL
========================================================= */

.login-page {
  width: 100%;
  min-height: 100vh;

  display: grid;

  grid-template-columns:
    minmax(420px, 43%)
    1fr;
}

/* =========================================================
   PAINEL DA MARCA
========================================================= */

.brand-panel {
  position: relative;

  min-height: 100vh;

  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 50px;

  background: linear-gradient(145deg, #0b63ce 0%, #0755b5 52%, #063b7a 100%);

  color: #ffffff;
}

/* =========================================================
   FUNDO DECORATIVO
========================================================= */

.brand-background {
  position: absolute;

  border-radius: 50%;

  pointer-events: none;
}

.brand-background-one {
  width: 550px;
  height: 550px;

  top: -280px;
  right: -260px;

  background: radial-gradient(
    circle,
    rgba(18, 168, 232, 0.18),
    transparent 70%
  );

  filter: blur(10px);

  animation: backgroundFloatOne 12s ease-in-out infinite;
}

.brand-background-two {
  width: 430px;
  height: 430px;

  bottom: -230px;
  left: -230px;

  background: radial-gradient(
    circle,
    rgba(18, 168, 232, 0.13),
    transparent 70%
  );

  filter: blur(10px);

  animation: backgroundFloatTwo 15s ease-in-out infinite;
}

/* =========================================================
   CONTEÚDO DA MARCA
========================================================= */

.brand-content {
  position: relative;

  z-index: 2;

  width: 100%;
  max-width: 560px;

  margin: 0 auto;

  text-align: center;
}

/* =========================================================
   LOGO
========================================================= */

.brand-logo-wrapper {
  position: relative;

  width: 400px;
  height: 200px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto;
}

.brand-logo-glow {
  position: absolute;

  inset: 20px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  filter: blur(35px);

  animation: logoGlow 6s ease-in-out infinite;
}

.brand-logo {
  position: relative;

  z-index: 2;

  width: 380px;
  max-width: none;

  height: auto;

  object-fit: contain;
}

/* =========================================================
   TÍTULO
========================================================= */

.brand-title {
  margin-top: -10px !important;

  font-size: 36px;

  line-height: 1.15;

  letter-spacing: -1px;

  font-weight: 700;
}

/* =========================================================
   DESCRIÇÃO
========================================================= */

.brand-description {
  max-width: 460px;

  margin: 0 auto 38px;

  color: rgba(255, 255, 255, 0.75);

  font-size: 15px;

  line-height: 1.65;
}

/* =========================================================
   FEATURES
========================================================= */

.brand-features {
  width: 100%;

  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 14px;

  margin: 0 auto 38px;
}

.brand-feature {
  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  gap: 10px;

  min-height: 130px;

  padding: 18px 10px;

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 18px;

  background: rgba(255, 255, 255, 0.065);

  backdrop-filter: blur(8px);

  transition:
    transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1),
    background 0.45s ease,
    border-color 0.45s ease;
}

.brand-feature:hover {
  transform: translateY(-3px);

  background: rgba(255, 255, 255, 0.1);

  border-color: rgba(255, 255, 255, 0.2);
}

.brand-feature-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 15px;

  background: rgba(255, 255, 255, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-feature-icon iconify-icon {
  font-size: 25px;

  color: #ffffff;
}

.brand-feature strong {
  display: block;

  font-size: 12px;

  font-weight: 700;

  line-height: 1.2;
}

.brand-feature span {
  display: block;

  margin-top: 3px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 10px;

  line-height: 1.3;
}

/* =========================================================
   ESTATÍSTICAS
========================================================= */

.brand-stats {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 35px;

  margin-top: 5px;
}

.brand-stat {
  display: flex;

  flex-direction: column;

  align-items: center;

  min-width: 70px;
}

.brand-stat strong {
  font-size: 22px;

  line-height: 1;

  font-weight: 700;
}

.brand-stat span {
  margin-top: 6px;

  color: rgba(255, 255, 255, 0.52);

  font-size: 9px;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.8px;
}

.brand-stat-divider {
  width: 1px;

  height: 32px;

  background: rgba(255, 255, 255, 0.18);
}

/* =========================================================
   RODAPÉ DO PAINEL
========================================================= */

.brand-footer {
  position: absolute;

  z-index: 3;

  left: 50%;
  bottom: 25px;

  transform: translateX(-50%);

  width: 100%;

  display: flex;

  justify-content: center;

  align-items: center;

  gap: 8px;

  color: rgba(255, 255, 255, 0.4);

  font-size: 10px;

  text-align: center;
}

/* =========================================================
   PAINEL DE AUTENTICAÇÃO
========================================================= */

.auth-panel {
  position: relative;

  min-height: 100vh;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 40px;

  background:
    radial-gradient(
      circle at 85% 15%,
      rgba(11, 99, 206, 0.055),
      transparent 30%
    ),
    #f7f9fc;

  overflow: hidden;
}

/* =========================================================
   DECORAÇÃO
========================================================= */

.auth-panel::before {
  content: "";

  position: absolute;

  width: 420px;
  height: 420px;

  right: -220px;
  bottom: -220px;

  border-radius: 50%;

  border: 1px solid rgba(11, 99, 206, 0.08);

  pointer-events: none;

  animation: authCircle 14s ease-in-out infinite;
}

.auth-panel::after {
  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  left: -160px;
  top: -160px;

  border-radius: 50%;

  background: rgba(11, 99, 206, 0.025);

  pointer-events: none;
}

/* =========================================================
   WRAPPER
========================================================= */

.auth-wrapper {
  position: relative;

  z-index: 2;

  width: min(500px, 92%);

  padding: 30px 0;
}

/* =========================================================
   HEADER
========================================================= */

.auth-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 22px;

  padding: 0 6px;
}

.system-status {
  display: inline-flex;

  align-items: center;

  gap: 9px;

  padding: 7px 12px;

  background: rgba(255, 255, 255, 0.85);

  border: 1px solid #e8edf4;

  border-radius: 999px;

  color: #5f6b7a;

  font-size: 12px;

  font-weight: 600;
}

.system-status-dot {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #16a34a;

  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);

  animation: systemPulse 3s ease-in-out infinite;
}

.current-time {
  color: #7b8794;

  font-size: 13px;

  font-weight: 500;

  letter-spacing: 0.3px;
}

/* =========================================================
   CARD LOGIN
========================================================= */

.card-login {
  position: relative;

  padding: 42px 42px 34px;

  background: rgba(255, 255, 255, 0.96);

  border: 1px solid #e8edf4;

  border-radius: 24px;

  box-shadow:
    0 20px 55px rgba(15, 23, 42, 0.07),
    0 3px 12px rgba(15, 23, 42, 0.025);

  backdrop-filter: blur(10px);
}

/* =========================================================
   LOGO MOBILE
========================================================= */

.auth-brand-mobile {
  display: none;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 12px;

  background: linear-gradient(135deg, #0b63ce, #12a8e8);

  color: #ffffff;

  font-size: 20px;

  font-weight: 700;
}

/* =========================================================
   TÍTULO AUTENTICAÇÃO
========================================================= */

.auth-title {
  text-align: center;

  margin-bottom: 28px;
}

.auth-eyebrow {
  display: inline-block;

  margin-bottom: 10px;

  color: #0b63ce;

  font-size: 10px;

  font-weight: 800;

  letter-spacing: 1.8px;
}

.auth-title .titulo {
  margin: 0;

  color: #172033;

  font-size: 28px;

  font-weight: 750;

  letter-spacing: -0.7px;
}

.auth-title .subtitulo {
  max-width: 340px;

  margin: 11px auto 0;

  color: #7a8695;

  font-size: 14px;

  line-height: 1.65;
}

/* =========================================================
   MÉTODO DE AUTENTICAÇÃO
========================================================= */

.auth-method {
  display: flex;

  align-items: center;

  gap: 13px;

  padding: 13px 15px;

  margin-bottom: 25px;

  background: #f8fafc;

  border: 1px solid #edf1f6;

  border-radius: 14px;
}

.auth-method-icon {
  width: 39px;
  height: 39px;

  flex: 0 0 39px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 11px;

  background: rgba(11, 99, 206, 0.09);

  color: #0b63ce;
}

.auth-method-icon iconify-icon {
  font-size: 22px;
}

.auth-method > div:nth-child(2) {
  flex: 1;
}

.auth-method strong {
  display: block;

  color: #273246;

  font-size: 13px;

  font-weight: 700;
}

.auth-method span {
  display: block;

  margin-top: 2px;

  color: #8a95a4;

  font-size: 11px;
}

.auth-method-check {
  color: #16a34a;

  font-size: 20px;
}

/* =========================================================
   SCANNER NFC
   DESIGN PREMIUM / ANIMAÇÃO SUAVE
========================================================= */

.scanner-wrapper {
  position: relative;

  width: 100%;

  margin: 0;

  background: #ffffff;

  isolation: isolate;

  overflow: visible;

  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.055);

  transition:
    box-shadow 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   BORDA EXTERNA
========================================================= */

.scanner-wrapper::before {
  content: "";

  position: absolute;

  inset: -1px;

  border-radius: 26px;

  background: linear-gradient(
    135deg,
    rgba(11, 99, 206, 0.14),
    rgba(18, 168, 232, 0.22),
    rgba(11, 99, 206, 0.08)
  );

  z-index: -2;

  opacity: 0.7;

  pointer-events: none;

  animation: scannerBorder 7s ease-in-out infinite;
}

/* =========================================================
   HALO EXTERNO — MUITO SUAVE
========================================================= */

.scanner-wrapper::after {
  content: "";

  position: absolute;

  inset: -8px;

  border-radius: 30px;

  background: radial-gradient(
    ellipse at center,
    rgba(18, 168, 232, 0.12),
    transparent 70%
  );

  filter: blur(14px);

  z-index: -3;

  opacity: 0.25;

  pointer-events: none;

  animation: scannerHalo 7s ease-in-out infinite;
}

/* =========================================================
   ÁREA NFC
========================================================= */

.nfc-scanner {
  position: relative;

  width: 100%;

  min-height: 235px;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  text-align: center;

  overflow: hidden;

  border: 1px solid #e4ebf3;

  border-radius: 19px;

  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(18, 168, 232, 0.055),
      transparent 34%
    ),
    linear-gradient(145deg, #ffffff 0%, #fbfdff 55%, #f6faff 100%);

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 -20px 50px rgba(11, 99, 206, 0.018);

  z-index: 2;
}

/* =========================================================
   GLOW CENTRAL
========================================================= */

.nfc-scanner::before {
  content: "";

  position: absolute;

  width: 160px;
  height: 160px;

  left: 50%;
  top: 47%;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(18, 168, 232, 0.1) 0%,
    rgba(11, 99, 206, 0.035) 42%,
    transparent 72%
  );

  filter: blur(3px);

  pointer-events: none;

  z-index: 0;

  animation: nfcCenterGlow 6s ease-in-out infinite;
}

/* =========================================================
   ONDA NFC
   ONDA GRANDE E LENTA
========================================================= */

.nfc-scanner::after {
  content: "";

  position: absolute;

  width: 45px;
  height: 45px;

  left: 50%;
  top: 43%;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  border: 1px solid rgba(11, 99, 206, 0.18);

  opacity: 0;

  pointer-events: none;

  z-index: 1;

  animation: nfcWave 4.8s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

/* =========================================================
   ÍCONE NFC
========================================================= */

/* =========================================================
   ANEL EXTERNO
========================================================= */

.nfc-animation::before {
  content: "";

  position: absolute;

  inset: -9px;

  border-radius: 50%;

  border: 1px solid rgba(18, 168, 232, 0.18);

  opacity: 0;

  animation: nfcRing 4.8s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

/* =========================================================
   SEGUNDO ANEL
========================================================= */

.nfc-animation::after {
  content: "";

  position: absolute;

  inset: -18px;

  border-radius: 50%;

  border: 1px solid rgba(11, 99, 206, 0.07);

  opacity: 0;

  animation: nfcRing 4.8s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;

  animation-delay: 2.4s;
}

/* =========================================================
   ÍCONE
========================================================= */

.nfc-animation iconify-icon {
  position: relative;

  z-index: 5;

  font-size: 40px;

  color: #0b63ce;

  filter: drop-shadow(0 4px 8px rgba(11, 99, 206, 0.1));

  animation: nfcIconBreath 5s ease-in-out infinite;
}

/* =========================================================
   TÍTULO NFC
========================================================= */

.nfc-title {
  position: relative;

  z-index: 5;

  color: #202b3c;

  font-size: 17px;

  font-weight: 750;

  letter-spacing: -0.25px;
}

/* =========================================================
   SUBTÍTULO NFC
========================================================= */

.nfc-subtitle {
  position: relative;

  z-index: 5;

  margin-top: 7px;

  color: #8a95a4;

  font-size: 12px;

  line-height: 1.5;
}

/* =========================================================
   LINHA DE LEITURA
========================================================= */

.nfc-scanner .nfc-title::after {
  content: "";

  display: block;

  width: 34px;

  height: 1px;

  margin: 12px auto 0;

  border-radius: 10px;

  background: linear-gradient(90deg, transparent, #12a8e8, transparent);

  opacity: 0.5;

  animation: nfcScanningLine 4s ease-in-out infinite;
}

/* =========================================================
   INPUT NFC INVISÍVEL
========================================================= */

.nfc-input {
  position: absolute;

  width: 1px;
  height: 1px;

  left: -9999px;
  top: -9999px;

  opacity: 0;

  border: 0;

  outline: none;

  pointer-events: none;
}

/* =========================================================
   STATUS
========================================================= */

.status {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  min-height: 42px;

  margin-top: 16px;

  padding: 10px 14px;

  border-radius: 12px;

  background: #f8fafc;

  border: 1px solid #edf1f6;

  transition:
    background 0.35s ease,
    border-color 0.35s ease;
}

.status-icon {
  display: flex;

  align-items: center;

  justify-content: center;

  color: #0b63ce;

  font-size: 17px;
}

.status-text {
  color: #697586;

  font-size: 12px;

  font-weight: 600;

  text-align: center;
}

/* =========================================================
   STATUS SUCESSO
========================================================= */

.status-success {
  background: rgba(22, 163, 74, 0.06);

  border-color: rgba(22, 163, 74, 0.13);
}

.status-success .status-icon {
  color: #16a34a;
}

.status-success .status-text {
  color: #15803d;
}

/* =========================================================
   STATUS ERRO
========================================================= */

.status-error {
  background: rgba(220, 38, 38, 0.05);

  border-color: rgba(220, 38, 38, 0.12);
}

.status-error .status-icon {
  color: #dc2626;
}

.status-error .status-text {
  color: #b91c1c;
}

/* =========================================================
   PROGRESSO
========================================================= */

.progress-container {
  margin-top: 20px;
}

.progress-label {
  display: flex;

  align-items: center;

  justify-content: space-between;

  margin-bottom: 8px;

  color: #9aa4b2;

  font-size: 10px;

  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.7px;
}

.progress {
  overflow: hidden;

  background: #edf1f6 !important;

  border-radius: 20px;
}

.progress-bar {
  background: linear-gradient(90deg, #0b63ce, #12a8e8) !important;

  border-radius: 20px;

  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   SEGURANÇA
========================================================= */

.security-footer {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 22px;

  margin-top: 25px;

  padding-top: 21px;

  border-top: 1px solid #edf1f6;
}

.security-item {
  display: flex;

  align-items: center;

  gap: 6px;

  color: #9aa4b2;

  font-size: 10px;

  font-weight: 600;
}

.security-item iconify-icon {
  color: #6b8fbd;

  font-size: 15px;
}

/* =========================================================
   FOOTER
========================================================= */

.auth-footer {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 10px;

  margin-top: 18px;

  color: #9aa4b2;

  font-size: 10px;

  font-weight: 500;
}

.footer-separator {
  color: #cbd2da;
}

/* =========================================================
   SWEETALERT2
========================================================= */

.swal2-container {
  z-index: 99999 !important;
}

.swal2-popup {
  position: relative;

  z-index: 100000 !important;

  border-radius: 18px !important;

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.22) !important;
}

.swal2-title {
  font-weight: 700 !important;
}

.swal2-confirm {
  border-radius: 10px !important;

  padding: 10px 24px !important;

  font-weight: 600 !important;
}

.swal2-icon {
  animation: pulseIcon 0.6s ease;
}

/* =========================================================
   RATE LIMIT FACIAL
========================================================= */

.triamed-face-rate-limit {
  position: relative;

  z-index: 100000 !important;
}

.triamed-face-rate-limit-backdrop {
  z-index: 99998 !important;
}

/* =========================================================
   MODAL FACIAL
========================================================= */

.tm-face-overlay {
  position: fixed;

  inset: 0;

  display: none;

  align-items: center;

  justify-content: center;

  padding: 25px;

  background: rgba(3, 17, 34, 0.72);

  backdrop-filter: blur(18px);

  z-index: 1000 !important;
}

.tm-face-modal {
  position: relative;

  width: 620px;

  max-width: 100%;

  max-height: calc(100vh - 40px);

  overflow: auto;

  border: 1px solid rgba(255, 255, 255, 0.25);

  border-radius: 28px;

  background: #ffffff;

  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);

  animation: faceOpen 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   CABEÇALHO FACIAL
========================================================= */

.tm-face-top {
  display: flex;

  align-items: center;

  gap: 15px;

  padding: 22px 28px;

  background: linear-gradient(135deg, #0b63ce, #084b9b);

  color: #ffffff;
}

.tm-face-brand {
  display: flex;

  align-items: center;

  gap: 13px;
}

.tm-logo-face {
  width: 48px;
  height: 48px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.13);

  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tm-logo-face iconify-icon {
  font-size: 27px;
}

.tm-title {
  display: flex;

  flex-direction: column;
}

.tm-title strong {
  font-size: 17px;

  font-weight: 700;
}

.tm-title span {
  margin-top: 2px;

  font-size: 11px;

  color: rgba(255, 255, 255, 0.7);
}

.tm-online {
  display: flex;

  align-items: center;

  gap: 7px;

  margin-left: auto;

  font-size: 10px;

  color: rgba(255, 255, 255, 0.72);

  white-space: nowrap;
}

.tm-online span {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #35d39a;

  box-shadow: 0 0 12px rgba(53, 211, 154, 0.8);

  animation: onlinePulse 3s ease-in-out infinite;
}

/* =========================================================
   USUÁRIO FACIAL
========================================================= */

.tm-user {
  display: flex;

  align-items: center;

  gap: 15px;

  padding: 22px 28px;
}

.tm-user-icon {
  width: 55px;
  height: 55px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  border-radius: 50%;

  background: #eaf3ff;
}

.tm-user-icon iconify-icon {
  font-size: 43px;

  color: var(--nt-primary);
}

.tm-user-info {
  min-width: 0;
}

#tmFaceUser {
  display: block;

  color: var(--nt-text);

  font-size: 20px;

  font-weight: 700;
}

.tm-cargo {
  display: flex;

  align-items: center;

  gap: 5px;

  margin-top: 3px;

  color: var(--nt-primary);

  font-size: 12px;

  font-weight: 700;
}

.tm-cargo iconify-icon {
  font-size: 17px;
}

.tm-user-info p {
  margin: 5px 0 0;

  color: var(--nt-text-muted);

  font-size: 11px;
}

/* =========================================================
   CÂMERA FACIAL
========================================================= */

.tm-camera-area {
  position: relative;

  height: 335px;

  display: flex;

  align-items: center;

  justify-content: center;

  overflow: hidden;

  background: #f4f8fc;
}

.tm-camera {
  position: relative;

  z-index: 5;

  width: 270px;
  height: 270px;

  overflow: hidden;

  border: 7px solid #ffffff;

  border-radius: 50%;

  background: #071a2f;

  box-shadow: 0 15px 45px rgba(6, 59, 122, 0.22);
}

.tm-camera video {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

#tmCanvas {
  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  pointer-events: none;
}

/* =========================================================
   GUIA FACIAL
========================================================= */

.tm-face-guide {
  position: absolute;

  inset: 35px;

  z-index: 15;

  pointer-events: none;
}

.tm-face-guide span {
  position: absolute;

  width: 28px;
  height: 28px;

  border: 2px solid #35d39a;
}

.tm-face-guide span:nth-child(1) {
  top: 0;
  left: 0;

  border-right: none;
  border-bottom: none;
}

.tm-face-guide span:nth-child(2) {
  top: 0;
  right: 0;

  border-left: none;
  border-bottom: none;
}

.tm-face-guide span:nth-child(3) {
  bottom: 0;
  left: 0;

  border-right: none;
  border-top: none;
}

.tm-face-guide span:nth-child(4) {
  bottom: 0;
  right: 0;

  border-left: none;
  border-top: none;
}

/* =========================================================
   SCANNER FACIAL
========================================================= */

.tm-camera-overlay {
  position: absolute;

  inset: 0;

  z-index: 20;

  pointer-events: none;
}

.tm-camera-scan-line {
  position: absolute;

  left: 20px;
  right: 20px;

  top: 20%;

  height: 2px;

  background: linear-gradient(90deg, transparent, #35d39a, transparent);

  box-shadow: 0 0 12px rgba(53, 211, 154, 0.65);

  animation: faceScanner 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

/* =========================================================
   ANÉIS FACIAIS
========================================================= */

.tm-pulse-ring {
  position: absolute;

  width: 285px;
  height: 285px;

  border: 1px solid rgba(11, 99, 206, 0.3);

  border-radius: 50%;

  opacity: 0.35;

  animation: pulseFace 5s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

.ring-1 {
  animation-delay: 0s;
}

.ring-2 {
  animation-delay: 1.65s;
}

.ring-3 {
  animation-delay: 3.3s;
}

/* =========================================================
   STATUS FACIAL
========================================================= */

.tm-face-status {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  min-height: 32px;

  padding: 0 25px;

  color: var(--nt-primary);

  font-size: 15px;

  font-weight: 700;

  text-align: center;
}

.tm-face-status iconify-icon {
  font-size: 18px;
}

/* =========================================================
   PROGRESSO FACIAL
========================================================= */

.tm-progress {
  height: 7px;

  margin: 18px 32px;

  overflow: hidden;

  border-radius: 20px;

  background: #e8eef5;
}

#tmFaceProgress {
  width: 0;

  height: 100%;

  border-radius: 20px;

  background: linear-gradient(90deg, #0b63ce, #12a8e8);

  transition: width 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* =========================================================
   SEGURANÇA FACIAL
========================================================= */

.tm-security {
  display: flex;

  justify-content: center;

  gap: 45px;

  padding: 8px 25px 18px;

  color: #7a899b;

  font-size: 10px;
}

.tm-security div {
  display: flex;

  align-items: center;

  gap: 6px;
}

.tm-security iconify-icon {
  color: var(--nt-primary);

  font-size: 18px;
}

/* =========================================================
   BOTÃO CANCELAR
========================================================= */

.tm-close {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 7px;

  margin: 4px auto 22px;

  padding: 10px 25px;

  border: 1px solid #e2e8f0;

  border-radius: 25px;

  background: #f8fafc;

  color: #64748b;

  font-size: 12px;

  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.tm-close iconify-icon {
  font-size: 17px;
}

.tm-close:hover {
  border-color: #fca5a5;

  background: #fef2f2;

  color: #dc2626;

  transform: translateY(-1px);
}

/* =========================================================
   ANIMAÇÕES
   SUAVES
========================================================= */

/* ---------------------------------------------------------
   STATUS ONLINE
--------------------------------------------------------- */

@keyframes systemPulse {
  0%,
  100% {
    opacity: 1;

    transform: scale(1);
  }

  50% {
    opacity: 0.65;

    transform: scale(0.92);
  }
}

/* ---------------------------------------------------------
   ONLINE FACIAL
--------------------------------------------------------- */

@keyframes onlinePulse {
  0%,
  100% {
    opacity: 0.75;

    transform: scale(0.95);
  }

  50% {
    opacity: 1;

    transform: scale(1.05);
  }
}

/* ---------------------------------------------------------
   FUNDO ESQUERDO
--------------------------------------------------------- */

@keyframes backgroundFloatOne {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(-12px, 10px, 0) scale(1.03);
  }
}

/* ---------------------------------------------------------
   FUNDO INFERIOR
--------------------------------------------------------- */

@keyframes backgroundFloatTwo {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(10px, -8px, 0) scale(1.025);
  }
}

/* ---------------------------------------------------------
   GLOW DA LOGO
--------------------------------------------------------- */

@keyframes logoGlow {
  0%,
  100% {
    opacity: 0.65;

    transform: scale(0.96);
  }

  50% {
    opacity: 0.9;

    transform: scale(1.02);
  }
}

/* ---------------------------------------------------------
   CÍRCULO DO PAINEL
--------------------------------------------------------- */

@keyframes authCircle {
  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-12px, -10px);
  }
}

/* ---------------------------------------------------------
   BORDA DO SCANNER
--------------------------------------------------------- */

@keyframes scannerBorder {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 0.82;
  }
}

/* ---------------------------------------------------------
   HALO DO SCANNER
--------------------------------------------------------- */

@keyframes scannerHalo {
  0%,
  100% {
    opacity: 0.18;

    transform: scale(0.985);
  }

  50% {
    opacity: 0.34;

    transform: scale(1.008);
  }
}

/* ---------------------------------------------------------
   FLUTUAÇÃO NFC
--------------------------------------------------------- */

@keyframes nfcDeviceFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(0, -2px, 0);
  }
}

/* ---------------------------------------------------------
   RESPIRAÇÃO DO ÍCONE
--------------------------------------------------------- */

@keyframes nfcIconBreath {
  0%,
  100% {
    opacity: 0.92;

    transform: scale(0.985);
  }

  50% {
    opacity: 1;

    transform: scale(1.015);
  }
}

/* ---------------------------------------------------------
   GLOW CENTRAL NFC
--------------------------------------------------------- */

@keyframes nfcCenterGlow {
  0%,
  100% {
    opacity: 0.28;

    transform: translate(-50%, -50%) scale(0.92);
  }

  50% {
    opacity: 0.5;

    transform: translate(-50%, -50%) scale(1.04);
  }
}

/* ---------------------------------------------------------
   ONDA NFC
--------------------------------------------------------- */

@keyframes nfcWave {
  0% {
    width: 48px;
    height: 48px;

    opacity: 0;
  }

  10% {
    opacity: 0.22;
  }

  55% {
    opacity: 0.06;
  }

  100% {
    width: 185px;
    height: 185px;

    opacity: 0;
  }
}

/* ---------------------------------------------------------
   ANÉIS DO ÍCONE
--------------------------------------------------------- */

@keyframes nfcRing {
  0% {
    opacity: 0;

    transform: scale(0.9);
  }

  12% {
    opacity: 0.3;
  }

  65% {
    opacity: 0.06;
  }

  100% {
    opacity: 0;

    transform: scale(1.08);
  }
}

/* ---------------------------------------------------------
   LINHA NFC
--------------------------------------------------------- */

@keyframes nfcScanningLine {
  0%,
  100% {
    width: 30px;

    opacity: 0.25;
  }

  50% {
    width: 46px;

    opacity: 0.55;
  }
}

/* ---------------------------------------------------------
   SWEETALERT
--------------------------------------------------------- */

@keyframes pulseIcon {
  0% {
    transform: scale(0.92);

    opacity: 0;
  }

  100% {
    transform: scale(1);

    opacity: 1;
  }
}

/* ---------------------------------------------------------
   ABERTURA MODAL FACIAL
--------------------------------------------------------- */

@keyframes faceOpen {
  from {
    opacity: 0;

    transform: scale(0.96) translateY(8px);
  }

  to {
    opacity: 1;

    transform: scale(1) translateY(0);
  }
}

/* ---------------------------------------------------------
   SCANNER FACIAL
--------------------------------------------------------- */

@keyframes faceScanner {
  0% {
    top: 20%;

    opacity: 0.45;
  }

  50% {
    top: 80%;

    opacity: 0.8;
  }

  100% {
    top: 20%;

    opacity: 0.45;
  }
}

/* ---------------------------------------------------------
   ANÉIS FACIAIS
--------------------------------------------------------- */

@keyframes pulseFace {
  0% {
    transform: scale(0.94);

    opacity: 0.25;
  }

  60% {
    transform: scale(1.14);

    opacity: 0.08;
  }

  100% {
    transform: scale(1.2);

    opacity: 0;
  }
}

/* =========================================================
   RESPONSIVIDADE — 1100px
========================================================= */

@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: 38% 62%;
  }

  .brand-panel {
    padding: 45px;
  }

  .brand-title {
    font-size: 35px;
  }

  .card-login {
    padding: 32px;
  }
}

/* =========================================================
   RESPONSIVIDADE — 900px
========================================================= */

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .login-page {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;

    padding: 20px;
  }

  .auth-brand-mobile {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 28px;
  }

  .auth-brand-mobile strong {
    display: block;

    color: var(--nt-text);

    font-size: 16px;
  }

  .auth-brand-mobile small {
    display: block;

    margin-top: 2px;

    color: var(--nt-text-muted);

    font-size: 9px;
  }
}

/* =========================================================
   RESPONSIVIDADE — 768px
========================================================= */

@media (max-width: 768px) {
  .auth-panel {
    min-height: 100vh;

    padding: 20px;
  }

  .auth-wrapper {
    width: 100%;

    padding: 10px 0;
  }

  .card-login {
    padding: 30px 22px 26px;

    border-radius: 20px;
  }

  .auth-title .titulo {
    font-size: 24px;
  }

  .nfc-scanner {
    min-height: 215px;
  }

  .security-footer {
    gap: 12px;
  }

  .scanner-wrapper {
    padding: 6px;

    border-radius: 22px;
  }

  .nfc-scanner {
    border-radius: 17px;
  }

  .nfc-animation {
    width: 78px;
    height: 78px;
  }

  .nfc-animation iconify-icon {
    font-size: 37px;
  }

  .tm-face-overlay {
    padding: 12px;
  }

  .tm-face-modal {
    max-height: calc(100vh - 24px);

    border-radius: 20px;
  }

  .tm-face-top {
    padding: 18px;
  }

  .tm-user {
    padding: 18px;
  }

  .tm-camera-area {
    height: 290px;
  }

  .tm-camera {
    width: 230px;
    height: 230px;
  }

  .tm-pulse-ring {
    width: 245px;
    height: 245px;
  }

  .tm-security {
    gap: 18px;
  }
}

/* =========================================================
   RESPONSIVIDADE — 600px
========================================================= */

@media (max-width: 600px) {
  .auth-panel {
    padding: 12px;
  }

  .auth-header {
    margin-bottom: 12px;
  }

  .card-login {
    padding: 22px;
  }

  .scanner-wrapper {
    padding: 5px;

    border-radius: 20px;
  }

  .nfc-scanner {
    min-height: 205px;

    border-radius: 16px;
  }

  .nfc-animation {
    width: 74px;
    height: 74px;

    margin-bottom: 15px;
  }

  .nfc-animation iconify-icon {
    font-size: 34px;
  }

  .nfc-title {
    font-size: 16px;
  }

  .nfc-subtitle {
    font-size: 11px;
  }
}

/* =========================================================
   RESPONSIVIDADE — 480px
========================================================= */

@media (max-width: 480px) {
  .auth-header {
    margin-bottom: 14px;
  }

  .current-time {
    display: none;
  }

  .card-login {
    padding: 27px 18px 23px;
  }

  .auth-method {
    padding: 11px;
  }

  .security-footer {
    flex-direction: column;

    gap: 8px;
  }

  .tm-face-top {
    padding: 16px;
  }

  .tm-user {
    padding: 16px;
  }

  .tm-camera-area {
    height: 270px;
  }

  .tm-camera {
    width: 215px;
    height: 215px;
  }

  .tm-pulse-ring {
    width: 230px;
    height: 230px;
  }
}

/* =========================================================
   ACESSIBILIDADE
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    scroll-behavior: auto !important;
  }
}

/* =========================================================
   NFC — POSICIONAMENTO DA ANIMAÇÃO
========================================================= */
/* =========================================================
   ANIMAÇÃO NFC — TAMANHO AJUSTADO
========================================================= */

.nfc-animation {
  width: 100%;
  height: 330px;
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 4px;

  overflow: hidden;
}

/* =========================================================
   ILUSTRAÇÃO / GIF NFC
========================================================= */

.nfc-gif {
  width: 480px;
  height: 320px;

  object-fit: contain;
  display: block;

  margin: 0 auto;

  pointer-events: none;
  user-select: none;

  /* Pequena suavização visual */
  filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.08));
}

/* =========================================================
   LEITOR NFC
========================================================= */

.nfc-reader {
  position: absolute;

  left: 50%;
  bottom: 8px;

  width: 82px;
  height: 48px;

  transform: translateX(-50%);

  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);

  border: 1px solid rgba(11, 99, 206, 0.12);

  border-radius: 13px;

  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.08),
    0 2px 5px rgba(15, 23, 42, 0.05);

  z-index: 2;
}

/* =========================================================
   PARTE SUPERIOR DO LEITOR
========================================================= */

.nfc-reader-top {
  position: absolute;

  top: -5px;
  left: 10px;

  width: 62px;
  height: 8px;

  border-radius: 8px 8px 3px 3px;

  background: #dce5ef;
}

/* =========================================================
   LUZ DO LEITOR
========================================================= */

.nfc-reader-light {
  position: absolute;

  left: 50%;
  bottom: 8px;

  width: 7px;
  height: 7px;

  transform: translateX(-50%);

  border-radius: 50%;

  background: #0b63ce;

  box-shadow:
    0 0 0 4px rgba(11, 99, 206, 0.08),
    0 0 12px rgba(11, 99, 206, 0.35);

  animation: nfcLight 2.8s ease-in-out infinite;
}

/* =========================================================
   ONDAS NFC
========================================================= */

.nfc-signal {
  position: absolute;

  top: -32px;
  left: 50%;

  width: 70px;
  height: 70px;

  transform: translateX(-50%);

  pointer-events: none;
}

.nfc-signal span {
  position: absolute;

  left: 50%;
  top: 50%;

  width: 14px;
  height: 14px;

  transform: translate(-50%, -50%);

  border: 2px solid rgba(11, 99, 206, 0.35);

  border-radius: 50%;

  opacity: 0;

  animation: nfcWave 2.8s ease-out infinite;
}

.nfc-signal span:nth-child(2) {
  animation-delay: 0.55s;
}

.nfc-signal span:nth-child(3) {
  animation-delay: 1.1s;
}

.nfc-title {
  margin-top: 0;
  text-align: center;
}

.nfc-subtitle {
  margin-top: 4px;
  text-align: center;
}

/* =========================================================
   ANIMAÇÃO NFC
========================================================= */

.nfc-animation {
  width: 100%;
  height: 155px;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 4px;

  overflow: hidden;
}

/* =========================================================
   LEITOR NFC
========================================================= */

.nfc-reader {
  position: absolute;

  left: 50%;
  bottom: 8px;

  width: 82px;
  height: 48px;

  transform: translateX(-50%);

  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);

  border: 1px solid rgba(11, 99, 206, 0.12);

  border-radius: 13px;

  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.08),
    0 2px 5px rgba(15, 23, 42, 0.05);

  z-index: 2;
}

/* Parte superior */

.nfc-reader-top {
  position: absolute;

  top: -5px;
  left: 10px;

  width: 62px;
  height: 8px;

  border-radius: 8px 8px 3px 3px;

  background: #dce5ef;
}

/* Luz do leitor */

.nfc-reader-light {
  position: absolute;

  left: 50%;
  bottom: 8px;

  width: 7px;
  height: 7px;

  transform: translateX(-50%);

  border-radius: 50%;

  background: #0b63ce;

  box-shadow:
    0 0 0 4px rgba(11, 99, 206, 0.08),
    0 0 12px rgba(11, 99, 206, 0.35);

  animation: nfcLight 2.8s ease-in-out infinite;
}

/* =========================================================
   ONDAS NFC
========================================================= */

.nfc-signal {
  position: absolute;

  top: -32px;
  left: 50%;

  width: 70px;
  height: 70px;

  transform: translateX(-50%);

  pointer-events: none;
}

.nfc-signal span {
  position: absolute;

  left: 50%;
  top: 50%;

  width: 14px;
  height: 14px;

  transform: translate(-50%, -50%);

  border: 2px solid rgba(11, 99, 206, 0.35);

  border-radius: 50%;

  opacity: 0;

  animation: nfcWave 2.8s ease-out infinite;
}

.nfc-signal span:nth-child(2) {
  animation-delay: 0.55s;
}

.nfc-signal span:nth-child(3) {
  animation-delay: 1.1s;
}

/* =========================================================
   ACESSIBILIDADE
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .nfc-hand,
  .nfc-signal span,
  .nfc-reader-light,
  .bracelet-chip {
    animation: none;
  }
}
