/* Criador de modelos do painel do StarResourcePacks (aba "Criar"). Prefixos rp-cr- e rp-pt-. */
.rp-cr-inicio { text-align: center; padding: 34px 20px; }
.rp-cr-inicio h2 { font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 8px; }
.rp-cr-inicio p { max-width: 620px; margin: 0 auto 18px; color: #94a3b8; font-size: 14px; line-height: 1.5; }
.rp-cr-inicio h3 { margin: 28px 0 10px; }
.rp-cr-inicio-acoes { display: flex; justify-content: center; gap: 10px; }
.rp-cr-pacotes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; text-align: left; }
.rp-cr-pacotes button, .rp-cr-trazer button { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: #e2e8f0; cursor: pointer; text-align: left; font-family: inherit; }
.rp-cr-pacotes button:hover, .rp-cr-trazer button:hover { border-color: #60a5fa; }
.rp-cr-pacotes small, .rp-cr-trazer small { color: #7c8aa3; font-size: 11px; }

.rp-cr { display: grid; gap: 12px; }
.rp-cr-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(20, 24, 48, .85); }
.rp-cr-pacote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.rp-cr-pacote select, .rp-cr-pacote input { border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7); color: #e2e8f0; font-size: 13px; padding: 7px 9px; font-family: inherit; }
.rp-cr-pacote input { width: 220px; max-width: 100%; font-weight: 700; }
.rp-cr-pacote code { font-size: 12px; color: #93c5fd; background: rgba(59, 130, 246, .12); padding: 3px 7px; border-radius: 6px; }
.rp-cr-salvo { font-size: 11px; font-weight: 700; color: #6ee7b7; }
.rp-cr-salvo.sujo { color: #fcd34d; }
.rp-cr-botoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rp-cr-botoes .rp-mini[disabled], .rp-cr-ferr .rp-mini[disabled] { opacity: .4; cursor: default; }
.rp-cr-linha-envio { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; }
.rp-cr-envio { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.rp-cr-envio.pendente, .rp-cr-envio.subindo { color: #93c5fd; background: rgba(59, 130, 246, .12); }
.rp-cr-envio.ok { color: #6ee7b7; background: rgba(16, 185, 129, .12); }
.rp-cr-envio.erro { color: #fda4af; background: rgba(244, 63, 94, .12); }
.rp-cr-linha-envio details { color: #cbd5e1; }
.rp-cr-linha-envio ul { margin: 6px 0 0 18px; }

.rp-cr-grade { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
@media (max-width: 1250px) { .rp-cr-grade { grid-template-columns: 230px minmax(0, 1fr); } .rp-cr-dir { grid-column: 1 / -1; } }
@media (max-width: 820px) { .rp-cr-grade { grid-template-columns: minmax(0, 1fr); } }
.rp-cr-esq, .rp-cr-dir { display: grid; gap: 12px; }
.rp-cr-sec { border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(20, 24, 48, .85); padding: 12px; min-width: 0; }
.rp-cr-sec h4 { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #93c5fd; }
.rp-cr-sec h4 small { font-size: 11px; color: #7c8aa3; text-transform: none; letter-spacing: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cr-sec-acoes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rp-cr-sec-acoes:last-child { margin-bottom: 0; margin-top: 4px; }
.rp-cr-novo-btn { padding: 7px 14px; font-size: 12px; }
.rp-cr-nota { font-size: 12px; color: #94a3b8; line-height: 1.45; margin: 4px 0 10px; }

.rp-cr-lista { display: grid; gap: 5px; max-height: 360px; overflow-y: auto; scrollbar-width: thin; }
.rp-cr-lista button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); color: #cbd5e1; text-align: left; cursor: pointer; font-family: inherit; }
.rp-cr-lista button:hover { border-color: rgba(96, 165, 250, .4); }
.rp-cr-lista button.ativo { border-color: #60a5fa; background: rgba(59, 130, 246, .18); color: #fff; }
.rp-cr-lista button > span { min-width: 0; }
.rp-cr-lista b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cr-lista small { display: block; font-size: 11px; color: #7c8aa3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cr-ico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .06); font-style: normal; font-size: 16px; overflow: hidden; }
.rp-cr-ico img { width: 100%; height: 100%; image-rendering: pixelated; object-fit: contain; }

.rp-cr-texturas { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 250px; overflow-y: auto; scrollbar-width: thin; }
.rp-cr-texturas button { display: grid; gap: 3px; padding: 5px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); cursor: pointer; font-family: inherit; }
.rp-cr-texturas button.ativo { border-color: #60a5fa; background: rgba(59, 130, 246, .18); }
.rp-cr-texturas img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; background: repeating-conic-gradient(#2a2f3d 0 25%, #363c4d 0 50%) 50% / 10px 10px; border-radius: 6px; }
.rp-cr-texturas small { font-size: 10px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rp-cr-meio { min-width: 0; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(20, 24, 48, .85); padding: 10px; display: grid; gap: 8px; }
.rp-cr-abas { display: inline-flex; width: max-content; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; }
.rp-cr-abas button { padding: 7px 16px; font-size: 13px; font-weight: 700; color: #94a3b8; background: transparent; border: 0; cursor: pointer; }
.rp-cr-abas button.ativa { background: #2563eb; color: #fff; }
.rp-cr-ferr { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-cr-grupo { display: inline-flex; flex-wrap: wrap; gap: 4px; padding-right: 8px; border-right: 1px solid rgba(255, 255, 255, .08); }
.rp-cr-grupo:last-child { border-right: 0; }
.rp-cr-grupo .rp-mini { padding: 6px 10px; }
.rp-mini.ativo { background: #2563eb; border-color: #3b82f6; color: #fff; }
.rp-cr-tela3d { position: relative; height: min(64vh, 620px); min-height: 360px; border-radius: 12px; overflow: hidden; background: #0f1220; }
.rp-cr-tela3d canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; }
.rp-cr-tela-vazia { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #64748b; font-size: 14px; pointer-events: none; }
.rp-cr-tela-vazia:empty { display: none; }
.rp-cr-dica { font-size: 11px; color: #64748b; }

.rp-cr-campo { display: block; margin-bottom: 9px; }
.rp-cr-campo > span { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; color: #94a3b8; }
.rp-cr-campo > span small { font-weight: 500; color: #64748b; }
.rp-cr-campo input, .rp-cr-campo select, .rp-cr-campo textarea, .rp-cr-num input, .rp-cr-num select, .rp-cr-busca, .rp-cr-face-campos input, .rp-cr-face-campos select {
  width: 100%; box-sizing: border-box; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7); color: #e2e8f0; font-size: 12px; padding: 6px 8px; font-family: inherit; outline: none; }
.rp-cr-campo input:focus, .rp-cr-campo select:focus, .rp-cr-campo textarea:focus, .rp-cr-num input:focus { border-color: #60a5fa; }
.rp-cr-campo input[type=color] { height: 32px; padding: 2px; cursor: pointer; }
.rp-cr-campo textarea { resize: vertical; }
.rp-cr-previa-nome { margin: -4px 0 9px; padding: 6px 9px; border-radius: 8px; background: rgba(0, 0, 0, .35); font-size: 13px; color: #fff; min-height: 18px; font-family: 'Minecraft', ui-monospace, monospace; }
.rp-cr-chk { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 12px; color: #cbd5e1; cursor: pointer; }
.rp-cr-chk input { accent-color: #3b82f6; width: 15px; height: 15px; }
.rp-cr-linha { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 9px; }
.rp-cr-linha > * { flex: 1; margin-bottom: 0; }
.rp-cr-linha > .rp-mini { flex: none; }
.rp-cr-num { display: grid; gap: 2px; min-width: 0; }
.rp-cr-num > span { font-size: 10px; font-weight: 700; color: #7c8aa3; }
.rp-cr-tri { display: grid; grid-template-columns: 92px repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin-bottom: 8px; }
.rp-cr-tri > span { font-size: 11px; font-weight: 700; color: #94a3b8; align-self: center; }
.rp-cr-tri > .rp-mini { padding: 6px 8px; }
.rp-cr-cubos { display: grid; gap: 4px; max-height: 210px; overflow-y: auto; scrollbar-width: thin; margin-top: 4px; }
.rp-cr-cubos button { display: flex; justify-content: space-between; gap: 6px; padding: 5px 8px; border-radius: 8px; border: 1px solid transparent; background: rgba(255, 255, 255, .04); color: #cbd5e1; font-size: 12px; cursor: pointer; font-family: inherit; }
.rp-cr-cubos button.ativo { border-color: #facc15; background: rgba(250, 204, 21, .12); color: #fff; }
.rp-cr-cubos small { color: #7c8aa3; }
.rp-cr-slots { display: grid; gap: 4px; margin-bottom: 6px; }
.rp-cr-slots .rp-cr-campo { margin-bottom: 4px; }
.rp-cr-slots .rp-mini { justify-self: start; padding: 5px 9px; }
.rp-cr-faces summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #cbd5e1; margin: 4px 0 8px; }
.rp-cr-face { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.rp-cr-face.off { opacity: .6; }
.rp-cr-face .rp-cr-chk { margin-bottom: 4px; }
.rp-cr-face-campos { display: grid; grid-template-columns: 52px repeat(4, minmax(0, 1fr)) 58px; gap: 4px; }
.rp-cr-face-campos input, .rp-cr-face-campos select { padding: 4px 5px; font-size: 11px; }

/* janelas e menu */
.rp-cr-fundo { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 14, .7); }
.rp-cr-janela { width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .12); background: #141830; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.rp-cr-janela-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.rp-cr-janela-topo h3 { margin: 0; font-size: 16px; font-weight: 800; color: #fff; }
.rp-cr-janela-corpo { padding: 16px; }
.rp-cr-janela-acoes { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.rp-cr-novos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rp-cr-novo { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .03); }
.rp-cr-novo b { font-size: 14px; color: #fff; }
.rp-cr-novo small { font-size: 12px; color: #94a3b8; line-height: 1.4; }
.rp-cr-novo div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.rp-cr-novo .rp-mini { padding: 5px 10px; }
.rp-cr-busca { margin-bottom: 10px; padding: 8px 10px; font-size: 13px; }
.rp-cr-trazer { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 50vh; overflow-y: auto; }
.rp-cr-trazer button { grid-template-columns: 26px 1fr; align-items: center; column-gap: 8px; }
.rp-cr-trazer button span { grid-row: span 2; font-size: 18px; }
.rp-cr-trazer button b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-cr-erros { margin: 0 0 0 18px; color: #fecaca; font-size: 13px; line-height: 1.6; }
.rp-cr-menu { position: absolute; z-index: 1001; width: 300px; padding: 6px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12); background: #141830; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.rp-cr-menu button { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; color: #e2e8f0; text-align: left; cursor: pointer; font-family: inherit; }
.rp-cr-menu button:hover { background: rgba(59, 130, 246, .18); }
.rp-cr-menu b { font-size: 13px; }
.rp-cr-menu small { font-size: 11px; color: #94a3b8; }

/* pintura */
.rp-pt { display: grid; gap: 8px; }
.rp-pt-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rp-pt-ferr { display: inline-flex; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .12); overflow: hidden; }
.rp-pt-ferr button { width: 36px; height: 32px; border: 0; background: rgba(255, 255, 255, .04); color: #e2e8f0; font-size: 15px; cursor: pointer; }
.rp-pt-ferr button.ativa { background: #2563eb; }
.rp-pt-cor { position: relative; width: 38px; height: 32px; border-radius: 9px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .2); cursor: pointer; background: repeating-conic-gradient(#2a2f3d 0 25%, #363c4d 0 50%) 50% / 10px 10px; }
.rp-pt-cor input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rp-pt-cor span { position: absolute; inset: 0; pointer-events: none; }
.rp-pt-alfa, .rp-pt-tam, .rp-pt-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #cbd5e1; }
.rp-pt-alfa input { width: 80px; accent-color: #3b82f6; }
.rp-pt-tam select { border-radius: 8px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(8, 10, 24, .7); color: #e2e8f0; font-size: 12px; padding: 4px 6px; }
.rp-pt-chk input { accent-color: #3b82f6; }
.rp-pt-paleta { display: flex; flex-wrap: wrap; gap: 4px; }
.rp-pt-paleta button { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .2); cursor: pointer; padding: 0; }
.rp-pt-paleta button.ativa { outline: 2px solid #fff; outline-offset: 1px; }
.rp-pt-tela { position: relative; height: min(60vh, 580px); min-height: 340px; border-radius: 12px; background: #0f1220; overflow: hidden; }
.rp-pt-tela canvas { display: block; cursor: crosshair; touch-action: none; }
.rp-pt-vazio { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #64748b; font-size: 14px; }
.rp-pt-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 11px; color: #64748b; }
.rp-pt-vazio[hidden], .rp-pt-tela canvas[hidden], .rp-cr-meio [data-cr-painel][hidden] { display: none; }

/* Conversor de modelo 3D de malha (.glb/.gltf/.obj) em cubos */
.rp-cr-janela.rp-cr-janela-larga { width: min(1040px, 100%); }
.rp-cr-malha { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.rp-cr-malha-tela { position: relative; height: min(560px, calc(100vh - 160px)); min-height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); background: #0f1220; }
.rp-cr-malha-tela canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.rp-cr-malha-status { position: absolute; left: 12px; bottom: 10px; margin: 0; font-size: 12px; color: #cbd5e1; text-shadow: 0 1px 2px #000; pointer-events: none; }
.rp-cr-malha-lado .rp-cr-campo { margin-bottom: 10px; }
.rp-cr-malha-lado input[type="range"] { width: 100%; }
.rp-cr-malha-giros { display: flex; gap: 6px; }
.rp-cr-malha-info { font-size: 13px; color: #e2e8f0; line-height: 1.5; margin: 6px 0 10px; }
.rp-cr-malha-info .aviso { color: #fcd34d; }
.rp-cr-malha-info .erro { color: #fca5a5; }
.rp-cr-malha .rp-cr-erros { margin-bottom: 10px; }
@media (max-width: 820px) {
  .rp-cr-malha { grid-template-columns: 1fr; }
  .rp-cr-malha-tela { height: 340px; }
}
