/* Crachá 3D do colaborador */
.cr-fundo { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, rgba(22, 66, 122, .94), rgba(5, 12, 26, .975) 62%);
  animation: fade .2s ease; touch-action: none; user-select: none; -webkit-user-select: none; }
.cr-fundo.saindo { opacity: 0; transition: opacity .2s; }
.cr-cena { perspective: 1100px; perspective-origin: 50% 30%; flex: 1; display: flex; justify-content: center; width: 100%; min-height: 0; }
.cr-pendulo { position: relative; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; padding-top: clamp(70px, 16vh, 150px);
  animation: cr-balanco 1.9s cubic-bezier(.3, .1, .2, 1) both; }
.cr-persp { perspective: 1000px; position: relative; z-index: 1; }
.cr-incl { transform-style: preserve-3d; will-change: transform; border-radius: 22px; }
@keyframes cr-balanco {
  0% { transform: translateY(-110%) rotateZ(-9deg) rotateX(28deg); }
  28% { transform: translateY(0) rotateZ(6deg) rotateX(-10deg); }
  46% { transform: rotateZ(-3.6deg) rotateX(5deg); }
  64% { transform: rotateZ(2deg) rotateX(-2.5deg); }
  82% { transform: rotateZ(-.8deg) rotateX(1deg); }
  100% { transform: none; }
}
/* cordão: duas tiras que saem do topo da tela e se encontram no prendedor */
.cr-cordao { position: absolute; top: -40px; left: 50%; width: 150px; height: calc(clamp(70px, 16vh, 150px) + 28px); transform: translateX(-50%); pointer-events: none; }
.cr-cordao i { position: absolute; top: 0; bottom: 0; width: 15px; border-radius: 3px;
  background: repeating-linear-gradient(180deg, #1d5fae 0 22px, #1a4f8f 22px 44px); box-shadow: inset 2px 0 0 rgba(255,255,255,.16), inset -2px 0 0 rgba(0,0,0,.2), 0 6px 14px rgba(0,0,0,.35); }
.cr-cordao i:first-child { left: 0; transform-origin: 50% 100%; transform: translateX(60px) rotate(-17deg); }
.cr-cordao i:last-child { right: 0; transform-origin: 50% 100%; transform: translateX(-60px) rotate(17deg); }
.cr-clip { position: relative; z-index: 2; width: 34px; height: 30px; margin-bottom: -14px; border-radius: 7px 7px 10px 10px;
  background: linear-gradient(180deg, #f1f5f9, #94a3b8 55%, #cbd5e1); box-shadow: 0 4px 10px rgba(0,0,0,.4), inset 0 1px 0 #fff; }
.cr-clip::after { content: ''; position: absolute; left: 50%; bottom: 5px; width: 14px; height: 6px; margin-left: -7px; border-radius: 3px; background: rgba(15, 27, 45, .45); }

.cr-cartao { position: relative; width: min(300px, 78vw); aspect-ratio: 300 / 468; transform-style: preserve-3d; transform: rotateY(0deg);
  transition: transform .7s cubic-bezier(.2, .9, .25, 1.15); will-change: transform; cursor: pointer; outline: none; border-radius: 22px; -webkit-tap-highlight-color: transparent; }
.cr-cartao.virado { transform: rotateY(180deg); }
.cr-cartao:focus-visible .cr-face { box-shadow: 0 0 0 3px #f5c451, 0 30px 60px -18px rgba(0,0,0,.6); }
.cr-face { position: absolute; inset: 0; border-radius: 22px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; align-items: center;
  color: #0f1b2d; background: #fbfcfe; box-shadow: 0 26px 44px -18px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.14); contain: layout paint; transform: translateZ(0); }
.cr-verso { transform: rotateY(180deg) translateZ(0); background: linear-gradient(165deg, #0b2545, #123a6b 70%, #0b2545); color: #e8f0fb; padding: 54px 24px 22px; align-items: stretch; }
.cr-furo { position: absolute; top: 14px; left: 50%; width: 46px; height: 11px; margin-left: -23px; border-radius: 8px; background: rgba(5, 12, 26, .82); box-shadow: inset 0 1px 3px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.25); z-index: 3; }

/* frente */
.cr-frente header { width: 100%; padding: 40px 20px 46px; display: flex; align-items: center; justify-content: center; gap: 11px; color: #fff;
  background: linear-gradient(160deg, #0b2545 0%, #1a4f8f 100%); position: relative; }
.cr-frente header::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #b8860b, #f5c451 35%, #fff3c4 50%, #f5c451 65%, #b8860b); }
.cr-frente header img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1.5px rgba(245, 196, 81, .7); }
.cr-frente header b { display: block; font-size: 21px; letter-spacing: .14em; line-height: 1; }
.cr-frente header small { display: block; margin-top: 4px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .82; white-space: nowrap; }
.cr-foto { width: 46%; aspect-ratio: 1; margin-top: -34px; border-radius: 24%; overflow: hidden; background: #e6effb; position: relative; z-index: 2;
  box-shadow: 0 0 0 4px #fbfcfe, 0 0 0 5.5px #f5c451, 0 14px 26px -10px rgba(11, 37, 69, .55); display: grid; place-items: center; flex: none; }
.cr-foto img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; pointer-events: none; }
.cr-foto span { font-size: 44px; font-weight: 800; color: #1a4f8f; letter-spacing: .02em; }
.cr-frente h3 { margin: 16px 18px 0; font-size: 17px; line-height: 1.22; text-align: center; font-weight: 800; letter-spacing: .01em; text-wrap: balance; }
.cr-funcao { margin: 6px 18px 0; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #1a4f8f; text-align: center; }
.cr-sit { margin-top: auto; margin-bottom: 22px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; position: relative; z-index: 2; }
.cr-sit.verde { background: #dcfce7; color: #15803d; } .cr-sit.amarelo { background: #fef3c7; color: #a16207; } .cr-sit.cinza { background: #e2e8f0; color: #475569; }
/* faixa holográfica e brilho: desenhados uma vez; ao inclinar só deslizam (transform), sem redesenhar */
.cr-holo { position: absolute; left: 0; right: 0; bottom: 58px; height: 34px; overflow: hidden; pointer-events: none; opacity: .5;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 5px); mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 5px); }
.cr-holo i { position: absolute; top: 0; bottom: 0; left: -100%; width: 300%; will-change: transform;
  background: linear-gradient(100deg, #ff7ab8, #ffd36e, #7dffb1, #6ec8ff, #b58bff, #ff7ab8, #ffd36e, #7dffb1); }
.cr-brilho { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; opacity: 0; transition: opacity .35s; }
.cr-brilho i { position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; will-change: transform;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.42), rgba(255,255,255,.1) 18%, transparent 34%); }
.cr-verso .cr-brilho i { background: radial-gradient(circle at 50% 50%, rgba(160, 200, 255, .22), transparent 30%); }
.cr-incl.vivo .cr-brilho { opacity: 1; }

/* verso */
.cr-verso h4 { margin: 0 0 14px; font-size: 14px; font-weight: 700; line-height: 1.3; padding-bottom: 12px; border-bottom: 1px solid rgba(245, 196, 81, .55); }
.cr-verso dl { margin: 0; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.cr-verso dl div { display: flex; flex-direction: column; gap: 1px; }
.cr-verso dt { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: #9db7dc; font-weight: 600; }
.cr-verso dd { margin: 0; font-size: 14px; font-weight: 600; }
.cr-verso dd.verde { color: #86efac; } .cr-verso dd.amarelo { color: #fde68a; } .cr-verso dd.vermelho { color: #fca5a5; }
.cr-codigo { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 12px 9px; border-radius: 12px; background: #fbfcfe; color: #0f1b2d; }
.cr-barras { display: flex; align-items: stretch; gap: 2px; height: 30px; }
.cr-barras i { background: #0f1b2d; display: block; }
.cr-codigo span { font-size: 10px; letter-spacing: .26em; font-weight: 700; }

.cr-dica { margin: 0 0 max(22px, env(safe-area-inset-bottom)); padding: 0 20px; color: rgba(255,255,255,.72); font-size: 12.5px; text-align: center; animation: fade .6s 1.2s both; }
.cr-fechar { position: absolute; top: 14px; right: 14px; color: #fff; z-index: 5; }
@media (max-height: 700px) { .cr-pendulo { padding-top: 56px; } .cr-cartao { width: min(250px, 70vw); } .cr-cordao { height: 84px; } .cr-frente header { padding: 34px 16px 40px; } .cr-frente h3 { font-size: 15px; margin-top: 12px; } .cr-verso { padding: 46px 20px 16px; } .cr-verso dl { gap: 7px; } }
@media (prefers-reduced-motion: reduce) { .cr-pendulo { animation: fade .2s both; } .cr-cartao { transition: none; } }
