/* Invisible Inc. Save Manager */
:root {
	--principal: #3ab0b0;
	--claro1: #6bbaba;
	--claro2: #9dffff;
	--amarelo: #ffff80;
	--verde: #00e200;
	--marrom: #2d0c0c;
	--vermelho: #ff4848;
	--laranja: #ff981a;
	--borda: #174646;
	--borda2: #2e8d8d;
	--caixa: #040c0c;
	--btn: #236a6a;
	--btn-hover: #2e8d8d;
	--btn-ativo: #3ab0b0;
	--btn-off: #0c2323;
	--texto-off: #909595;
	--valor: #e4f4f4;
	--fonte: 'Share Tech Mono', Consolas, 'Lucida Console', monospace;
}

* {box-sizing: border-box;}
html {-webkit-text-size-adjust: 100%;}
body {margin: 0; min-height: 100vh; min-height: 100dvh; padding: 12px; font-family: var(--fonte); font-size: 14px; color: var(--principal); letter-spacing: 0.04em; background-color: #000; background-image: url(../img/ui/background.webp); background-repeat: no-repeat; background-position: 50% 50%; background-size: cover; cursor: url(../img/ui/cursor.png) 1 1, auto; overflow-x: hidden;}
button, input, select {font-family: inherit; font-size: inherit; letter-spacing: inherit;}
button, select, .clicavel, label {cursor: url(../img/ui/cursor.png) 1 1, pointer;}
.none {display: none !important;}
h1, h2, p {margin: 0;}
img {max-width: 100%;}

::-webkit-scrollbar {width: 6px; height: 6px;}
::-webkit-scrollbar-track {background-color: #101010;}
::-webkit-scrollbar-thumb {background-color: rgba(58, 176, 176, 0.4);}

/* Janela principal */
.janela {position: relative; display: flex; flex-direction: column; gap: 8px; max-width: 1060px; margin: 0 auto; padding: 8px 10px 10px 10px; background-color: rgba(0, 0, 0, 0.7); border: 6px solid transparent; border-image: url(../img/ui/moldura.webp) 6 stretch;}

/* Botões */
.btn {min-height: 24px; padding: 4px 10px; color: #fff; text-transform: uppercase; white-space: nowrap; background-color: var(--btn); border: none; transition: background-color 0.12s;}
.btn:hover, .btn:focus-visible {background-color: var(--btn-hover); outline: none;}
.btn.ativo {background-color: var(--btn-ativo);}
.btn:disabled {color: var(--texto-off); background-color: var(--btn-off); cursor: default;}
.btn-icone {display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; padding: 0; background-color: var(--btn-off); border: 1px solid var(--borda); transition: background-color 0.12s;}
.btn-icone:hover, .btn-icone:focus-visible {background-color: var(--borda); outline: none;}
.btn-icone svg {width: 20px; height: 20px; fill: none; stroke: var(--principal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;}
.btn-idioma .bandeira {display: block; flex: none; width: 18px; height: 18px; background-color: var(--principal); -webkit-mask: center / 18px 18px no-repeat; mask: center / 18px 18px no-repeat; image-rendering: pixelated; transition: background-color 0.12s, filter 0.12s;}
.btn-idioma .bandeira-en {-webkit-mask-image: url(../img/ui/bandeira-usa.webp); mask-image: url(../img/ui/bandeira-usa.webp);}
.btn-idioma .bandeira-pt {-webkit-mask-image: url(../img/ui/bandeira-bra.webp); mask-image: url(../img/ui/bandeira-bra.webp);}
.btn-idioma:hover .bandeira, .btn-idioma:focus-visible .bandeira {background-color: var(--claro2); filter: drop-shadow(0 0 3px rgba(157, 255, 255, 0.6));}
.btn-idioma .bandeira-pt, .btn-idioma.pt .bandeira-en {display: none;}
.btn-idioma.pt .bandeira-pt {display: block;}
#btnSom .som-off, #btnSom.mudo .som-on {display: none;}
#btnSom.mudo .som-off {display: inline;}
.btn-mini {min-width: 24px; min-height: 24px; padding: 0 6px; font-size: 12px; color: var(--claro1); background-color: var(--btn-off); border: 1px solid var(--borda);}
.btn-mini:hover, .btn-mini:focus-visible {color: #fff; background-color: var(--btn); outline: none;}

/* Barra superior */
.barra {display: flex; align-items: center; gap: 8px;}
.caminho {position: relative; flex: 1; min-width: 0; height: 24px; padding: 6px 10px 2px 10px; overflow: hidden; color: var(--claro1); white-space: nowrap; text-overflow: ellipsis; background: linear-gradient(var(--caixa), #000); border-left: 1px solid var(--borda);  border-right: 1px solid var(--borda);}
.caminho::before {content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background-image: url(../img/ui/caminho-borda-topo.webp); background-size: 100% 4px;}
.caminho::after {content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background-image: url(../img/ui/caminho-borda-baixo.webp); background-size: 100% 2px;}

/* Abas */
.abas {display: flex; align-items: flex-start; gap: 4px; height: 22px; margin-bottom: -9px; padding-left: 6px; position: relative; z-index: 2;}
.aba {position: relative; top: -1px; min-width: 96px; height: 22px; padding: 1px 22px 0 10px; color: var(--borda2); text-align: left; background: transparent; border: none; filter: drop-shadow(0 0 0 transparent);}
.aba::before {content: ""; position: absolute; inset: 0; background-color: var(--borda); clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%); z-index: -2;}
.aba::after {content: ""; position: absolute; inset: 1px 1px 0 1px; background-color: #000; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 100%, 0 100%); z-index: -1;}
.aba:hover {color: var(--principal);}
.aba.ativa {height: 23px; color: var(--claro1);}
.aba.ativa::after {background-color: #0c2424;}
.aba:focus-visible {outline: 1px dotted var(--principal);}

/* Painel central */
.painel {position: relative; min-height: 600px; padding: 14px 10px 10px 10px; border: 1px solid var(--borda); border: none; background-color: rgba(0, 0, 0, 0.4); background-image: url(../img/ui/abas-borda-esquerda.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.painel::before {content: ""; position: absolute; top: 0; left: 2px; width: calc(100% - 4px); height: 2px; background-image: url(../img/ui/abas-borda-topo.webp); background-size: 100% 2px;}
.painel::after {content: ""; position: absolute; bottom: 0; left: 2px; width: calc(100% - 4px); height: 2px; background-image: url(../img/ui/abas-borda-baixo.webp); background-size: 100% 2px;}
.painel .borda-direita {position: absolute; top: 0; right: 0; width: 2px; height: 100%; background-image: url(../img/ui/abas-borda-direita.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.colunas {display: grid; grid-template-columns: 1fr 1fr; gap: 10px;}
.colunas + .colunas, .agencia + .colunas {margin-top: 10px;}
.quadro {position: relative; min-width: 0; padding: 0 10px 10px 10px; border: 1px solid var(--borda); background: linear-gradient(rgba(4, 12, 12, 0.5), rgba(0, 0, 0, 0.5));}
.quadro.geral, .quadro.dificuldade {border: none; background-image: url(../img/ui/ficha-borda-esquerda.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.quadro.geral::before, .quadro.dificuldade::before {content: ""; position: absolute; top: 0; left: 2px; width: calc(100% - 4px); height: 5px; background-image: url(../img/ui/ficha-borda-topo.webp); background-size: 100% 5px;}
.quadro.geral::after, .quadro.dificuldade::after {content: ""; position: absolute; bottom: 0; left: 2px; width: calc(100% - 4px); height: 2px; background-image: url(../img/ui/ficha-borda-baixo.webp); background-size: 100% 2px;}
.quadro.geral .borda-direita {position: absolute; top: 0; right: 0; width: 2px; height: 100%; background-image: url(../img/ui/ficha-borda-direita.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.quadro-titulo {position: relative; margin: 0 -10px 6px -10px; padding: 6px 6px 2px 6px; font-size: 12px; font-weight: normal; color: var(--principal); text-align: center; letter-spacing: 0.08em; border-top: none; border-bottom: 1px solid var(--borda);}
.quadro-titulo::before {content: ""; position: absolute; top: 4px; left: 0; width: 100%; height: 1px; background-color: var(--borda);}
.quadro-titulo.sub {margin-top: 12px; border-top: 1px solid var(--borda);}
.quadro.geral .quadro-titulo.sub {border-top: none;}
.quadro.geral .quadro-titulo.sub::before {top: 0; left: 1px; width: calc(100% - 2px); height: 5px; background-color: transparent; background-image: url(../img/ui/ficha-borda-meio.webp); background-position: 0 0; background-size: 100% 5px; background-repeat: no-repeat;}

/* Campos */
.campos {display: flex; flex-direction: column; gap: 2px;}
.campo {display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px;}
.campo label {flex: 1; min-width: 0; color: var(--principal); text-transform: uppercase;}
.campo label small {color: var(--borda2); font-size: 11px;}
.campo .valor {display: flex; align-items: center; gap: 6px;}
.entrada {width: 84px; height: 22px; padding: 2px 6px; color: var(--valor); text-align: right; background: linear-gradient(var(--caixa), #000); border: 1px solid var(--borda); border-radius: 0; outline: none;}
.entrada.larga {width: 118px;}
.entrada:focus {border-color: var(--borda2); box-shadow: 0 0 0 1px var(--borda2);}
.entrada.erro {border-color: var(--vermelho); animation: piscar 0.4s 2;}
.entrada:disabled {color: var(--borda2);}
.entrada::-webkit-outer-spin-button, .entrada::-webkit-inner-spin-button {-webkit-appearance: none; margin: 0;}
select.entrada {width: 136px; padding: 2px 22px 2px 6px; text-align: right; text-align-last: right; text-transform: uppercase; -webkit-appearance: none; appearance: none; background-image: url(../img/ui/seta-dropdown1.webp), linear-gradient(var(--caixa), #000); background-position: right 2px center, 0 0; background-size: 16px 16px, 100% 100%; background-repeat: no-repeat;}
select.entrada:hover, select.entrada:focus {background-image: url(../img/ui/seta-dropdown2.webp), linear-gradient(var(--caixa), #000);}
select.entrada:disabled {background-image: url(../img/ui/seta-dropdown1.webp), linear-gradient(var(--caixa), #000); opacity: 0.6;}
select.entrada option {color: var(--valor); background-color: #000;}
.marcador {position: relative; width: 22px; height: 22px; margin: 0; background: linear-gradient(var(--caixa), #000); border: 1px solid var(--borda); -webkit-appearance: none; appearance: none;}
.marcador:checked::after {content: ""; position: absolute; inset: 4px; background-color: #cfdede;}
.marcador:focus-visible {outline: none; border-color: var(--borda2); box-shadow: 0 0 0 1px var(--borda2);}
.campo.alterado label {color: var(--amarelo);}
@keyframes piscar {50% {background: #3a0d0d;}}

.btn-reseed {min-height: 20px; padding: 0 10px; font-size: 13px;}
.acoes-slot {display: flex; flex-wrap: wrap; gap: 6px;}
.acoes-slot .btn {min-height: 24px; font-size: 12px;}
.aviso {margin-bottom: 10px; padding: 6px 10px; color: var(--amarelo); border: 1px solid #5a5a2a; background-color: rgba(60, 60, 20, 0.35);}

/* Tela inicial e slot vazio */
.vazio {display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; height: 600px; padding: 20px; text-align: center;}
.vazio h1 {margin-top: -10px; margin-bottom: 30px; font-size: 18px; font-weight: normal; color: var(--claro1); letter-spacing: 0.2em;}
.vazio h2 {font-size: 18px; font-weight: normal; color: var(--claro1);}
.logo-jogo {width: min(420px, 80%); height: auto;}
.soltar {width: min(600px, 100%); padding: 28px 16px; color: var(--claro1); line-height: 1.6; border: 1px dashed var(--borda2); background-color: rgba(4, 12, 12, 0.6); transition: background-color 0.15s;}
.soltar.sobre, body.arrastando .soltar {background-color: rgba(35, 106, 106, 0.35); border-color: var(--claro2);}
.soltar strong {color: #fff;}
.dica {font-size: 12px; color: var(--borda2); line-height: 1.6; word-break: break-word;}
.dica b {color: var(--claro1); font-weight: normal;}
.exemplos {display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;}

/* Rodapé */
.rodape {display: flex; align-items: center; gap: 8px;}
.slots {display: flex; gap: 8px;}
.btn-slot {min-width: 100px;}
.btn-slot.vazio-slot:not(.ativo):not(:disabled) {color: var(--texto-off); background-color: var(--btn-off); border: 1px solid var(--borda);}
.btn-slot.vazio-slot:not(.ativo):not(:disabled):hover {color: #fff; background-color: var(--btn);}
.status {flex: 1; min-width: 0; font-size: 12px; color: var(--claro1); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;}
.status.erro {color: var(--vermelho);}
.status.ok {color: var(--verde);}
.btn-aplicar {min-width: 115px;}
.btn-aplicar.pendente:not(:disabled) {background-color: var(--btn-ativo); animation: pulsar 1.6s infinite;}
@keyframes pulsar {50% {background-color: var(--btn);}}

/* Agência */
.agencia {display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px;}
.agencia-principal {display: flex; flex-direction: column; gap: 10px; min-width: 0;}
.equipe {display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 6px 0 0 0; border-top: none;}
.equipe::before {content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background-image: url(../img/ui/equipe-borda-topo.webp); background-size: 100% 5px;}
.agente {position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--borda); margin: -2px -1px -1px -1px;}
.agente .esquerda {display: none; position: absolute; top: 0; left: 0; width: 1px; height: 100%; background-color: var(--principal);}
.agente .direita {display: none; position: absolute; top: 0; right: 0; width: 1px; height: 100%; background-color: var(--principal);}
.agente.selecionado {border-color: var(--principal);}
.agente.selecionado::before {content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background-color: var(--principal);}
.agente.selecionado::after {content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: var(--principal);}
.agente.selecionado .esquerda, .agente.selecionado .direita {display: block;}
.agente-topo {display: flex; align-items: center; gap: 2px; height: 20px; border-bottom: 1px solid var(--borda);}
.agente-nome {flex: 1; min-width: 0; overflow: hidden; color: var(--amarelo); font-size: 12px; text-align: center; white-space: nowrap; text-overflow: ellipsis;}
.seta {display: inline-flex; align-items: center; justify-content: center; flex: none; width: 14px; height: 18px; padding: 0; background-color: var(--btn-off); border: none;}
.seta::before {content: ""; border: 5px solid transparent;}
.seta.esq::before {border-right-color: var(--btn); margin-left: -5px;}
.seta.dir::before {border-left-color: var(--btn); margin-right: -5px;}
.seta:hover::before, .seta:focus-visible::before {border-right-color: transparent; border-left-color: transparent;}
.seta.esq:hover::before, .seta.esq:focus-visible::before {border-right-color: var(--claro2);}
.seta.dir:hover::before, .seta.dir:focus-visible::before {border-left-color: var(--claro2);}
.seta:focus-visible {outline: none; background-color: var(--borda);}
.agente-foto {position: relative; aspect-ratio: 148 / 148; overflow: hidden; background-color: rgba(2, 6, 6, 0.6); border: none; padding: 0;}
.agente-foto img {display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;}
.agente-foto .sem-foto {display: flex; align-items: center; justify-content: center; height: 100%; font-size: 40px; color: var(--borda);}
.agente-foto:focus-visible {outline: 1px solid var(--principal);}
.agente .remover {position: absolute; right: 4px; bottom: 4px;}
.agente.livre .agente-nome {color: var(--borda2);}
.agente.livre .agente-foto {display: flex; align-items: center; justify-content: center; color: var(--borda2); font-size: 13px;}
.agente.livre .agente-foto:hover {color: var(--claro2); background-color: #061414;}

.ficha {display: grid; grid-template-columns: 116px minmax(0, 1fr) minmax(0, 1fr); gap: 0;padding: 0; border: none; background-image: url(../img/ui/ficha-borda-direita.webp); background-position: 100% 0; background-size: 2px auto; background-repeat: no-repeat;}
.ficha::before {content: ""; position: absolute; top: 0; left: 2px; width: calc(100% - 4px); height: 5px; background-image: url(../img/ui/ficha-borda-topo.webp); background-size: 100% 5px;}
.ficha .borda-esquerda {position: absolute; top: 0; left: 0; width: 2px; height: 100%; background-image: url(../img/ui/ficha-borda-esquerda.webp); background-position: 0 0; background-size: 2px auto; background-repeat: no-repeat;}
.ficha-retrato {margin: 5px 0 -1px 1px; background-color: #000; overflow: hidden;}
.ficha-retrato img {display: block; width: 100%; height: auto;}
.ficha-bloco {position: relative; min-width: 0; padding: 0 8px 8px 8px;}
.ficha-bloco::before {content: ""; position: absolute; top: 5px; left: 0; width: 1px; height: calc(100% - 4px); background-color: var(--borda);}
.ficha-bloco:nth-child(2) {border-left: none;}
.ficha .quadro-titulo {margin: 0 -8px 8px -8px;}
.ficha .quadro-titulo.esquerda {text-align: left; padding-left: 10px;}
.grade {display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 8px;}
.grade4 {grid-template-columns: repeat(4, minmax(0, 50px)); gap: 10px; justify-content: center;}
.caixa-item {--canto: #d0d872; --meio: #6f7d43; --fundo: #000; position: relative; aspect-ratio: 1; min-width: 0; padding: 0; overflow: hidden; border: 1px solid transparent; background: linear-gradient(var(--fundo) 0 0) padding-box, linear-gradient(var(--canto) 0 0) left top / 8px 8px no-repeat border-box, linear-gradient(var(--canto) 0 0) right top / 8px 8px no-repeat border-box, linear-gradient(var(--canto) 0 0) left bottom / 8px 8px no-repeat border-box, linear-gradient(var(--canto) 0 0) right bottom / 8px 8px no-repeat border-box, linear-gradient(var(--meio) 0 0) border-box;}
.caixa-item img {display: block; width: 100%; height: 100%; transform: scale(1.07);} /* esconde a moldura que já vem nos ícones */
.caixa-item:hover, .caixa-item:focus-visible {--canto: #fff; --meio: #b4b4b4; outline: none;}
.caixa-item:hover img, .caixa-item:focus-visible img {filter: grayscale(1) brightness(1.6);}
.caixa-item.aumento {--canto: #757575; --meio: #464646;}
.caixa-item.aumento:hover, .caixa-item.aumento:focus-visible {--canto: #b4b4b4; --meio: #757575;}
.caixa-item.aumento img {filter: grayscale(1) brightness(0.6);}
.caixa-item.aumento:hover img, .caixa-item.aumento:focus-visible img {filter: grayscale(1) brightness(1.1);}
.caixa-item.aumento:not(.instalado) img {opacity: 0.45;}
.caixa-item .desconhecido {display: flex; align-items: center; justify-content: center; height: 100%; padding: 2px; font-size: 9px; color: var(--claro1); word-break: break-all; text-align: center;}
.caixa-item .municao {position: absolute; right: 1px; bottom: 0; padding: 0 2px; font-size: 10px; color: var(--amarelo); background-color: rgba(0, 0, 0, 0.75);}
.caixa-item.mais {--canto: #2a2a2a; --meio: #171717; display: flex; align-items: center; justify-content: center;}
.caixa-item.mais:hover, .caixa-item.mais:focus-visible {--canto: #5a5a5a; --meio: #333;}
.caixa-item.mais::before, .caixa-item.mais::after {content: ""; position: absolute; background-color: #2f2f2f;}
.caixa-item.mais::before {width: 50%; height: 4px;}
.caixa-item.mais::after {width: 4px; height: 50%;}
.caixa-item.mais:hover::before, .caixa-item.mais:hover::after, .caixa-item.mais:focus-visible::before, .caixa-item.mais:focus-visible::after {background-color: #757575;}
.caixa-item.vago {--canto: #153f3f; --meio: #0c2323; --fundo: var(--marrom); cursor: default;}
.caixa-item.livre {--canto: #319494; --meio: var(--btn); display: flex; align-items: center; justify-content: center;}
.caixa-item.livre:hover, .caixa-item.livre:focus-visible {--canto: var(--claro2); --meio: var(--claro1);}
.caixa-item.livre:hover::before, .caixa-item.livre:hover::after, .caixa-item.livre:focus-visible::before, .caixa-item.livre:focus-visible::after {content: ""; position: absolute; background-color: var(--borda2);}
.caixa-item.livre:hover::before, .caixa-item.livre:focus-visible::before {width: 50%; height: 4px;}
.caixa-item.livre:hover::after, .caixa-item.livre:focus-visible::after {width: 4px; height: 50%;}
.slots-extra {position: absolute; top: -2px; right: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--borda2);}
.slots-extra b {color: var(--claro1); font-weight: normal;}
.slots-extra .btn-mini {width: 12px; height: 12px; min-width: 12px; min-height: 12px; padding: 0 2px; line-height: 0.5em;}

.habilidades {margin-top: -10px; border: none; background-image: url(../img/ui/ficha-borda-esquerda.webp); background-position: 0 100%; background-size: 2px 150%; background-repeat: no-repeat;}
.quadro.armazem, .quadro.detencao {border: none; background-image: url(../img/ui/ficha-borda-esquerda.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.habilidades::before, .quadro.armazem::before, .quadro.detencao::before {content: ""; position: absolute; top: 0; left: 1px; width: calc(100% - 2px); height: 5px; background-image: url(../img/ui/ficha-borda-meio.webp); background-size: 100% 5px;}
.quadro.armazem::before, .quadro.detencao::before {background-image: url(../img/ui/ficha-borda-topo.webp);}
.habilidades::after, .quadro.armazem::after, .quadro.detencao::after {content: ""; position: absolute; bottom: 0; left: 2px; width: calc(100% - 4px); height: 2px; background-image: url(../img/ui/ficha-borda-baixo.webp); background-size: 100% 2px;}
.habilidades .borda-direita, .quadro.armazem .borda-direita, .quadro.detencao .borda-direita {position: absolute; top: 0; right: 0; width: 2px; height: 100%; background-image: url(../img/ui/ficha-borda-direita.webp); background-position: 100% 100%; background-size: 2px 150%; background-repeat: no-repeat;}
.quadro.armazem .borda-direita, .quadro.detencao .borda-direita {background-position: 0 0; background-size: 2px 100%;}
.tabela-hab {display: grid; grid-template-columns: 76px repeat(5, minmax(0, 1fr)) 27px; gap: 3px 6px; align-items: start;}
.tabela-hab .nivel {font-size: 12px; color: var(--borda2); text-align: right;}
.tabela-hab .hab-nome {padding-top: 3px; font-size: 12px; color: var(--borda2); text-align: right;}
.hab {display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 0; background: none; border: none; text-align: center;}
.hab .barra-hab {display: block; height: 20px; background-color: var(--principal);}
.hab.ok .barra-hab {background-color: var(--amarelo);}
.hab.proximo.previa .barra-hab, .hab.proximo:hover .barra-hab, .hab.proximo:focus-visible .barra-hab {background-color: var(--verde); filter: none;}
.hab:hover .barra-hab, .hab:focus-visible .barra-hab {filter: brightness(1.25);}
.hab-mais {width: 27px; height: 21px; padding: 0; background: url(../img/ui/btn-skill1.webp) center / 100% 100% no-repeat; border: none;}
.hab-mais:hover:not(:disabled), .hab-mais:focus-visible {background-image: url(../img/ui/btn-skill2.webp); outline: none;}
.hab-mais:disabled {opacity: 0.35; cursor: default;}
.hab:focus-visible {outline: none;}
.hab .hab-desc {min-height: 22px; font-size: 10px; line-height: 1.15; color: var(--claro1);}

.incognita {display: flex; flex-direction: column; gap: 6px; padding: 8px; border: none; background-image: url(../img/ui/incognita-borda-esquerda.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.incognita::before {content: ""; position: absolute; top: 0; left: 2px; width: calc(100% - 4px); height: 5px; background-image: url(../img/ui/incognita-borda-topo.webp); background-size: 100% 5px;}
.incognita::after {content: ""; position: absolute; bottom: 0; left: 2px; width: calc(100% - 4px); height: 2px; background-image: url(../img/ui/incognita-borda-baixo.webp); background-size: 100% 2px;}
.incognita .borda-direita {position: absolute; top: 0; right: 0; width: 2px; height: 100%; background-image: url(../img/ui/incognita-borda-direita.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.incognita-topo {display: flex; align-items: flex-end; justify-content: space-between; height: 100px; padding-left: 8px; overflow: hidden; color: #fff; line-height: 1.3; border: 1px solid var(--borda); background-color: #061414;}
.incognita-topo span {padding-bottom: 8px; font-size: 12px;}
.incognita-topo img {width: 74px; height: auto;}
.programas {display: flex; flex-direction: column; gap: 6px;}
.programa {display: flex; flex-direction: column; border: 1px solid var(--borda);}
.programa-img {display: grid; grid-template-columns: minmax(0, 1fr) 40px; height: 54px; padding: 0; background-color: #000; border: none; text-align: left;}
.programa-img img {width: 100%; height: 54px; object-fit: cover;}
.programa-img .pwr {display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 18px; color: #fff; line-height: 1; border-left: 1px solid var(--borda);}
.programa-img .pwr small {font-size: 10px; color: var(--claro1);}
.programa-img:hover, .programa-img:focus-visible {outline: 1px solid var(--claro2);}
.programa-nome {display: flex; align-items: center; gap: 2px; height: 20px; border-top: 1px solid var(--borda); background: linear-gradient(var(--caixa), #000);}
.programa-nome span {flex: 1; min-width: 0; overflow: hidden; font-size: 12px; color: var(--amarelo); text-align: center; white-space: nowrap; text-overflow: ellipsis;}
.programa.novo {padding: 6px; align-items: center; color: var(--borda2); background-color: #020606;}
.programa.novo:hover {color: var(--claro2);}

.potenciais {display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px;}
.potencial {position: relative; border: 1px solid var(--borda); background-color: #000;}
.potencial img {display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: top;}
.potencial .sem-foto {display: flex; align-items: center; justify-content: center; aspect-ratio: 1; font-size: 26px; color: var(--borda);}
.potencial span {display: block; padding: 2px; overflow: hidden; font-size: 11px; color: var(--amarelo); text-align: center; white-space: nowrap; text-overflow: ellipsis;}
.potencial .remover {position: absolute; bottom: 2px; right: 2px;}
.potencial.novo {display: flex; align-items: center; justify-content: center; min-height: 96px; color: var(--borda2); font-size: 12px;}
.potencial.novo:hover {color: var(--claro2);}

/* Missões */
.missoes {padding-bottom: 10px;}
.quadro.missoes {border: none; background-image: url(../img/ui/ficha-borda-esquerda.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.quadro.missoes::before {content: ""; position: absolute; top: 0; left: 2px; width: calc(100% - 4px); height: 5px; background-image: url(../img/ui/ficha-borda-topo.webp); background-size: 100% 5px;}
.quadro.missoes::after {content: ""; position: absolute; bottom: 0; left: 2px; width: calc(100% - 4px); height: 2px; background-image: url(../img/ui/ficha-borda-baixo.webp); background-size: 100% 2px;}
.quadro.missoes .borda-direita {position: absolute; top: 0; right: 0; width: 2px; height: 100%; background-image: url(../img/ui/ficha-borda-direita.webp); background-position: 0 0; background-size: 2px 100%; background-repeat: no-repeat;}
.missao-info {display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; min-height: 150px; padding: 4px 4px 10px 4px;}
.missao-info .ilustra {display: flex; align-items: center; justify-content: center;}
.missao-info .ilustra img {max-height: 136px; width: auto;}
.missao-info h3 {margin: 0 0 4px 0; font-size: 16px; font-weight: normal; color: var(--amarelo);}
.missao-info p {font-size: 13px; color: #d6e6e6; line-height: 1.4;}
.missao-info .sub {font-size: 12px; color: var(--claro1); text-transform: uppercase;}
.missao-info .linha {display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px;}
.missao-info .linha label {display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--principal);}
.missao-info .corp {display: flex; align-items: center; gap: 8px; margin-top: 6px;}
.missao-info .corp img {width: 34px; height: 34px; object-fit: contain;}
.missao-info .selo {width: 30px; height: auto;}
.mapa {position: relative; margin: 0 -4px; aspect-ratio: 771 / 394; background-color: #000; user-select: none; -webkit-user-select: none;}
.mapa-img {display: block; width: 100%; height: 100%;}
.mapa-camada {position: absolute; inset: 0;}
.cidade, .marca, .nave {position: absolute; transform: translate(-50%, -50%); padding: 0; background: none; border: none;}
.cidade {width: 22px; height: 22px; border-radius: 50%; z-index: 1;}
.cidade::before {content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; transform: translate(-50%, -50%); border-radius: 50%; background-color: rgba(200, 220, 220, 0.55);}
.cidade:hover::before, .cidade:focus-visible::before, .cidade.selecionada::before {width: 22px; height: 22px; background: url(../img/mapa/alvo.webp) center / contain no-repeat;}
.cidade:focus-visible {outline: none;}
.marca {width: 5.8%; aspect-ratio: 1; z-index: 2; background: url(../img/mapa/marca.webp) center / contain no-repeat;}
.marca img {position: absolute; left: 22%; top: 22%; width: 56%; height: 56%; object-fit: contain;}
.marca .rotulo-tipo {position: absolute; inset: 22%; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; background-color: #8a1c1c; border: 1px solid #fff;}
.marca:hover, .marca:focus-visible, .marca.selecionada {filter: drop-shadow(0 0 4px var(--amarelo)); outline: none; z-index: 5;}
.nave {width: 9.8%; aspect-ratio: 1; z-index: 3; pointer-events: none; background: url(../img/mapa/nave.webp) center / contain no-repeat;}
.lista-missoes {margin-top: 10px;}
.lista-missoes table {width: 100%; border-collapse: collapse; font-size: 13px;}
.lista-missoes th {padding: 4px 6px; font-weight: normal; color: var(--borda2); text-align: left; border-bottom: 1px solid var(--borda);}
.lista-missoes td {padding: 4px 6px; color: var(--claro1); border-bottom: 1px solid #0c2323;}
.lista-missoes tr.clicavel:hover td, .lista-missoes tr.selecionada td {color: #fff; background-color: #0c2323;}
.lista-missoes .acoes {display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;}

/* Perguntas e alertas */
.dialogo {position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow: auto; background-color: rgba(0, 0, 0, 0.55); animation: dialogoFundoEntra 0.25s ease-out;}
.dialogo-caixa {position: relative; top: calc(35vh - 16px); transform: translateY(-50%); animation: dialogoEntra 0.25s ease-out;}
.dialogo.fechando {pointer-events: none; animation: dialogoFundoSai 0.2s ease-in forwards;}
.dialogo.fechando .dialogo-caixa {animation: dialogoSai 0.2s ease-in forwards;}
@keyframes dialogoEntra {from {opacity: 0; margin-top: -100px;} to {opacity: 1; margin-top: 0;}}
@keyframes dialogoSai {from {opacity: 1; margin-top: 0;} to {opacity: 0; margin-top: -100px;}}
@keyframes dialogoFundoEntra {from {opacity: 0;} to {opacity: 1;}}
@keyframes dialogoFundoSai {from {opacity: 1;} to {opacity: 0;}}
@media (max-height: 480px) {.dialogo-caixa {top: calc(50vh - 16px);}}
.dialogo-caixa {display: flex; flex-direction: column; width: min(400px, 100%); min-height: 274px; padding: 0 12px 15px 12px; background-color: rgba(25, 26, 27, 0.94); border-top: 14px solid #6ecdcd; border-image: linear-gradient(#6ecdcd, #61b3b3) 1; box-shadow: 0 0 24px rgba(0, 0, 0, 0.6);}
.dialogo-titulo {margin: 11px 0 0 0; padding-bottom: 2px; font-size: 13px; font-weight: normal; color: var(--claro2); text-align: center; border-bottom: 1px solid #64a9a9;}
.dialogo-texto {margin: 6px 4px 0 4px; font-size: 17px; line-height: 1.35; color: #fff; text-align: center; white-space: pre-line; overflow-wrap: anywhere;}
.dialogo-botoes {display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: auto; padding-top: 24px;}
.btn-dialogo {width: 300px; max-width: 100%; height: 38px; font-size: 14px; color: #fff; text-transform: uppercase; background: linear-gradient(#457777, #416e6e); border: none;}
.btn-dialogo:hover, .btn-dialogo:focus-visible {background: linear-gradient(#5a9595, #538888); outline: none;}

/* Janela de escolha */
.modal {position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 12px; background-color: rgba(0, 0, 0, 0.75);}
.modal-caixa {display: flex; flex-direction: column; width: min(760px, 100%); max-height: calc(100dvh - 24px); background-color: #000; border: 1px solid var(--borda2); box-shadow: 0 0 30px rgba(58, 176, 176, 0.15);}
.modal-topo {display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-bottom: 1px solid var(--borda);}
.modal-topo h2 {flex: 1; font-size: 14px; font-weight: normal; color: var(--claro1); letter-spacing: 0.1em;}
.modal-corpo {padding: 10px 12px 12px 12px; overflow-y: auto;}
.filtros {display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;}
.filtros .entrada {flex: 1; min-width: 150px; text-align: left;}
.opcoes {display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px;}
.opcao {display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px; color: var(--claro1); text-align: left; background-color: #020606; border: 1px solid var(--borda);}
.opcao img, .opcao .sem-foto {flex: none; width: 40px; height: 40px; object-fit: cover; object-position: top;}
.opcao .sem-foto {display: flex; align-items: center; justify-content: center; color: var(--borda2); border: 1px solid var(--borda);}
.opcao span {min-width: 0; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere;}
.opcao small {display: block; color: var(--borda2); font-size: 10px;}
.opcao:hover, .opcao:focus-visible {color: #fff; border-color: var(--claro2); outline: none;}
.opcao.atual {border-color: var(--amarelo);}
.programas-opcoes .opcao img {width: 69px; height: 40px;}
.detalhe {display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px;}
.detalhe img {width: 64px; height: 64px;}
.detalhe h3 {margin: 0 0 6px 0; font-size: 15px; font-weight: normal; color: var(--amarelo);}
.detalhe p {margin-bottom: 8px; font-size: 13px; color: #d6e6e6; line-height: 1.45; white-space: pre-line;}
.detalhe .lore {color: #6bbaba;}
.detalhe .efeito {color: #e4e7e6;}
.detalhe .espec {margin-bottom: 4px; font-size: 12px;}
.detalhe .espec b {display: block; font-weight: normal; color: var(--amarelo);}
.detalhe .id {font-size: 11px; color: var(--borda2);}
.detalhe-acoes {display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px;}
.detalhe-acoes label {display: flex; align-items: center; gap: 6px; color: var(--principal);}

/* Dica flutuante */
.dica-flutuante {position: fixed; z-index: 4; width: auto; height: auto; background-color: rgba(0, 0, 0, 0.6);}
.dica-flutuante .base-alfa {position: relative; max-width: 280px; padding: 8px 10px; font-size: 12px; line-height: 1.4; color: #d6e6e6; background-color: rgba(58, 176, 176, 0.4);}
.dica-flutuante b {display: block; margin-bottom: 4px; color: var(--amarelo); font-weight: normal; text-transform: uppercase;}
.dica-flutuante i {display: block; margin-top: 4px; color: var(--claro2); font-style: normal;}
.dica-flutuante .dica-desc {display: block; color: #6bbaba;}
.dica-flutuante .dica-efeito {display: block; margin-top: 6px; color: #e4e7e6;}
.dica-flutuante .dica-esp {display: block; position: relative; margin-top: 6px; padding-left: 18px; color: #e4e7e6;}
/* Seta (e ícone de implante das palavras-chave) centralizada na altura do título + detalhe */
.dica-flutuante .dica-esp::before {content: ""; position: absolute; top: 50%; left: 3px; margin-top: -5px; border-left: 7px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent;}
.dica-flutuante .dica-esp.chave::before {left: 0; width: 14px; height: 14px; margin-top: -7px; border: none; background: url("../img/ui/icone-implante.webp") center / contain no-repeat;}
.dica-flutuante .dica-aviso {display: block; margin-top: 6px; color: #ff8411;}
.dica-flutuante .dica-esp.acao {padding-left: 22px;}
.dica-flutuante .dica-esp.acao::before {left: 0; width: 16px; height: 16px; margin-top: -8px; border: none; background: url("../img/ui/icone-acao.webp") center / contain no-repeat;}
.dica-flutuante .dica-pwr {float: right; margin-left: 16px; color: #fff;}
.dica-flutuante .dica-esp em {display: block; color: var(--claro2); font-style: normal; text-transform: uppercase;}
.dica-flutuante .dica-req {display: block; margin-top: 6px; color: #e4e7e6;}
/* Hint das missões no mapa: moldura do layout (logo | nome e horas | selo de dificuldade) */
.dica-flutuante.dica-missao {background: none;}
.dica-flutuante.dica-missao.entrando .base-alfa {animation: dicaMissaoEntra 0.2s ease-out both;}
.dica-flutuante.dica-missao.saindo .base-alfa {animation: dicaMissaoEntra 0.2s ease-in reverse both;}
@keyframes dicaMissaoEntra {from {opacity: 0; transform: translateY(30px);} to {opacity: 1; transform: none;}}
.dica-flutuante.dica-missao .base-alfa {display: flex; align-items: center; width: max-content; min-width: 396px; max-width: none; height: 74px; padding: 6px; border: 0 solid transparent; border-image: url(../img/ui/missao-dica.webp) 0 67 fill / 0 67px stretch; background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)) center / calc(100% - 12px) calc(100% - 12px) no-repeat;}
.dica-missao .logo, .dica-missao .selo {display: flex; align-items: center; justify-content: center; flex: none; height: 100%;}
.dica-missao .logo {width: 61px;}
.dica-missao .selo {width: 61px;}
.dica-missao .logo img {max-width: 44px; max-height: 48px;}
.dica-missao .selo img {height: 46px;}
.dica-missao .texto {flex: 1; padding: 0 14px; line-height: 1.35;}
.dica-flutuante.dica-missao b {margin: 0; color: #fff; font-size: 14px; white-space: nowrap;}
.dica-flutuante.dica-missao i {display: block; margin: 0; color: var(--claro2); font-style: normal; font-size: 12px;}

/* Responsivo */
@media (max-width: 900px) {
	.agencia {grid-template-columns: minmax(0, 1fr) 156px;}
	.rodape {flex-wrap: wrap;}
	.status {order: 3; flex-basis: 100%; text-align: left;}
}
@media (max-width: 720px) {
	body {padding: 0; font-size: 13px;}
	.janela {gap: 6px; padding: 8px; border: none; min-height: 100dvh;}
	.abas {margin-bottom: -7px; padding-left: 0;} /* a janela usa gap de 6px aqui */
	.aba {flex: 1; min-width: 0; padding-right: 16px;}
	.painel {padding: 12px 6px 8px 6px; min-height: 0;}
	.colunas {grid-template-columns: 1fr;}
	.agencia {grid-template-columns: 1fr;}
	.programas {display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));}
	.incognita-topo {height: 80px;}
	.incognita-topo img {width: 58px;}
	.equipe {grid-template-columns: repeat(2, minmax(0, 1fr));}
	.agente-foto {aspect-ratio: 4 / 3;}
	.agente.livre.inativo {display: none;}
	.ficha {grid-template-columns: 114px minmax(0, 1fr);}
	.ficha-bloco:last-child {grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--borda); padding-top: 0;}
	.tabela-hab {grid-template-columns: 62px repeat(5, minmax(0, 1fr)) 27px; gap: 3px;}
	.hab .hab-desc {display: none;}
	.tabela-hab .nivel {text-align: center; font-size: 10px;}
	.missao-info {grid-template-columns: 70px minmax(0, 1fr); min-height: 0;}
	.missao-info .ilustra img {max-height: 90px;}
	.cidade {width: 18px; height: 18px;}
	.rodape {position: sticky; bottom: 0; z-index: 5; margin: 0 -8px -8px -8px; padding: 8px; background-color: rgba(0, 0, 0, 0.94); border-top: 1px solid var(--borda);}
	.slots {flex: 1 1 100%;}
	.btn-slot {flex: 1; min-width: 0; padding: 4px 2px; font-size: 12px;}
	.btn-aplicar {flex: 1 1 100%; min-height: 40px;}
	.vazio {min-height: 60vh;}
	.lista-missoes td, .lista-missoes th {padding: 6px 4px;}

}
@media (max-width: 380px) {
	.btn-slot .rot-longo {display: none;}
	.entrada {width: 74px;}
	.entrada.larga {width: 104px;}
	select.entrada {width: 126px;}
}
@media (hover: none) {
	.dica-flutuante {display: none !important;}
}
@media (prefers-reduced-motion: reduce) {
	* {animation: none !important; transition: none !important;}
}
