:root {
  color-scheme: dark; /* faz os widgets NATIVOS (dropdowns de <select>, file input, scrollbars) virem escuros */
  --bg: #080a0f;
  --glass: rgba(20, 24, 34, 0.55);
  --solid: #11141c;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --gold: #ffb02e;
  --gold-2: #ff8a00;
  --cyan: #3fe0ff;
  --text: #e9e7e1;
  --muted: #8a8a99;
  --green: #34d399;
  --red: #ff5b6e;
  --glow-gold: 0 0 18px rgba(255, 176, 46, 0.45);
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); font-family: var(--sans);
  background:
    radial-gradient(900px 520px at 82% -12%, rgba(255, 138, 0, 0.10), transparent 60%),
    radial-gradient(760px 520px at -12% 112%, rgba(63, 224, 255, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px; opacity: 0.4;
  -webkit-mask-image: radial-gradient(circle at 50% 25%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 50% 25%, #000, transparent 78%);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 176, 46, 0.25); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 176, 46, 0.5); background-clip: content-box; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.cmd-aliases { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; opacity: .85; }
.mono { font-family: var(--mono); }
.error { color: var(--red); min-height: 1em; }
.small { font-size: 12px; }

/* ---- permissões ---- */
.perms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .perms-grid { grid-template-columns: 1fr; } }
.perm-list { margin-top: 10px; max-height: 62vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; border: 1px solid transparent; }
.perm-row:hover { background: rgba(255, 255, 255, 0.03); border-color: var(--line); }
.perm-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.perm-node { font-family: var(--mono); font-size: 12.5px; color: var(--gold); word-break: break-word; }
.perm-desc { color: var(--muted); font-size: 12px; line-height: 1.35; }
.perm-row .ovr-sel { margin-left: auto; }
/* Filtro + categorias colapsáveis das permissões (escala melhor que a lista plana). */
.perm-filter { width: 100%; margin: 10px 0 2px; }
.perm-cat { border-radius: 8px; }
.perm-cat > summary { list-style: none; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; padding: 8px 6px; margin-top: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-top: 1px solid var(--line); }
.perm-cat > summary::-webkit-details-marker { display: none; }
.perm-cat > summary::before { content: "▸"; font-size: 9px; transition: transform 0.15s ease; }
.perm-cat[open] > summary::before { transform: rotate(90deg); }
.perm-cat > summary:hover { color: var(--text); }
.ovr-hint { margin: 4px 2px 8px; }
.player-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.player-head img { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-2); image-rendering: pixelated; background: var(--solid); }

/* ---- punições ---- */
.pun-badges { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 6px 0 20px; }
.pun-badge-group { display: inline-flex; align-items: center; gap: 6px; }
.ghost.mini { padding: 4px 10px; font-size: 11px; font-weight: 600; }
.pun-scope-tag { font-family: var(--mono); font-size: 10px; color: var(--cyan); background: rgba(63, 224, 255, 0.08); border: 1px solid rgba(63, 224, 255, 0.2); padding: 1px 6px; border-radius: 5px; flex: none; }
.pun-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 7px; border: 1px solid transparent; }
.pun-badge.ban { color: var(--red); background: rgba(255, 91, 110, 0.1); border-color: rgba(255, 91, 110, 0.3); }
.pun-badge.mute { color: var(--gold); background: rgba(255, 176, 46, 0.1); border-color: rgba(255, 176, 46, 0.3); }
.pun-badge.ok { color: var(--green); background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); }
.pun-buttons { margin-top: 14px; }
.input.dur { flex: 0 0 240px; min-width: 150px; }
#pun-msg { margin-top: 10px; min-height: 1em; }
.pun-row { padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); margin-bottom: 6px; background: rgba(255, 255, 255, 0.02); }
.pun-row.act { border-color: rgba(255, 91, 110, 0.35); background: rgba(255, 91, 110, 0.05); }
.pun-line { display: flex; align-items: center; gap: 10px; }
.pun-tag { font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); flex: none; }
.pun-tag.ban, .pun-tag.ipban { color: var(--red); background: rgba(255, 91, 110, 0.1); border-color: rgba(255, 91, 110, 0.25); }
.pun-tag.mute { color: var(--gold); background: rgba(255, 176, 46, 0.1); border-color: rgba(255, 176, 46, 0.25); }
.pun-tag.kick { color: var(--cyan); background: rgba(63, 224, 255, 0.08); border-color: rgba(63, 224, 255, 0.2); }
.pun-tag.warn { color: #d6b4ff; background: rgba(180, 130, 255, 0.1); border-color: rgba(180, 130, 255, 0.25); }
.pun-reason { flex: 1; font-size: 13px; word-break: break-word; }
.pun-state { font-size: 11.5px; color: var(--muted); flex: none; }
.pun-meta { margin-top: 4px; }

.app { position: relative; z-index: 1; display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }

/* ---- sidebar ---- */
.sidebar {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 16px;
  background: linear-gradient(180deg, rgba(16, 18, 26, 0.82), rgba(10, 12, 18, 0.82));
  border-right: 1px solid var(--line); backdrop-filter: blur(14px);
}
.logo { font-weight: 800; font-size: 21px; letter-spacing: 0.5px; padding: 4px 10px 24px; display: flex; align-items: center; gap: 9px; }
.logo span { color: var(--gold); text-shadow: var(--glow-gold); }
/* O .logo é flex com gap: 9px, portanto CADA filho é um item — e o texto solto ao lado de um
   <span> conta como item anónimo, o que abria um buraco no meio da palavra ("ARE NIX").
   O .wordmark junta a palavra num único item; lá dentro o span volta a ser inline. */
.logo .wordmark { color: var(--text); text-shadow: none; }
.logo .wordmark span { color: var(--gold); text-shadow: var(--glow-gold); }
.logo .hex { color: var(--gold); filter: drop-shadow(var(--glow-gold)); font-size: 22px; }
.navitem {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  padding: 11px 14px; border-radius: 11px; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all 0.18s ease;
}
.navitem svg { width: 18px; height: 18px; opacity: 0.85; flex: none; }
.navitem:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.navitem.active {
  color: #1a1306; background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: var(--glow-gold); border-color: rgba(255, 200, 80, 0.5);
}
.navitem.active svg { opacity: 1; }
.navitem.logout { margin-top: auto; }
.navitem.logout:hover { color: var(--red); background: rgba(255, 91, 110, 0.08); }

/* ---- content ---- */
.content { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 30px; border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 15, 0.4); backdrop-filter: blur(8px);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
main { padding: 28px 30px; overflow: auto; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; margin: 0 0 12px; }

/* ---- cards / glass ---- */
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.server.card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5); }
.server-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.server-head strong { font-size: 16px; }
.server-head .id { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-left: auto; text-transform: uppercase; letter-spacing: 1px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green), 0 0 4px var(--green); animation: pulse 2s infinite; }
.dot.off { background: #3a3f4b; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.stats { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; min-height: 28px; }
.stat { font-family: var(--mono); font-size: 12px; color: var(--cyan); background: rgba(63, 224, 255, 0.07); border: 1px solid rgba(63, 224, 255, 0.16); padding: 4px 9px; border-radius: 7px; }
.stat.off { color: var(--muted); background: rgba(255, 255, 255, 0.03); border-color: var(--line); }
.stat.good { color: var(--green); background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.22); }
.stat.warn { color: var(--gold); background: rgba(255, 176, 46, 0.08); border-color: rgba(255, 176, 46, 0.22); }
.stat.bad { color: var(--red); background: rgba(255, 91, 110, 0.10); border-color: rgba(255, 91, 110, 0.28); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Barra de sistema (topo do dashboard): jogadores na rede + load + RAM da maquina. */
.sys-bar { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.sysstat { flex: 1 1 180px; display: flex; flex-direction: column; gap: 5px; padding: 13px 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; }
.sysk { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.sysv { font-family: var(--mono); font-size: 21px; font-weight: 700; color: var(--text); line-height: 1.1; }
.sysv small { font-family: var(--sans); font-size: 11px; font-weight: 500; color: var(--muted); }
.sysv.accent { color: var(--gold); }
.sysv.good { color: var(--green); }
.sysv.warn { color: var(--gold); }
.sysv.bad { color: var(--red); }

/* Monitor por servidor: grafico ao vivo (SVG desenhado a mao). TPS nos backends, CPU no proxy. */
#servers { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.server.mon .server-head .id { margin-left: 8px; }
.mon-badge { margin-left: auto; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.3px; }
.mon-chart { position: relative; height: 80px; margin: 12px 0 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.015); overflow: hidden; }
.mon-chart svg { display: block; width: 100%; height: 80px; }
.mon-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mon-area { stroke: none; opacity: 0.16; transition: d 0.3s linear; }
.mon-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.mon-metric { position: absolute; top: 5px; right: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.mon-yhi, .mon-ylo { position: absolute; left: 6px; font-family: var(--mono); font-size: 9px; color: var(--muted); opacity: 0.65; }
.mon-yhi { top: 3px; }
.mon-ylo { bottom: 3px; }
.mon.is-off .mon-chart { opacity: 0.35; }
.mon-chips { margin: 0 0 13px; min-height: 26px; }

/* ---- autocomplete custom de nicks (substitui o <datalist> nativo, que vinha branco) ---- */
.ac-wrap { position: relative; flex: 1; min-width: 160px; }
.ac-wrap > .input { width: 100%; }
.ac-box { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--solid); border: 1px solid var(--line-2); border-radius: 10px; overflow-y: auto; max-height: 260px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55); }
.ac-box.hidden { display: none; }
.ac-item { padding: 8px 12px; font-family: var(--mono); font-size: 13px; color: var(--text); cursor: pointer; }
.ac-item:hover, .ac-item.sel { background: rgba(255, 176, 46, 0.12); color: var(--gold); }

/* ---- file input estilizado (esconde o "Escolher Ficheiro" nativo) ---- */
.file-pick { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-pick input[type="file"] { display: none; }
.file-pick .file-btn { cursor: pointer; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); color: var(--text); font-size: 13px; }
.file-pick .file-btn:hover { background: rgba(255, 255, 255, 0.07); }
.file-pick .file-name { font-size: 12px; color: var(--muted); }

/* ---- presets de busca da DB (sem escrever JSON) ---- */
.db-presets { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 12px; align-items: center; }
.db-presets .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.db-preset { font-size: 12px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--muted); cursor: pointer; }
.db-preset:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.05); }

/* ---- navegador de pastas (aba Configurações) ---- */
.cfg-search { width: 100%; margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-family: var(--sans); }
.cfg-search:focus { outline: none; border-color: var(--gold); background: rgba(255, 176, 46, 0.06); }
.cfg-search::placeholder { color: var(--muted); }
.cfg-mode { display: flex; gap: 6px; margin-bottom: 12px; }
.cfg-mode button { flex: 1; font-size: 12px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.cfg-mode button.active { background: rgba(255, 176, 46, 0.12); color: var(--gold); border-color: rgba(255, 176, 46, 0.3); }
.ftree-path { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 2px 0 8px; word-break: break-all; }
.ftree-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 6px 9px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text); font-size: 13px; cursor: pointer; }
.ftree-item:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
.ftree-item .ft-ic { width: 15px; text-align: center; flex: none; }
.ftree-item.dir { color: var(--gold); }
/* aba Código: descrição das pastas de topo + visualizador de ficheiro (só leitura) */
.ftree-item .code-desc { display: block; font-size: 11px; opacity: 0.6; color: var(--text); margin-top: 1px; white-space: normal; }
pre.codeview { margin: 0; max-height: 70vh; overflow: auto; background: rgba(0, 0, 0, 0.36); color: #d6e9f0; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre; tab-size: 4; }

/* ---- buttons ---- */
button { font-family: var(--sans); font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 9px; padding: 9px 15px; border: 1px solid transparent; transition: all 0.15s ease; }
.btn { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1a1306; box-shadow: 0 2px 14px rgba(255, 138, 0, 0.25); }
.btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
button:disabled { opacity: 0.3; cursor: not-allowed; filter: grayscale(0.5); }
.danger { background: rgba(255, 91, 110, 0.12); color: var(--red); border: 1px solid rgba(255, 91, 110, 0.3); }
.danger:hover:not(:disabled) { background: rgba(255, 91, 110, 0.2); }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.ghost:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.03); }

/* ---- db + config layouts ---- */
.split { display: grid; grid-template-columns: 264px 1fr; gap: 18px; align-items: start; }
.side-panel { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 14px; backdrop-filter: blur(12px); max-height: calc(100vh - 170px); overflow: auto; }
.list-btn { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: rgba(255, 255, 255, 0.02); color: var(--text); border: 1px solid var(--line); margin-bottom: 6px; border-radius: 9px; font-weight: 600; font-size: 13px; padding: 9px 12px; }
.list-btn:hover { border-color: var(--gold); background: rgba(255, 176, 46, 0.06); }
.list-btn.active { border-color: var(--gold); background: rgba(255, 176, 46, 0.1); }
.list-btn .badge { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar strong { font-size: 14px; }
.input { flex: 1; min-width: 220px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.32); color: var(--text); font-family: var(--mono); font-size: 13px; outline: none; transition: border-color 0.15s; }
.input:focus { border-color: var(--gold); }
.doc { margin-bottom: 14px; padding: 14px; }
textarea.code { width: 100%; min-height: 190px; resize: vertical; background: rgba(0, 0, 0, 0.36); color: #d6e9f0; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; outline: none; }
textarea.code:focus { border-color: var(--gold); }
.doc-actions { display: flex; gap: 8px; margin-top: 10px; }
.breadcrumb { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 12px; word-break: break-all; }
.hint { color: var(--muted); padding: 40px; text-align: center; }
/* Mapa do projeto (aba Código): alinhado à esquerda, sem o centrado/padding do .hint genérico. */
.code-structure .hint { text-align: left; padding: 0; margin: 6px 0 14px; line-height: 1.6; }
.code-structure ul.hint { padding-left: 22px; }
.code-structure li { margin: 4px 0; }
.code-structure h4 { margin: 18px 0 6px; }
.code-structure code { background: rgba(255, 255, 255, 0.07); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 0.9em; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
.modal-box { background: var(--solid); border: 1px solid var(--line-2); border-radius: 16px; width: min(950px, 92vw); max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.log { margin: 0; padding: 18px; overflow: auto; font-family: var(--mono); font-size: 12px; color: #b9c4cf; white-space: pre-wrap; line-height: 1.5; }
.console-box { height: 82vh; }
.console-box .log { flex: 1; }
.console-bar { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.console-bar .input { flex: 1; }

/* ---- aparência (MOTD + ícone) ---- */
.appearance-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1050px) { .appearance-grid { grid-template-columns: 1fr; } }
/* preview da lista de servidores do Minecraft */
.mc-serverlist { background: linear-gradient(180deg, #15100b, #0a0a0c); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; }
.mc-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 2px solid rgba(255, 255, 255, 0.5); background: rgba(0, 0, 0, 0.55); border-radius: 3px; }
.mc-icon { width: 64px; height: 64px; flex: none; image-rendering: pixelated; border-radius: 2px; background: repeating-conic-gradient(#2a2f3a 0% 25%, #232732 0% 50%) 50% / 16px 16px; }
.mc-icon.noicon { font-size: 0; color: transparent; }
.mc-text { flex: 1; min-width: 0; font-family: var(--mono); line-height: 1.5; overflow: hidden; }
.mc-title { color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-motd { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-motd span { white-space: pre; }
.mc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.mc-ping { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.mc-ping i { width: 3px; background: var(--green); border-radius: 1px; }
.mc-ping i:nth-child(1) { height: 3px; } .mc-ping i:nth-child(2) { height: 5px; } .mc-ping i:nth-child(3) { height: 7px; }
.mc-ping i:nth-child(4) { height: 9px; } .mc-ping i:nth-child(5) { height: 12px; }
.mc-players { font-family: var(--mono); font-size: 11px; color: var(--muted); }
/* editor de MOTD */
.field { display: block; margin-bottom: 12px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field .input { width: 100%; min-width: 0; }
.char-count { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.char-count.over { color: var(--red); font-weight: 700; }
.palette { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 14px; }
.pal-col { width: 22px; height: 22px; padding: 0; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.18); }
.pal-col:hover { transform: translateY(-1px); border-color: #fff; }
.pal-fmt { padding: 3px 8px; font-family: var(--mono); font-size: 12px; background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid var(--line); border-radius: 5px; }
.pal-fmt:hover { border-color: var(--gold); color: var(--gold); }
.input.file { padding: 8px 10px; font-family: var(--sans); font-size: 12px; cursor: pointer; }
.apply-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding: 10px 12px; border-radius: 9px; border: 1px solid rgba(255, 176, 46, 0.25); background: rgba(255, 176, 46, 0.06); }

/* ---- configurações: navegação por plugin + preview ---- */
.cfg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-chip { padding: 6px 11px; font-size: 12px; font-weight: 600; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--muted); }
.cfg-chip:hover { color: var(--text); border-color: var(--line-2); }
.cfg-chip.active { color: #1a1306; background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: transparent; }
.cfg-plugin { margin-bottom: 12px; }
.cfg-plugin-name { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); padding: 4px 2px 6px; }
.cfg-plugin-name.ours { color: var(--gold); }
.cfg-file .badge.prev { font-family: var(--sans); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--cyan); background: rgba(63, 224, 255, 0.1); border: 1px solid rgba(63, 224, 255, 0.25); padding: 1px 5px; border-radius: 4px; }
.cfg-file .badge.shared { font-family: var(--sans); font-size: 9px; font-weight: 700; color: #6ee7a8; background: rgba(110, 231, 168, 0.1); border: 1px solid rgba(110, 231, 168, 0.28); padding: 1px 5px; border-radius: 4px; }
.cfg-workarea { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.cfg-workarea.with-preview { grid-template-columns: 1fr 330px; }
@media (max-width: 1150px) { .cfg-workarea.with-preview { grid-template-columns: 1fr; } }
/* inventários (kit/menu) são largos -> preview por baixo do editor, a toda a largura */
.cfg-workarea.preview-below { grid-template-columns: 1fr; }
.cfg-workarea textarea.code { min-height: 360px; margin: 0; }
.cfg-workarea.preview-below textarea.code { min-height: 280px; }
.cfg-preview { background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 10px; padding: 14px; align-self: start; overflow: auto; }
.cfg-prev-head { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 10px; }
.cfg-prev-sub { font-size: 11px; color: var(--muted); margin: 12px 0 8px; line-height: 1.45; }
.cfg-prev-err { color: var(--red); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; }
/* preview scoreboard */
.mc-sb-wrap { background: linear-gradient(180deg, #0d0d12, #08080b); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; overflow: hidden; }
.mc-sidebar { background: rgba(0, 0, 0, 0.55); display: inline-block; min-width: 170px; max-width: 100%; padding: 4px 7px 6px; font-family: var(--mono); }
.mc-sb-title { color: #fff; font-weight: 700; text-align: center; font-size: 13px; padding: 2px 4px 5px; white-space: nowrap; overflow: hidden; }
.mc-sb-line { font-size: 12.5px; color: #cbd5e1; white-space: nowrap; overflow: hidden; line-height: 1.5; }
.mc-sb-title span, .mc-sb-line span { white-space: pre; }
.cfg-limits { display: flex; flex-direction: column; gap: 2px; }
.lim-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 5px; }
.lim-row .lim-k { color: var(--muted); }
.lim-row .lim-v { color: var(--green); }
.lim-row.over { background: rgba(255, 91, 110, 0.1); }
.lim-row.over .lim-v { color: var(--red); font-weight: 700; }
/* preview kit */
.kit-sect { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 14px 0 7px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 7px; }
.kit-row.hotbar { padding: 8px 5px 5px; background: rgba(0, 0, 0, 0.3); border-radius: 7px; }
.kit-slot { position: relative; width: 46px; height: 46px; border: 1px solid var(--line-2); border-radius: 5px; background: rgba(255, 255, 255, 0.03); display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px; }
.kit-slot.empty { background: rgba(0, 0, 0, 0.25); border-style: dashed; opacity: 0.45; }
.kit-slot.ench { border-color: #b46bff; box-shadow: 0 0 8px rgba(180, 107, 255, 0.4); background: rgba(180, 107, 255, 0.08); }
.kit-mat { font-size: 8.5px; line-height: 1.12; color: var(--text); word-break: break-word; }
.kit-amt { position: absolute; bottom: 1px; right: 3px; font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff; text-shadow: 1px 1px 0 #000; }
.kit-glint { position: absolute; top: 1px; right: 2px; font-size: 9px; color: #d6b4ff; }
.kit-lbl { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-size: 8px; color: var(--muted); background: var(--solid); padding: 0 3px; white-space: nowrap; }
.kit-effects { display: flex; flex-wrap: wrap; gap: 5px; }
.kit-eff { font-size: 11px; color: #a7f3d0; background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.25); padding: 2px 8px; border-radius: 6px; }

/* ---- preview dungeons (classes / tipos / melhorias) — cartões estilo Hypixel ---- */
.dng-list { display: flex; flex-direction: column; gap: 8px; }
.dng-card { display: flex; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.02); }
.dng-card-ico { flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); border-radius: 7px; }
.dng-card-ico .mc-ico { width: 30px; height: 30px; }
.dng-card-ico .mc-cell-mat { font-size: 7px; color: var(--muted); }
.dng-card-body { flex: 1 1 auto; min-width: 0; }
.dng-card-name { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.dng-card-tag { font-size: 11px; color: var(--muted); margin: 1px 0 6px; line-height: 1.35; }
.dng-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.dng-stat { display: inline-flex; align-items: baseline; gap: 5px; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.dng-stat i { font-style: normal; color: var(--muted); }
.dng-stat b { font-family: var(--mono); color: var(--text); font-weight: 700; }
.dng-hp { background: rgba(255, 91, 110, 0.09); border-color: rgba(255, 91, 110, 0.22); }
.dng-hp b { color: #ff8a97; }
.dng-dmg { background: rgba(255, 176, 32, 0.09); border-color: rgba(255, 176, 32, 0.22); }
.dng-dmg b { color: #ffc75a; }
.dng-ability { font-size: 11px; line-height: 1.4; margin: 6px 0 2px; color: var(--text); }
.dng-tag-lbl { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold); background: rgba(255, 176, 32, 0.1); border: 1px solid rgba(255, 176, 32, 0.25); padding: 1px 6px; border-radius: 5px; margin-right: 4px; }
.dng-scale { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.dng-scale b { color: var(--text); font-family: var(--mono); }
.dng-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.dng-chip { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; }
.dng-chip .mc-ico { width: 18px; height: 18px; }
.dng-chip .mc-cell-mat { font-size: 6px; -webkit-line-clamp: 2; }
.dng-waves { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 2px; }
.dng-wtag { font-size: 10.5px; font-family: var(--mono); color: var(--cyan); background: rgba(63, 224, 255, 0.08); border: 1px solid rgba(63, 224, 255, 0.2); padding: 2px 7px; border-radius: 6px; }
.dng-mobs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.dng-mob { font-size: 10.5px; color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); padding: 1px 7px; border-radius: 10px; }
.dng-on { color: var(--green); font-size: 10px; }
.dng-off { color: var(--red); font-size: 10px; }
.dng-up { display: flex; flex-direction: column; gap: 3px; }
.dng-up-row { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 8px; padding: 6px 9px; border-radius: 7px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); }
.dng-up-k { font-size: 11.5px; color: var(--text); }
.dng-up-v { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--gold); justify-self: end; }
.dng-up-h { grid-column: 1 / -1; font-size: 10px; color: var(--muted); line-height: 1.35; }

/* ---- EDITOR de dungeons.yml (cartões-formulário no #cfg-form) ---- */
.dng-ed { display: flex; flex-direction: column; gap: 12px; }
.dng-etabs { display: flex; flex-wrap: wrap; gap: 6px; }
.dng-etab { font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); transition: all .12s; }
.dng-etab:hover { color: var(--text); border-color: var(--line-2); }
.dng-etab.on { color: #1a1306; background: linear-gradient(135deg, var(--gold), var(--gold-2)); border-color: var(--gold); font-weight: 700; }
.dng-ehelp { font-size: 11px; color: var(--muted); line-height: 1.4; }
.dng-ebody { display: flex; flex-direction: column; gap: 14px; }
.dng-ecard { border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.02); padding: 12px 14px; }
.dng-ecard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.dng-ecard-head .cfg-mat-btn { flex: 0 0 auto; width: auto; min-width: 120px; max-width: 190px; }
.dng-ecard-head2 { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 8px; }
.dng-name-inp { flex: 1 1 160px; min-width: 120px; font-family: var(--mono); }
.dng-name-prev { flex: 0 0 auto; font-weight: 700; font-size: 14px; white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.dng-ecard-id { flex: 0 0 auto; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.dng-egroup { margin-top: 10px; }
.dng-egroup-t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); margin-bottom: 7px; }
.dng-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px 16px; align-items: start; }
.dng-field { display: flex; flex-direction: column; gap: 4px; }
.dng-field-full { grid-column: 1 / -1; }
.dng-flabel { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.dng-input { width: 100%; }
.dng-hint { font-size: 10px; color: var(--muted); line-height: 1.4; }
.dng-hint b { color: var(--cyan); font-family: var(--mono); }
.dng-hint-x { opacity: 0.7; }
.dng-hintrow { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin-top: 4px; padding: 5px 9px; border-radius: 7px; background: rgba(63, 224, 255, 0.05); border: 1px solid rgba(63, 224, 255, 0.14); }
.dng-hintrow-l { flex: 0 0 auto; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--cyan); }
.dng-hintrow .dng-hint { margin: 0; }
/* multiselect de mobs */
.dng-mobsel { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.dng-mchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 2px 4px 2px 9px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.dng-mchip-t { color: var(--text); }
.dng-mchip-x { font: inherit; font-size: 11px; line-height: 1; cursor: pointer; color: var(--muted); background: transparent; border: none; padding: 2px 4px; border-radius: 50%; }
.dng-mchip-x:hover { color: var(--red); background: rgba(255, 91, 110, 0.12); }
.dng-madd { width: auto; min-width: 92px; font-size: 11px; padding: 3px 6px; }
/* avançado (colapsável) */
.dng-adv { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.dng-adv > summary { list-style: none; cursor: pointer; user-select: none; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); padding: 2px 0; }
.dng-adv > summary::-webkit-details-marker { display: none; }
.dng-adv > summary::before { content: "▸ "; color: var(--gold); }
.dng-adv[open] > summary::before { content: "▾ "; }
.dng-adv-body { padding-top: 8px; }
.dng-adv-sub { margin-top: 8px; }
.dng-adv-sublbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 4px; }

/* ---- inventário MC (kit + menu) ---- */
.mc-inv, .mc-chest { --slot: 38px; background: linear-gradient(180deg, #c6c6c6, #b8b8b8); border: 2px solid; border-color: #fff #555 #555 #fff; border-radius: 4px; padding: 9px; display: inline-block; }
/* abas das TELAS do menu (cada inventário do mesmo /cla) */
.mc-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.mc-tab { font: inherit; font-size: 11px; padding: 5px 10px; border-radius: 6px; cursor: pointer; color: var(--muted);
  background: var(--surface, #1b1b1f); border: 1px solid var(--border, #34343a); transition: all .12s; }
.mc-tab:hover { color: var(--text, #eee); border-color: var(--accent, #c96442); }
.mc-tab.on { color: #fff; background: var(--accent, #c96442); border-color: var(--accent, #c96442); font-weight: 700; }
.mc-inv-lbl { color: #404040; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin: 6px 1px 4px; font-weight: 700; }
.mc-chest-title { color: #404040; font-family: var(--mono); font-weight: 700; font-size: 12px; padding: 1px 2px 8px; }
.mc-grid { display: grid; gap: 2px; }
.mc-grid--4 { grid-template-columns: repeat(4, var(--slot)); }
.mc-grid--9 { grid-template-columns: repeat(9, var(--slot)); }
.mc-grid.hotbar { margin-top: 8px; }   /* separa o hotbar do inventário principal, como no jogo */
.mc-cell { width: var(--slot); height: var(--slot); background: #8b8b8b; border: 2px solid; border-color: #373737 #fff #fff #373737; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.mc-cell.filled { background: #9c9c9c; }
.mc-cell.ench { box-shadow: inset 0 0 9px rgba(180, 107, 255, 0.75); }
.mc-cell-mat { font-size: 7px; line-height: 1.05; text-align: center; color: #161616; font-weight: 700; padding: 0 1px; width: 100%; word-break: break-word; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* TEXTURA real do item (16x16 do 1.8) ampliada e pixelada · fica igual ao Minecraft */
.mc-ico { width: 30px; height: 30px; image-rendering: pixelated; image-rendering: crisp-edges; }
/* SKULL = cara do Steve: recorte 8x8 (origem 8,8) do skin 64x64 → escalado p/ 30px (background 240px, offset -30px) */
.mc-skull { display: inline-block; background: url("items/steve.png") no-repeat -30px -30px / 240px 240px; }
/* célula do preview clicável → abre a config do item */
.mc-cell.clickable { cursor: pointer; }
.mc-cell.clickable:hover { outline: 2px solid var(--accent, #c96442); outline-offset: -2px; z-index: 1; }
/* destaque da secção do formulário ao abrir vinda do preview */
@keyframes cfgFlash { 0% { box-shadow: 0 0 0 2px var(--accent, #c96442); } 100% { box-shadow: 0 0 0 2px transparent; } }
.cfg-form-sec.cfg-flash { animation: cfgFlash 1.3s ease-out; border-radius: 8px; }
/* autocomplete de {placeholders} (escreve "{") */
.ph-pop { position: fixed; z-index: 9998; max-height: 260px; overflow-y: auto; max-width: 420px;
  background: var(--surface, #1b1b1f); border: 1px solid var(--accent, #c96442); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); padding: 4px; }
.ph-pop.hidden { display: none; }
.ph-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.ph-row.on, .ph-row:hover { background: rgba(201, 100, 66, 0.18); }
.ph-tok { font-family: var(--mono); font-size: 12px; color: var(--accent, #c96442); font-weight: 700; flex: none; }
.ph-desc { font-size: 11px; color: var(--muted, #9a9aa2); }
/* tooltip estilo Minecraft (nome + lore com cores) · fundo escuro + borda roxa em gradiente */
.mc-tip { position: fixed; z-index: 9999; pointer-events: none; max-width: 340px;
  background: rgba(16, 0, 16, 0.96); padding: 5px 8px;
  border: 2px solid; border-image: linear-gradient(180deg, #5000ff, #270050) 1;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.35; }
.mc-tip.hidden { display: none; }
.mc-tip-name { margin-bottom: 2px; }
.mc-tip-lore { white-space: pre-wrap; }
.mc-amt { position: absolute; bottom: -1px; right: 1px; font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.mc-glint { position: absolute; top: 0; right: 1px; font-size: 8px; color: #e9b3ff; text-shadow: 0 0 3px #b46bff; }
/* item picker modal */
.picker-box { width: min(760px, 94vw); height: min(560px, 86vh); }
.picker-bar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.picker-bar .input { flex: 1; min-width: 200px; }
.picker-cats { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.picker-body { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.pick-item { width: 58px; height: 56px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, 0.03); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.pick-item:hover { border-color: var(--gold); background: rgba(255, 176, 46, 0.08); transform: translateY(-1px); }
.pick-item .mc-ico { width: 26px; height: 26px; }
.pick-mat { font-size: 8.5px; line-height: 1.12; word-break: break-word; }
/* campo "material" do formulário: textura + nome + id */
.cfg-mat-btn { display: flex; align-items: center; gap: 8px; cursor: pointer; text-align: left; }
.cfg-mat-ico { width: 22px; height: 22px; image-rendering: pixelated; image-rendering: crisp-edges; flex: none; }
.cfg-mat-name { font-weight: 600; }
.cfg-mat-id { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.pick-preset { padding: 8px 12px; border: 1px solid rgba(255, 176, 46, 0.3); border-radius: 8px; background: rgba(255, 176, 46, 0.06); color: var(--gold); font-size: 12px; font-weight: 600; }
.pick-preset:hover { background: rgba(255, 176, 46, 0.14); }
.small.ok { color: var(--green); }

/* ---- login ---- */
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 350px; padding: 38px 32px; text-align: center; display: flex; flex-direction: column; gap: 14px;
  background: var(--glass); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.login-card .logo { justify-content: center; font-size: 32px; padding: 0 0 4px; }
.login-card p { margin: 0 0 6px; }
.login-card input { padding: 13px 15px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.32); color: var(--text); font-size: 14px; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.login-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 176, 46, 0.12); }
.login-card .btn { padding: 13px; border: none; font-size: 14px; }

/* Editor por formulário (configs) */
.cfg-form { overflow:auto; padding:6px 2px; max-height:62vh; }
.cfg-form-root { display:flex; flex-direction:column; gap:10px; }
.cfg-form-group { display:flex; flex-direction:column; gap:8px; margin-left:12px; padding-left:10px; border-left:2px solid rgba(255,255,255,.08); }
.cfg-form-row { display:flex; flex-direction:column; gap:3px; }
.cfg-form-label { font-weight:600; font-size:13px; color:#e8e8ea; }
.cfg-form-hint { font-size:11px; color:#8a8a90; line-height:1.3; }
.cfg-form-input { width:100%; max-width:520px; padding:6px 9px; background:#16161a; border:1px solid rgba(255,255,255,.13); border-radius:6px; color:#e8e8ea; font-size:13px; }
.cfg-form-input:focus { outline:none; border-color:#e0a23a; }
.cfg-form-item { display:flex; gap:10px; align-items:flex-start; padding:8px; border:1px solid rgba(255,255,255,.08); border-radius:8px; background:rgba(255,255,255,.02); }
.cfg-form-item .cfg-form-group { flex:1; margin-left:0; border-left:none; padding-left:0; }
.cfg-form-x { color:#e57373; font-size:12px; white-space:nowrap; }
.cfg-form-add { margin-top:6px; align-self:flex-start; }

/* Secções recolhíveis do editor por formulário */
.cfg-form-sec { border:1px solid rgba(255,255,255,.1); border-radius:8px; margin:5px 0; background:rgba(255,255,255,.025); }
.cfg-form-sec > summary { cursor:pointer; padding:8px 11px; font-size:13px; font-weight:600; color:#e8e8ea; display:flex; justify-content:space-between; align-items:center; gap:8px; list-style:none; }
.cfg-form-sec > summary::-webkit-details-marker { display:none; }
.cfg-form-sec[open] > summary { border-bottom:1px solid rgba(255,255,255,.07); }
.cfg-sec-title { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cfg-sec-title::before { content:"▸ "; color:#e0a23a; }
.cfg-form-sec[open] > summary .cfg-sec-title::before { content:"▾ "; }
.cfg-form-sec > .cfg-form-group { padding:8px 12px 11px; }
.cfg-form-sec > .cfg-sec-hint { padding:6px 12px 0; }

/* v2: escalares inline + listas em seletor (menos scroll) */
.cfg-form-row { flex-direction: row !important; align-items: center; gap: 12px; }
.cfg-form-row .cfg-form-label { flex: 0 0 195px; }
.cfg-form-row .cfg-form-input { flex: 1; max-width: none; }
.cfg-form-label.has-hint::after { content: " ⓘ"; color: #e0a23a; font-size: 11px; cursor: help; }
.cfg-grp-label { margin-top: 10px; }
.cfg-list { margin: 4px 0 8px; }
.cfg-list-bar { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.cfg-list-sel { flex: 1; max-width: 380px; padding: 6px 9px; background: #16161a; border: 1px solid rgba(255,255,255,.13); border-radius: 6px; color: #e8e8ea; font-size: 13px; }
.cfg-list-add { white-space: nowrap; }
.cfg-list-body { border-left: 2px solid rgba(224,162,58,.35); padding: 6px 0 6px 12px; margin: 6px 0 0 4px; }

/* Preview do .yml no modo formulário */
.cfg-prev-yaml { font-size: 12px; }
.cfg-prev-title { color: #8a8a90; font-size: 11px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.cfg-prev-yaml pre { margin: 0; max-height: 64vh; overflow: auto; background: rgba(0,0,0,.32); border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: #cdd6dd; font-family: var(--mono, monospace); font-size: 12px; line-height: 1.5; white-space: pre; }

/* Simulação de chat Minecraft (preview animado das mensagens) */
.mcchat { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
.mcchat-head { background: rgba(255,255,255,.05); padding: 6px 11px; font-size: 11px; color: #8a8a90; border-bottom: 1px solid rgba(255,255,255,.07); letter-spacing: .4px; }
.mcchat-body { padding: 12px; max-height: 62vh; overflow: auto; background: linear-gradient(180deg, rgba(20,22,30,.92), rgba(10,11,16,.96)); background-color: #0a0b10; }
.mcline { font-family: "Minecraftia", "Consolas", "Courier New", monospace; font-size: 14px; line-height: 1.7; text-shadow: 1.5px 1.5px 0 rgba(0,0,0,.55); white-space: pre-wrap; word-break: break-word; opacity: 0; transform: translateY(7px); animation: mcfade .32s ease forwards; }
@keyframes mcfade { to { opacity: 1; transform: none; } }

/* Preview com largura ajustável (flex + divisor arrastável) */
.cfg-workarea.with-preview { display: flex; grid-template-columns: none; gap: 10px; align-items: flex-start; }
.cfg-workarea.with-preview > #cfg-editor, .cfg-workarea.with-preview > #cfg-form { flex: 1 1 0; min-width: 0; }
.cfg-workarea.with-preview > #cfg-preview { flex: 0 0 auto; width: 400px; min-width: 240px; max-width: 1100px; }
.cfg-splitter { display: none; flex: 0 0 9px; align-self: stretch; min-height: 200px; cursor: col-resize; border-radius: 4px; background: rgba(255,255,255,.06); align-items: center; justify-content: center; color: rgba(255,255,255,.35); font-size: 13px; user-select: none; }
.cfg-workarea.with-preview > .cfg-splitter { display: flex; }
.cfg-splitter:hover, .cfg-splitter.dragging { background: rgba(224,162,58,.45); color: #fff; }
@media (max-width: 1150px) {
  .cfg-workarea.with-preview { flex-direction: column; }
  .cfg-workarea.with-preview > #cfg-editor, .cfg-workarea.with-preview > #cfg-form, .cfg-workarea.with-preview > #cfg-preview { flex: 0 0 auto; width: auto !important; min-width: 0; }
  .cfg-workarea.with-preview > .cfg-splitter { display: none; }
}

/* ===== v3: seletor de cor + inputs glassy + refresh futurista ===== */
/* Inputs/selects mais bonitos: vidro subtil + glow no foco */
input[type="text"], input[type="password"], input[type="number"], input[type="search"], input:not([type]),
select, .cfg-form-input, .cfg-list-sel, .cfg-color-trig, .cfg-color-free {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.012));
  border: 1px solid var(--line-2); border-radius: 10px; color: var(--text);
  padding: 9px 12px; font-size: 13px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, input:not([type]):focus,
select:focus, .cfg-form-input:focus, .cfg-list-sel:focus, .cfg-color-trig:focus, .cfg-color-free:focus {
  outline: none; border-color: rgba(255,176,46,.6);
  box-shadow: 0 0 0 3px rgba(255,176,46,.13), inset 0 0 14px rgba(255,176,46,.05);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
}
.cfg-list-sel:hover, .cfg-color-trig:hover { border-color: rgba(124,131,255,.45); }

/* Seletor de cor (campos "color") */
.cfg-color { position: relative; flex: 1; min-width: 0; }
.cfg-color-trig { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; font-weight: 500; cursor: pointer; }
.cfg-color-sw { width: 16px; height: 16px; border-radius: 5px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 0 8px rgba(0,0,0,.45); }
.cfg-color-sw.cfg-color-none { background: repeating-linear-gradient(45deg,#3a3f4b 0 4px,#23262f 4px 8px); }
.cfg-color-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; }
.cfg-color-car { color: var(--muted); font-size: 11px; }
.cfg-color-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; min-width: 230px; max-height: 320px; overflow: auto; padding: 8px; background: var(--solid); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.6); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.cfg-color-grp { grid-column: 1 / -1; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding: 7px 4px 2px; }
.cfg-color-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: transparent; border: 1px solid transparent; border-radius: 8px; text-align: left; font-weight: 500; cursor: pointer; }
.cfg-color-opt:hover { background: rgba(255,255,255,.06); border-color: var(--line-2); }
.cfg-color-optlbl { font-family: var(--mono); font-size: 12px; }
.cfg-color-free { grid-column: 1 / -1; margin-top: 6px; width: 100%; }

/* Refresh visual: radial violeta (frio/futurista) + relevos subtis */
body {
  background:
    radial-gradient(1000px 600px at 85% -15%, rgba(255,138,0,.10), transparent 60%),
    radial-gradient(820px 560px at -10% 110%, rgba(124,131,255,.11), transparent 60%),
    radial-gradient(680px 520px at 50% 125%, rgba(63,224,255,.05), transparent 60%),
    var(--bg);
}
.card { box-shadow: 0 8px 30px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.05); }
.btn { box-shadow: 0 2px 16px rgba(255,138,0,.28), inset 0 1px 0 rgba(255,255,255,.28); }
.btn:hover:not(:disabled) { box-shadow: 0 7px 24px rgba(255,138,0,.42), inset 0 1px 0 rgba(255,255,255,.32); }
.cfg-form-sec { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); }
.cfg-form-sec > summary:hover { color: #fff; }

/* ===== UI conectada (TEMA ESCURO): menos caixas, campos como lista ===== */
.card { border: 1px solid rgba(255,255,255,.06); box-shadow: 0 6px 24px rgba(0,0,0,.30); }
.list-btn { background: transparent; border: 1px solid transparent; border-radius: 8px; margin-bottom: 1px; }
.list-btn:hover { background: rgba(255,255,255,.05); border-color: transparent; }
.list-btn.active { background: rgba(255,176,46,.12); border-color: transparent; box-shadow: inset 2px 0 0 var(--gold); color: var(--text); }
.cfg-preview { background: transparent; border: none; padding: 0; }
.cfg-form .cfg-form-root, .cfg-form .cfg-form-group { gap: 0; }
.cfg-form .cfg-form-row { border-bottom: 1px solid var(--line); padding: 9px 2px; }
.cfg-form .cfg-form-row:last-child { border-bottom: none; }
.cfg-form .cfg-form-input, .cfg-form .cfg-color-trig, .cfg-form .cfg-color-free {
  background: transparent; border: 1px solid transparent; border-radius: 8px; box-shadow: none; padding: 7px 8px;
}
.cfg-form .cfg-form-input:hover, .cfg-form .cfg-color-trig:hover { background: rgba(255,255,255,.05); }
.cfg-form .cfg-form-input:focus, .cfg-form .cfg-color-trig:focus, .cfg-form .cfg-color-free:focus {
  background: rgba(255,176,46,.10); border-color: rgba(255,176,46,.40); box-shadow: none;
}
.cfg-form .cfg-list-sel { background: rgba(255,255,255,.05); border: 1px solid transparent; border-radius: 8px; }
.cfg-form .cfg-list-sel:hover { background: rgba(255,255,255,.08); }
.cfg-form .cfg-list-sel:focus { background: rgba(255,176,46,.10); border-color: rgba(255,176,46,.40); }
.cfg-form .cfg-form-group { border-left: 1px solid var(--line); margin-left: 8px; padding-left: 12px; }
.cfg-form .cfg-form-sec { border: none; background: transparent; margin: 0; border-radius: 0; }
.cfg-form .cfg-form-sec > summary { padding: 9px 2px; border-bottom: 1px solid var(--line); }
.cfg-form .cfg-form-sec[open] > summary { border-bottom: 1px solid var(--line); }
.cfg-form .cfg-form-sec > .cfg-form-group { padding: 2px 0 4px 12px; }
.cfg-form .cfg-list-body { border-left: 1px solid var(--line); padding: 2px 0 2px 12px; margin: 4px 0 0 2px; }
.cfg-color-pop .cfg-color-free { background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: var(--text); }

/* ===== dropdown custom (escuro) + campos percetíveis ===== */
/* campos como caixa subtil mas VISÍVEL (dá para perceber que é editável); sem divisórias duplas */
.cfg-form .cfg-form-row { border-bottom: none; padding: 6px 2px; }
.cfg-form .cfg-form-input, .cfg-form .cfg-dd-trig {
  background: rgba(0,0,0,.26); border: 1px solid rgba(255,255,255,.10); border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.28); padding: 9px 12px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.cfg-form .cfg-form-input:hover, .cfg-form .cfg-dd-trig:hover { border-color: rgba(255,176,46,.45); background: rgba(0,0,0,.32); }
.cfg-form .cfg-form-input:focus, .cfg-form .cfg-dd-trig:focus, .cfg-form .cfg-dd-trig.open {
  outline: none; border-color: var(--gold); background: rgba(0,0,0,.36);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.28), 0 0 0 3px rgba(255,176,46,.15);
}

/* dropdown custom (trigger) */
.cfg-dd { position: relative; flex: 1; min-width: 0; }
.cfg-dd-trig { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; cursor: pointer; color: var(--text); font-weight: 500; }
.cfg-dd-lab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cfg-dd-car { color: var(--muted); font-size: 10px; transition: transform .18s ease, color .15s; }
.cfg-dd-trig.open .cfg-dd-car { transform: rotate(180deg); color: var(--gold); }

/* popup (vai para o <body>, flutua sobre o scroll) */
.cfg-dd-pop.cfg-dd-float { position: fixed; }
.cfg-dd-pop {
  z-index: 80; max-height: 300px; overflow: auto; padding: 6px;
  background: linear-gradient(180deg, #171a23, #10121a);
  border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 22px 55px rgba(0,0,0,.62); animation: ddIn .14s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cfg-dd-grp { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding: 8px 8px 3px; }
.cfg-dd-opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 10px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 13px; cursor: pointer; transition: background .12s, border-color .12s; }
.cfg-dd-opt:hover { background: rgba(255,176,46,.10); border-color: rgba(255,176,46,.28); }
.cfg-dd-opt.sel { background: rgba(255,176,46,.15); box-shadow: inset 2px 0 0 var(--gold); }
.cfg-dd-optlab { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* popup do seletor de cor em grade de 2 colunas */
.cfg-dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.cfg-dd-grid .cfg-dd-grp { grid-column: 1 / -1; }
.cfg-dd-grid .cfg-color-free { grid-column: 1 / -1; margin-top: 6px; }

/* swatch = chip de cor (não um checkbox) */
.cfg-color-sw { width: 18px; height: 18px; border-radius: 6px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.25), inset 0 0 0 1px rgba(0,0,0,.25); transition: transform .12s; }
.cfg-dd-opt:hover .cfg-color-sw { transform: scale(1.12); }
.cfg-color-sw.cfg-color-none { background: repeating-linear-gradient(45deg,#3a3f4b 0 5px,#23262f 5px 10px) !important; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }
.cfg-color-free { background: rgba(0,0,0,.32); border: 1px solid var(--line-2); border-radius: 8px; color: var(--text); padding: 8px 10px; width: 100%; font-size: 12.5px; }
.cfg-color-free:focus { outline: none; border-color: var(--gold); }

/* ---- Editor de kits (kits.yml): modais pequenos + edição visual de itens ---- */
.modal-box.ui-modal { width: min(480px, 94vw); max-height: 86vh; }
.ui-modal-body { padding: 16px 20px; overflow: auto; }
.ui-modal-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); }
.ui-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; }
.ui-row .ui-lbl { width: 124px; flex: none; color: var(--muted); font-size: 13px; }
.ui-row .input { min-width: 0; flex: 1; }
.ui-row select.input { font-family: inherit; }
.ui-sec { margin: 14px 0 4px; font-weight: 600; font-size: 13px; }
.ench-row { display: flex; gap: 8px; margin: 6px 0; align-items: center; }
.ench-row select { flex: 1; min-width: 0; }
.ench-row .ench-lvl { width: 64px; flex: none; min-width: 0; }
.item-pick { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-start; }
.kit-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; }
.kit-bar .kit-title { font-weight: 600; }
.mc-cell.kit-edit { cursor: pointer; }
.mc-cell.kit-edit:hover { outline: 2px solid var(--gold); outline-offset: -2px; }
.kit-new { margin-top: 12px; }

/* ---- Gerir Admins + 2FA ---- */
.totp-secret { font-family: var(--mono); font-size: 17px; letter-spacing: 2px; background: rgba(0,0,0,.32); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; text-align: center; margin: 8px 0; cursor: pointer; word-break: break-all; color: var(--text); }
.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-card .admin-head { font-size: 14px; }
.admin-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-acts .ghost { padding: 6px 12px; font-size: 12px; }
.admin-acts .ghost.danger { background: transparent; border: 1px solid var(--line); color: #e06a6a; }
.admin-acts .ghost.danger:hover { border-color: #e06a6a; background: rgba(224,106,106,.08); }
.tab-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tab-checks label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.ok { color: #5fcf80; }
.warn { color: #e0a93b; }

/* ════════════════════════════════════════════════════════════════
   v4 · FUTURISTIC LUXURY  (overrides finais — ganham por cascata)
   Preto profundo · ouro champanhe · aurora viva · hairlines · tracking
   ════════════════════════════════════════════════════════════════ */
@property --rcang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
:root {
  --bg: #06070a;
  --line: rgba(255, 255, 255, 0.055);
  --line-2: rgba(255, 255, 255, 0.11);
  --gold: #f1c878;
  --gold-2: #d99a35;
  --glow-gold: 0 0 22px rgba(241, 200, 120, 0.4);
  --radius: 18px;
  --sans: "Inter", "SF Pro Display", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* fundo: preto profundo + aurora dourada que respira + grelha ultra-subtil */
body {
  background:
    radial-gradient(1100px 720px at 80% -18%, rgba(241, 200, 120, 0.07), transparent 60%),
    radial-gradient(820px 680px at -8% 116%, rgba(120, 110, 170, 0.055), transparent 60%),
    var(--bg);
}
body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 68px 68px; opacity: 0.6;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 50% 18%, #000, transparent 72%);
}
body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none;
  width: 70vw; height: 70vw; right: -15vw; top: -25vh;
  background: radial-gradient(circle, rgba(241, 200, 120, 0.10), transparent 62%);
  filter: blur(40px); will-change: transform;
  animation: rcAurora 28s ease-in-out infinite alternate;
}
@keyframes rcAurora {
  from { transform: translate(0, 0) scale(1); opacity: 0.75; }
  to   { transform: translate(-14vw, 12vh) scale(1.3); opacity: 1; }
}

/* tipografia premium (tracking = luxo) */
.logo { letter-spacing: 2.5px; text-transform: uppercase; font-weight: 700; font-size: 18px; }
.logo .hex { filter: drop-shadow(var(--glow-gold)); }
.topbar h1 { letter-spacing: 3px; font-weight: 600; font-size: 15px; opacity: 0.95; }
.section-title, .sysk, .cfg-prev-head { letter-spacing: 2px; }

/* sidebar refinada */
.sidebar { background: linear-gradient(180deg, rgba(13, 14, 20, 0.9), rgba(7, 8, 11, 0.92)); }
.navitem { border-radius: 12px; transition: color .2s, background .2s, border-color .2s; }
.navitem:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.navitem.active {
  color: var(--gold); background: linear-gradient(90deg, rgba(241, 200, 120, 0.13), rgba(241, 200, 120, 0.02));
  border-color: rgba(241, 200, 120, 0.2); box-shadow: none; position: relative;
}
.navitem.active::before {
  content: ""; position: absolute; left: -1px; top: 20%; bottom: 20%; width: 3px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); box-shadow: 0 0 14px rgba(241, 200, 120, 0.7);
}
.navitem.active svg { color: var(--gold); opacity: 1; }

/* topbar */
.topbar { background: rgba(6, 7, 10, 0.5); }

/* cards: vidro profundo + brilho de topo + hover dourado */
.card {
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(23, 25, 33, 0.5), rgba(13, 14, 19, 0.46));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.045);
}
.card:hover, .server.card:hover {
  border-color: rgba(241, 200, 120, 0.22);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(241, 200, 120, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.sysstat, .side-panel { border-radius: 14px; background: linear-gradient(180deg, rgba(23, 25, 33, 0.5), rgba(13, 14, 19, 0.46)); }
.sysv { letter-spacing: 0.5px; }

/* botões dourados refinados */
.btn {
  background: linear-gradient(135deg, #f8d490, var(--gold-2)); color: #2a1d04; letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(241, 200, 120, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn:hover:not(:disabled) {
  filter: brightness(1.05); transform: translateY(-1px);
  box-shadow: 0 9px 28px rgba(241, 200, 120, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* scrollbar fina dourada */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(241, 200, 120, 0.22); border: 2px solid transparent; background-clip: content-box; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(241, 200, 120, 0.45); background-clip: content-box; }

/* ░░ LOGIN — a montra: cartão de vidro com ANEL DOURADO a girar ░░ */
.login-card {
  width: 376px; padding: 46px 38px 40px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.74), rgba(9, 10, 15, 0.76));
  border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative; overflow: hidden;
}
.login-card::before { /* anel dourado em rotação lenta no contorno (assinatura) */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--rcang), transparent 0 60%, rgba(241, 200, 120, 0.7) 80%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rcAng 9s linear infinite;
}
@keyframes rcAng { to { --rcang: 360deg; } }
.login-card > * { position: relative; z-index: 1; }
.login-card .logo { font-size: 26px; letter-spacing: 4px; justify-content: center; }
.login-card .muted { letter-spacing: 2px; text-transform: uppercase; font-size: 11px; }
.login-card .totp-secret { letter-spacing: 3px; }
/* os PASSOS (credenciais / 2FA) empilham a toda a largura — senão o input e o botão ficam lado a lado (torto) */
#step-cred, #step-2fa { display: flex; flex-direction: column; gap: 13px; }
#step-cred input, #step-2fa input, #step-cred .btn, #step-2fa .btn { width: 100%; }

/* ════════════════════════════════════════════════════════════════
   v5 · ARQUITETURA COESA (estilo Entra/Intune): cada página com o
   MESMO esqueleto — cabeçalho (título+descrição) + secções rotuladas
   + tela de conteúdo onde os cards assentam (não flutuam no fundo).
   ════════════════════════════════════════════════════════════════ */
/* tela de conteúdo: superfície calma por cima da aurora → os cards ficam "ancorados" */
.content { background: linear-gradient(180deg, rgba(9, 10, 14, 0.5), rgba(7, 8, 11, 0.6)); }

/* cabeçalho de página: título + descrição (esq.) · conta + relógio (dir.) */
.topbar { align-items: center; padding: 15px 30px; }
.pagehead h1 { margin: 0; font-size: 17px; letter-spacing: 2px; }
.page-desc { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); letter-spacing: .2px; text-transform: none; font-weight: 400; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.acct { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text); background: rgba(255, 255, 255, .03); border: 1px solid var(--line); padding: 6px 12px; border-radius: 10px; white-space: nowrap; }
.acct-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(241, 200, 120, .7); }
.acct-role { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); border: 1px solid rgba(241, 200, 120, .3); border-radius: 5px; padding: 1px 6px; }

/* conteúdo usa a LARGURA TODA da página (sem limite); secções rotuladas */
main { max-width: none; width: 100%; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 24px 0 13px; }
.section-head:first-child { margin-top: 2px; }
.section-head h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.section-head .ln { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* ════════════════════════════════════════════════════════════════
   v6 · PAINÉIS CONSISTENTES — o 1.º toolbar de cada card vira um
   CABEÇALHO de painel (faixa + divisor), igual em todas as views.
   ════════════════════════════════════════════════════════════════ */
.card > .toolbar:first-child {
  margin: -20px -20px 16px; padding: 13px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .022), transparent);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card > .toolbar:first-child > strong { font-size: 13.5px; font-weight: 600; letter-spacing: .3px; color: var(--text); }
.section-title { font-weight: 600; letter-spacing: 2px; }
.section-head .btn { padding: 7px 14px; font-size: 12.5px; flex: none; }

/* ════════════════════════════════════════════════════════════════
   v7 · FORMULÁRIO DE CONFIG mais bonito — campos em COLUNAS (enchem
   a largura sem ficarem gigantes), linhas com respiro e hover.
   ════════════════════════════════════════════════════════════════ */
.cfg-form-root { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 4px 26px; align-items: start; }
.cfg-form-root > :not(.cfg-form-row) { grid-column: 1 / -1; }   /* listas, secções e rótulos a toda a largura */
.cfg-form-row { padding: 8px 11px; border-radius: 10px; gap: 14px; margin: 0; }
.cfg-form-row:hover { background: rgba(255, 255, 255, .025); }
.cfg-form-row .cfg-form-label { flex: 0 0 170px; font-weight: 500; font-size: 12.5px; color: #d7d7db; }
.cfg-form-row .cfg-form-input { font-family: var(--mono); font-size: 12.5px; }
.cfg-form-label.has-hint::after { content: " ⓘ"; color: var(--gold); font-size: 11px; }
/* secções/cabeçalhos do formulário um pouco mais elegantes */
.cfg-grp-label { color: var(--gold); letter-spacing: .5px; font-size: 11px; text-transform: uppercase; opacity: .85; }

/* ════════════════════════════════════════════════════════════════
   v8 · FORMULÁRIO COESO — menos "caixinhas": inputs subtis (dourado só
   no foco), linhas ligadas por divisores (lista de propriedades), e os
   grupos aninhados (MODULES/COMMANDS/secções) como SUB-PAINÉIS.
   ════════════════════════════════════════════════════════════════ */
/* colunas mais largas e calmas (≈2 em vez de 3) */
.cfg-form-root { grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); column-gap: 40px; row-gap: 0; }
/* input deixa de ser "caixa": fundo quase nulo + borda fininha; só acende a dourado no foco */
.cfg-form-input, .cfg-list-sel {
  background: rgba(255, 255, 255, .02); border: 1px solid rgba(255, 255, 255, .05); border-radius: 8px;
}
.cfg-form-input:focus, .cfg-list-sel:focus {
  border-color: rgba(241, 200, 120, .55); background: rgba(255, 255, 255, .045);
  box-shadow: 0 0 0 3px rgba(241, 200, 120, .1);
}
/* linhas como LISTA ligada (divisor subtil), não cada uma na sua caixa */
.cfg-form-row { border-radius: 0; padding: 9px 2px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.cfg-form-row:hover { background: transparent; }
.cfg-form-row .cfg-form-label { color: var(--muted); }
/* grupos aninhados = sub-painéis indentados (um só acento à esquerda, sem caixas duplicadas) */
.cfg-list-body { border-left: 2px solid rgba(241, 200, 120, .32); background: rgba(255, 255, 255, .012); border-radius: 0 10px 10px 0; padding: 4px 16px 8px; margin: 8px 0 10px 2px; }
.cfg-list-body > .cfg-form-group { border-left: none; margin-left: 0; padding-left: 0; }
.cfg-form-sec { border: 1px solid rgba(255, 255, 255, .06); background: rgba(255, 255, 255, .014); }
.cfg-form-sec > summary:hover { background: rgba(255, 255, 255, .03); }
.cfg-form-group { border-left-color: rgba(241, 200, 120, .22); }

/* ════════════════════════════════════════════════════════════════
   v9 · AINDA MAIS FUNDIDO — sem divisores nas linhas (lista contínua)
   + cada grupo (listas e secções) com o SEU cabeçalho dourado.
   ════════════════════════════════════════════════════════════════ */
.cfg-form-row { border-bottom: none; padding: 7px 2px; }
.cfg-form-row:hover { background: rgba(241, 200, 120, .035); }
/* cabeçalho de grupo de LISTA (MODULES, COMMANDS): dourado + barra de acento */
.cfg-grp-label { display: flex; align-items: center; gap: 9px; color: var(--gold); font-size: 11.5px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; opacity: 1; margin: 18px 0 8px; }
.cfg-grp-label::before { content: ""; width: 3px; height: 14px; flex: none; border-radius: 2px; background: linear-gradient(var(--gold), var(--gold-2)); box-shadow: 0 0 8px rgba(241, 200, 120, .55); }
/* cabeçalho de SECÇÃO recolhível (maps): faixa dourada subtil + título dourado */
.cfg-form-sec > summary { background: linear-gradient(90deg, rgba(241, 200, 120, .07), rgba(241, 200, 120, .01)); }
.cfg-form-sec[open] > summary { border-bottom-color: rgba(241, 200, 120, .18); }
.cfg-sec-title { color: var(--gold); font-weight: 600; letter-spacing: .4px; }
.cfg-sec-title::before, .cfg-form-sec[open] > summary .cfg-sec-title::before { color: var(--gold); }

/* ---------- Aba Anti-Cheat ---------- */
.ac-legend { margin-bottom: 16px; padding: 12px 16px; }
.ac-legend > summary { cursor: pointer; font-weight: 600; color: var(--gold); list-style: none; font-size: 13.5px; }
.ac-legend > summary::-webkit-details-marker { display: none; }
.ac-legend > summary::before { content: "▸ "; }
.ac-legend[open] > summary::before { content: "▾ "; }
.ac-legend-body { margin-top: 12px; font-size: 13px; color: #cfcfe0; line-height: 1.55; }
.ac-legend-body p { margin: 0 0 10px; }
.ac-legend-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 10px 0; }
@media (max-width: 820px) { .ac-legend-two { grid-template-columns: 1fr; } }
.ac-legend-col { padding: 12px 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(255,255,255,.02); }
.ac-legend-h { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.ac-legend-h-red { color: #ff7a7a; }
.ac-legend-h-green { color: #46c878; }
.ac-legend-col ul { margin: 6px 0 0; padding-left: 18px; }
.ac-legend-col li { margin: 5px 0; }
.ac-lg { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 999px; }
.ac-lg-red { background: rgba(255,70,70,.16); color: #ff7a7a; }
.ac-lg-amber { background: rgba(255,176,46,.16); color: var(--gold); }
.ac-legend-tip { font-size: 12.5px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.06); padding-top: 10px; }
.ac-susp-word { font-size: 11px; font-weight: 600; opacity: .8; }
.ac-b-sub { font-size: 10.5px; font-weight: 600; color: #8fd6a8; background: rgba(70,200,120,.12); border: 1px solid rgba(70,200,120,.22); padding: 0 6px; border-radius: 999px; vertical-align: middle; }
.ac-flags-cap { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin: 2px 0 2px; }
.ac-b-z[title], .ac-vl[title], .ac-b-base[title], .ac-susp[title], .ac-chip[title], .ac-count[title] { cursor: help; }
.ac-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .ac-grid { grid-template-columns: 1fr; } }
.ac-list { display: flex; flex-direction: column; gap: 8px; max-height: 72vh; overflow-y: auto; }
.ac-sus { padding: 10px 12px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(255,255,255,.015); cursor: pointer; transition: border-color .15s, background .15s; }
.ac-sus:hover { border-color: rgba(241,200,120,.28); background: rgba(255,255,255,.03); }
.ac-sus.active { border-color: var(--gold); background: rgba(241,200,120,.06); }
.ac-sus-top { display: flex; justify-content: space-between; align-items: center; }
.ac-count { background: rgba(255,80,80,.14); color: #ff6b6b; font-weight: 700; font-size: 12px; padding: 1px 9px; border-radius: 999px; }
.ac-sus-meta { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 5px; }
.ac-sus-foot, .ac-flag-foot { font-size: 11px; }
.ac-chip { font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 6px; border: 1px solid transparent; white-space: nowrap; }
.ac-chip b { font-weight: 700; }
.ac-chip.ac-red { background: rgba(255,70,70,.12); color: #ff7a7a; border-color: rgba(255,70,70,.25); }
.ac-chip.ac-amber { background: rgba(255,176,46,.12); color: var(--gold); border-color: rgba(255,176,46,.22); }
.ac-chip.ac-purple { background: rgba(160,110,255,.14); color: #b98cff; border-color: rgba(160,110,255,.28); }
.ac-chip.ac-blue { background: rgba(80,160,255,.14); color: #6bb6ff; border-color: rgba(80,160,255,.28); }
.ac-chip.ac-gray { background: rgba(255,255,255,.05); color: var(--muted); border-color: rgba(255,255,255,.08); }
.ac-detail { min-height: 200px; }
.ac-detail-head { display: block; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.06); }
.ac-flags { display: flex; flex-direction: column; gap: 6px; max-height: 68vh; overflow-y: auto; }
.ac-flag { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.05); }
.ac-vl { color: #ff6b6b; font-weight: 700; font-size: 12px; }
.ac-verbose { font-family: var(--mono); font-size: 11.5px; color: #cfcfe0; word-break: break-word; }
.ac-flag-foot { grid-column: 1 / -1; }
.ac-suspects .toolbar { flex-wrap: wrap; gap: 8px; }
.btn.small { padding: 2px 8px; font-size: 12px; }

/* barra de filtro por check (chips toggle, multi-seleção) */
.ac-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 12px; }
.ac-fsep { flex-basis: 100%; height: 0; }
.ac-fchip { font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.03); color: var(--muted); border: 1px solid rgba(255,255,255,.09); transition: all .12s; }
.ac-fchip:hover { border-color: rgba(255,255,255,.2); color: #e6e6ee; }
.ac-fchip b { font-weight: 700; margin-left: 2px; opacity: .85; }
.ac-fchip.on { color: #12120f; font-weight: 600; }
.ac-fchip.on b { opacity: .7; }
.ac-fchip.ac-all.on { background: var(--gold); border-color: var(--gold); }
.ac-fchip.ac-red.on { background: #ff7a7a; border-color: #ff7a7a; }
.ac-fchip.ac-amber.on { background: var(--gold); border-color: var(--gold); }
.ac-fchip.ac-purple.on { background: #b98cff; border-color: #b98cff; }
.ac-fchip.ac-blue.on { background: #6bb6ff; border-color: #6bb6ff; }
.ac-fchip.ac-gray.on { background: #cfcfe0; border-color: #cfcfe0; }
.ac-fnote { font-size: 11px; color: var(--gold); background: rgba(255,176,46,.12); border: 1px solid rgba(255,176,46,.22); padding: 1px 8px; border-radius: 999px; }

/* ---------- Anti-Cheat: confiança (rótulos ML) + comportamento ---------- */
.ac-trust { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; vertical-align: middle; }
.ac-tb-green { background: rgba(70,200,120,.16); color: #46c878; border: 1px solid rgba(70,200,120,.3); }
.ac-tb-red { background: rgba(255,80,80,.16); color: #ff6b6b; border: 1px solid rgba(255,80,80,.3); }
.ac-tb-amber { background: rgba(255,176,46,.16); color: var(--gold); border: 1px solid rgba(255,176,46,.3); }
.ac-dhead-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-tset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.ac-tset { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; cursor: pointer; color: var(--muted);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); transition: all .12s; }
.ac-tset:hover { border-color: rgba(255,255,255,.25); color: #eee; }
.ac-tset.on { background: var(--gold); border-color: var(--gold); color: #12120f; font-weight: 600; }
.ac-behavior { margin: 8px 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06); }
.ac-b-head { font-size: 12px; color: #cfcfe0; margin-bottom: 6px; }
.ac-b-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 3px 0; font-size: 12.5px; }
.ac-b-label { color: var(--muted); }
.ac-b-val { font-family: var(--mono); color: var(--gold); font-weight: 600; }
.ac-b-base { font-family: var(--mono); font-size: 11px; color: #46c878; }

/* ---------- Anti-Cheat Fase 2: z-scores + pontuação de suspeita ---------- */
.ac-susp { display: flex; align-items: center; justify-content: space-between; padding: 7px 11px; border-radius: 8px; color: #12120f; font-weight: 700; font-size: 12.5px; margin: 8px 0 4px; }
.ac-susp-n { font-size: 15px; }
.ac-susp-flags { font-size: 11.5px; color: #ff8c42; margin: 4px 0 6px; }
.ac-susp-none { font-size: 12px; color: #9a9ab0; background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.12); border-radius: 8px; padding: 7px 11px; margin: 8px 0 4px; line-height: 1.5; }
.ac-susp-none b { color: #46c878; }
.ac-susp-badge { color: #12120f; font-weight: 700; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.ac-sus-r { display: inline-flex; align-items: center; gap: 6px; }
.ac-b-z { font-family: var(--mono); font-size: 11px; font-weight: 700; margin-left: 6px; }

/* ---------- Anti-Cheat Fase 1.5: avisos heurísticos + detalhes técnicos ---------- */
.ac-b-warns { margin: 4px 0 8px; display: flex; flex-direction: column; gap: 5px; }
.ac-b-warn { font-size: 12px; color: #ff8c42; background: rgba(255,140,66,.1); border: 1px solid rgba(255,140,66,.25); border-radius: 8px; padding: 5px 9px; }
.ac-b-details { margin-top: 8px; }
.ac-b-details > summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 3px 0; list-style: none; }
.ac-b-details > summary::before { content: "▸ "; }
.ac-b-details[open] > summary::before { content: "▾ "; }

/* ============================ Editor de Loja ============================ */
.loja-wrap { display: flex; flex-direction: column; gap: 14px; }
.loja-loading, .loja-err { padding: 24px; opacity: .7; text-align: center; }
.loja-err { color: #f87171; }
.loja-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.loja-top-l { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.loja-top-r { display: flex; align-items: center; gap: 10px; }
.loja-fld { display: flex; flex-direction: column; gap: 4px; }
.loja-fld > span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; }
.loja-fld .cfg-form-input { min-width: 0; }
.loja-fld-sm { width: 120px; } .loja-fld-sm .cfg-form-input { width: 100%; }
.loja-fld-xs { width: 74px; } .loja-fld-xs .cfg-form-input { width: 100%; }
.loja-status { font-size: 13px; opacity: .85; min-width: 70px; text-align: right; }
.loja-status.ok { color: #4ade80; } .loja-status.err { color: #f87171; }
.loja-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.loja-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); cursor: pointer; color: inherit; font: inherit; }
.loja-chip:hover { border-color: rgba(255,255,255,.28); }
.loja-chip.active { border-color: #d9b25f; background: rgba(217,178,95,.14); box-shadow: 0 0 0 1px rgba(217,178,95,.35) inset; }
.loja-chip-ico { width: 20px; height: 20px; image-rendering: pixelated; }
.loja-chip-id { font-size: 11px; opacity: .5; }
.loja-chip-add { border-style: dashed; opacity: .85; }
.loja-main { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .loja-main { grid-template-columns: 1fr; } }
.loja-cat { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.loja-cat-set { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.loja-cat-set > #lc-del { margin-left: auto; }
.loja-items { display: flex; flex-direction: column; gap: 10px; }
.loja-item { padding: 10px 12px; }
.loja-item-grid { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.loja-item-grid .li-mat { flex: 0 0 auto; }
.loja-item-grid .li-name-f { flex: 1 1 200px; }
.loja-item-grid .li-ench-f { flex: 1 1 100%; }
.li-price { display: flex; flex-direction: column; gap: 4px; }
.li-chk { font-size: 12px; display: flex; gap: 6px; align-items: center; opacity: .8; }
.li-price .cfg-form-input { width: 110px; }
.li-del { align-self: center; padding: 6px 10px; }
.loja-additem { align-self: flex-start; }
.loja-noitems, .loja-empty { opacity: .6; padding: 18px; text-align: center; }
.loja-preview { position: sticky; top: 12px; }

/* ---- Editor de Loja: cartão de item compacto (v2) ---- */
.loja-item { position: relative; padding: 12px 14px; }
.loja-item-r1, .loja-item-r2 { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.loja-item-r2 { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.loja-item .li-mat { flex: 0 0 auto; }
.loja-item .li-name-f { flex: 1 1 220px; }
.loja-item .li-ench-f { flex: 1 1 200px; }
.loja-item-x { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 6px; border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.1); color: #f87171; cursor: pointer; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.loja-item-x:hover { background: rgba(248,113,113,.22); }
.li-price { display: flex; flex-direction: column; gap: 4px; }
.li-price .cfg-form-input { width: 100px; }
.li-price .cfg-form-input:disabled { opacity: .38; }
.li-chk { font-size: 12px; display: flex; gap: 6px; align-items: center; opacity: .85; }
.loja-additem { align-self: flex-start; margin-top: 2px; }
.loja-flash { animation: lojaFlash 1.2s ease; }
@keyframes lojaFlash { 0%,100% { box-shadow: none; } 30% { box-shadow: 0 0 0 2px #d9b25f, 0 0 18px rgba(217,178,95,.5); } }
.loja-preview .cfg-prev-head { cursor: default; }

/* ---- Editor de Loja: encantamentos + data ---- */
.loja-item-r3 { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.li-ench-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; display: block; margin-bottom: 6px; }
.li-ench-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.li-ench-row { display: flex; gap: 8px; align-items: center; }
.li-ench-row .li-e-id { flex: 1 1 200px; max-width: 260px; }
.li-ench-row .li-e-lvl { width: 70px; }
.li-e-del { width: 26px; height: 26px; border-radius: 6px; border: 1px solid rgba(248,113,113,.35); background: rgba(248,113,113,.08); color: #f87171; cursor: pointer; padding: 0; }
.li-e-del:hover { background: rgba(248,113,113,.2); }
.li-ench-add { align-self: flex-start; padding: 5px 10px; border-radius: 8px; border: 1px dashed rgba(255,255,255,.2); background: transparent; color: inherit; cursor: pointer; font-size: 12px; opacity: .85; }
.li-ench-add:hover { border-color: rgba(255,255,255,.4); }

/* ---- Editor de Loja: preview CONTIDO (não sair da página) ---- */
.loja-main { grid-template-columns: minmax(0, 1fr) 360px; }
.loja-cat { min-width: 0; }
.loja-preview {
  position: sticky; top: 12px; overflow: auto; max-height: calc(100vh - 130px);
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px 12px 14px;
}
.loja-preview .mc-inv, .loja-preview .mc-chest { --slot: 32px; }        /* mais compacto → cabe na coluna */
.loja-preview .mc-chest { display: block; width: max-content; max-width: 100%; margin: 0 auto; }
.loja-preview .cfg-prev-head { font-size: 10.5px; opacity: .55; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .05em; line-height: 1.35; }
.loja-preview .mc-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.loja-preview .cfg-prev-sub { margin-top: 8px; font-size: 11px; opacity: .55; }
@media (max-width: 1150px) { .loja-main { grid-template-columns: 1fr; } .loja-preview { position: static; max-height: none; } }

/* ---- Editor de Loja: paginação ---- */
.loja-paged-note { margin-top: 10px; padding: 8px 12px; background: rgba(217,178,95,.08); border: 1px solid rgba(217,178,95,.25); border-radius: 8px; font-size: 12.5px; line-height: 1.5; opacity: .92; }
.lc-paged-lbl { padding-top: 6px; white-space: nowrap; }

/* ---- Editor de Loja: pesquisa + paginação da lista ---- */
.loja-items-bar { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.loja-search { flex: 1; min-width: 0; }
.loja-search-x { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(217,178,95,.28); background: rgba(217,178,95,.06); color: #e9dcc0; cursor: pointer; font-size: 13px; line-height: 1; }
.loja-search-x:hover { background: rgba(217,178,95,.16); }
.loja-items-count { flex: 0 0 auto; font-size: 12px; opacity: .72; white-space: nowrap; letter-spacing: .02em; }
.loja-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; padding: 8px; }
.loja-pager .loja-pg-info { font-size: 13px; opacity: .85; min-width: 120px; text-align: center; }
.loja-pager .loja-pg-info b { color: #d9b25f; }
.loja-pager .btn[disabled] { opacity: .32; pointer-events: none; }

/* ---------- Map-art ----------------------------------------------------------------
   Layout PRÓPRIO, e não o .grid genérico: aquele é repeat(auto-fill, minmax(300px,1fr))
   e espremia o cartão único numa coluna de 300px com o resto do ecrã vazio.
   Duas colunas em cima (enviar | lista) e a ajuda a toda a largura por baixo.        */
.mapart-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: start;
}
.mapart-grid .ma-help { grid-column: 1 / -1; }
@media (max-width: 1050px) { .mapart-grid { grid-template-columns: 1fr; } }

.ma-fields { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; margin-bottom: 14px; }
@media (max-width: 720px) { .ma-fields { grid-template-columns: 1fr; } }
.ma-field { display: flex; flex-direction: column; gap: 6px; }
.ma-field .input { width: 100%; }
.ma-field .hint { margin: 2px 0 0; line-height: 1.5; }

.ma-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.ma-msg:empty { display: none; }
.ma-msg { margin-top: 10px; }

/* A lista tem altura mínima para o cartão não colapsar quando está vazia — sem isto,
   a coluna da direita encolhia a um risco e o layout parecia partido. */
.ma-list { min-height: 90px; display: flex; flex-direction: column; gap: 6px; }
.ma-list > div { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0,0,0,.22); }

.ma-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.ma-steps b, .ma-warn b { color: var(--text); }
.ma-warn { margin: 14px 0 0; padding: 11px 13px; border-radius: 9px; font-size: 13px; line-height: 1.6;
           color: var(--muted); background: rgba(255, 176, 46, .07); border: 1px solid rgba(255, 176, 46, .22); }
