/* ACAISAN PLAN — Decoração de Natal. Só existe com body.xm (posta por natal.js na temporada). body.xm-off esconde tudo. */
body.xm { --xm-red: #e5484d; --xm-gold: #f5c451; --xm-green: #a3e635; --xm-blue: #60a5fa; }
body.xm.xm-off .xm-lights, body.xm.xm-off .xm-hat, body.xm.xm-off .xm-sky, body.xm.xm-off .xm-card,
body.xm.xm-gate .xm-sky, body.xm.xm-gate .xm-lights, body.xm.xm-gate .xm-hat { display: none !important; }

/* Pisca-pisca no topo */
body.xm .workspace-bar { position: relative; }
body.xm .xm-lights { position: absolute; left: 0; right: 0; bottom: -9px; height: 18px; display: flex; justify-content: space-between; padding: 0 14px; pointer-events: none; z-index: 2; }
body.xm .xm-lights::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 9px; border-bottom: 1px solid rgba(255, 255, 255, .14); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
body.xm .xm-lights i { position: relative; top: 4px; width: 6px; height: 9px; border-radius: 50% 50% 45% 45%; background: var(--c); box-shadow: 0 0 8px var(--c), 0 0 2px var(--c); opacity: .9; }
body.xm .xm-lights i::before { content: ""; position: absolute; left: 1px; top: -3px; width: 4px; height: 3px; border-radius: 1px; background: #3f3f46; }
body.xm .xm-lights i:nth-child(4n+1) { --c: var(--xm-red); }
body.xm .xm-lights i:nth-child(4n+2) { --c: var(--xm-gold); }
body.xm .xm-lights i:nth-child(4n+3) { --c: var(--xm-green); }
body.xm .xm-lights i:nth-child(4n+4) { --c: var(--xm-blue); }
body.xm .xm-lights i:nth-child(even) { top: 6px; }
body.xm.xm-motion .xm-lights i { animation: xm-blink 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.37s); }
@keyframes xm-blink { 0%, 100% { opacity: .95; } 50% { opacity: .25; box-shadow: none; } }

/* Gorro na logo da lateral */
body.xm .acaisan-brand-lockup, body.xm .acd-top-brand { position: relative; }
body.xm .xm-hat { position: absolute; left: 50%; top: 1px; width: 27px; height: 20px; transform: translate(-30%, 0) rotate(-14deg); pointer-events: none; z-index: 3; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
body.xm .xm-hat svg { width: 100%; height: 100%; display: block; }
body.xm .acd-top-brand .xm-hat { width: 20px; height: 15px; top: -9px; left: 30%; }

/* Neve só na faixa de cima, sumindo para baixo; nunca captura cliques */
body.xm .xm-sky { position: fixed; left: 0; right: 0; top: 0; height: 260px; pointer-events: none; z-index: 40; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
body.xm .xm-snow { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }

/* Cartão de boas festas no Painel */
body.xm #dashboard .xm-card { position: relative; display: flex; align-items: center; gap: 18px; margin: 0 0 16px; padding: 16px 52px 16px 18px; border-radius: 18px; overflow: hidden;
  background: radial-gradient(420px 140px at 0 0, rgba(229, 72, 77, .18), transparent 70%), radial-gradient(420px 160px at 100% 100%, rgba(163, 230, 53, .12), transparent 70%), #121214;
  border: 1px solid rgba(245, 196, 81, .32); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
body.xm #dashboard .xm-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(circle, rgba(255, 255, 255, .5) 1px, transparent 1.5px); background-size: 46px 46px; opacity: .14; }
body.xm .xm-tree { flex: 0 0 52px; height: 62px; }
body.xm .xm-tree svg { width: 100%; height: 100%; display: block; overflow: visible; }
body.xm.xm-motion .xm-tree .xm-star { transform-origin: 40px 9px; animation: xm-star 3s ease-in-out infinite; }
body.xm.xm-motion .xm-tree .xm-ball { animation: xm-blink 2.2s ease-in-out infinite; }
body.xm.xm-motion .xm-tree .xm-ball:nth-of-type(2n) { animation-delay: -1.1s; }
@keyframes xm-star { 50% { transform: scale(1.18) rotate(8deg); filter: drop-shadow(0 0 6px #f5c451); } }
body.xm .xm-card-txt { display: grid; gap: 4px; min-width: 0; position: relative; z-index: 1; }
body.xm .xm-card-txt small { font: 700 10.5px/1.2 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; color: var(--xm-gold); }
body.xm .xm-card-txt b { font: 800 20px/1.2 "Manrope", "Inter", system-ui, sans-serif; color: #fff; letter-spacing: -.01em; }
body.xm .xm-card-txt span { font-size: 13px; color: #a1a1aa; }
body.xm .xm-card-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #a1a1aa; font-size: 18px; line-height: 1; cursor: pointer; }
body.xm .xm-card-x:hover { color: #fff; }

/* Botão liga/desliga */
body.xm #acNatalToggle { font-size: 13px; min-width: 38px; padding-left: 10px; padding-right: 10px; }
body.xm #acNatalToggle[aria-pressed="true"] span { color: #bae6fd; text-shadow: 0 0 8px rgba(186, 230, 253, .7); }
body.xm #acNatalToggle[aria-pressed="false"] span { opacity: .45; }

/* Lobby "Meu dia" no clima de Natal */
#acLobby.lob.xm-lob { --l-acc: #f5c451; --l-acc2: #fde68a; --l-acc-soft: rgba(245, 196, 81, .12); --l-acc-line: rgba(245, 196, 81, .38); }
#acLobby.lob.xm-lob .lob-fx i:nth-child(1) { background: radial-gradient(circle, #e5484d 0%, transparent 65%); opacity: .2; }
#acLobby.lob.xm-lob .lob-fx i:nth-child(3) { background: radial-gradient(circle, #a3e635 0%, transparent 65%); opacity: .12; }
#acLobby.lob.xm-lob > .xm-snow { position: fixed; inset: 0; z-index: 0; }
#acLobby.lob.xm-lob .lob-wrap, #acLobby.lob.xm-lob .lob-tour { z-index: 1; }
#acLobby .xm-ribbon { display: inline-flex; align-items: center; gap: 10px; margin: 0 10px 16px 0; padding: 8px 16px 8px 12px; border-radius: 999px; background: linear-gradient(90deg, rgba(229, 72, 77, .2), rgba(229, 72, 77, .06)); border: 1px solid rgba(229, 72, 77, .45); font-size: 13px; color: #fecaca; }
#acLobby .xm-ribbon b { font: 700 11px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; color: #fca5a5; }
#acLobby .xm-ribbon-ico { font-size: 16px; }

@media (max-width: 760px) {
  body.xm .xm-lights { padding: 0 8px; }
  body.xm .xm-lights i:nth-child(n+17) { display: none; }
  body.xm .xm-sky { height: 180px; }
  body.xm #dashboard .xm-card { padding: 14px 46px 14px 14px; gap: 12px; }
  body.xm .xm-tree { flex-basis: 40px; height: 48px; }
  body.xm .xm-card-txt b { font-size: 17px; }
}
@media print { body.xm .xm-lights, body.xm .xm-hat, body.xm .xm-sky, body.xm .xm-card { display: none !important; } }

/* Controles e efeitos opcionais também somem durante login, inicialização e impressão. */
html[data-ac-auth="pending"] .xm-sky, html[data-ac-auth="pending"] .xm-snow,
body.xm.xm-gate #acNatalToggle, body.xm.xm-gate .xm-card,
body.xm.xm-off #acLobby .xm-snow, body.xm.xm-off #acLobby .xm-ribbon,
body.xm.xm-gate #acLobby .xm-snow, body.xm.xm-gate #acLobby .xm-ribbon { display:none!important; }
@media print { #acNatalToggle, .xm-snow, .xm-ribbon { display:none!important; } }
