/* Destruitor Idle — painel do administrador (as cores do jogo: fundo escuro e dourado) */
:root {
  --bg: #0b0a0e; --bg2: #121018; --panel: #16141d; --panel2: #1c1a24; --line: #2c2834; --line2: #3a3444;
  --txt: #ece4d2; --dim: #9a8f7c; --dim2: #6f6658; --gold: #d8a64a; --gold2: #f0c46a; --ok: #6fcf8a; --bad: #ff8a7a;
  --warn: #f2b24c; --blue: #7fb2ff; --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--txt); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold2); }
.muted { color: var(--dim); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }

/* botoes e campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--gold); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1d1606; }
.btn.primary:hover { background: var(--gold2); }
.btn.danger { border-color: #6b2e2a; color: var(--bad); background: #24120f; }
.btn.danger:hover { border-color: var(--bad); }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
input, select, textarea { width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line2); background: #0e0c12; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(216, 166, 74, .18); }
label { display: block; font-size: 12.5px; color: var(--dim); margin-bottom: 10px; }
label > input, label > select, label > textarea { margin-top: 5px; color: var(--txt); }
.chk { display: flex; align-items: center; gap: 8px; color: var(--txt); }
.chk input { width: auto; }
.err { min-height: 18px; color: var(--bad); font-size: 13px; margin-top: 8px; }

/* entrar */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1000px 500px at 50% -10%, rgba(216, 120, 40, .18), transparent 60%), var(--bg); }
.login-box { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 26px 22px; box-shadow: 0 20px 60px #000a; }
.login-logo { display: block; width: 190px; margin: 0 auto 6px; }
.login-box h1 { font-size: 18px; margin: 0 0 2px; color: var(--gold2); text-align: center; }
.login-box p { text-align: center; margin: 0 0 18px; font-size: 13px; }
.login-box .btn { width: 100%; margin-top: 4px; padding: 11px; }
.ou { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--dim2); font-size: 12px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.google { background: #0e0c12; }
.btn.google b { color: #fff; background: #4285f4; border-radius: 4px; width: 20px; height: 20px; display: inline-grid; place-items: center; font-size: 12px; }

/* casca: menu lateral + conteudo */
.app { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg2); border-right: 1px solid var(--line); padding: 14px 10px; }
.brand { display: flex; align-items: center; gap: 8px; padding: 4px 8px 16px; font-weight: 700; color: var(--gold2); letter-spacing: .04em; }
.brand img { width: 92px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; color: var(--dim); font-weight: 600; }
#nav button i { width: 18px; text-align: center; font-style: normal; color: var(--dim2); }
#nav button:hover { background: var(--panel); color: var(--txt); }
#nav button.on { background: rgba(216, 166, 74, .14); color: var(--gold2); }
#nav button.on i { color: var(--gold); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--line); word-break: break-all; }
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px;
  background: rgba(11, 10, 14, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top h2 { margin: 0; font-size: 18px; }
.top-acts { display: flex; gap: 8px; }
.view { padding: 20px 24px 40px; max-width: 1280px; }

/* cartoes de numeros */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.card .k { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.card .v { font-size: 26px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.card .s { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.card.gold .v { color: var(--gold2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; min-width: 0; }
.box h3 { margin: 0 0 10px; font-size: 14px; color: var(--gold2); display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* grafico de barras (SVG) */
.chart svg { width: 100%; height: 150px; display: block; }
.chart .bar { fill: var(--gold); opacity: .85; }
.chart .bar:hover { opacity: 1; }
.chart .bar.b2 { fill: var(--blue); }
.chart .axis { stroke: var(--line2); }
.chart text { fill: var(--dim); font-size: 10px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--dim); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; background: var(--gold); }
.legend i.b2 { background: var(--blue); }

/* barras horizontais (vocacoes) */
.hbars { display: flex; flex-direction: column; gap: 8px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; }
.hbar .track { height: 9px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--gold); border-radius: 99px; }

/* filtros e tabelas */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 260px; max-width: 420px; }
.toolbar select { width: auto; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel); cursor: pointer; font-size: 12.5px; color: var(--dim); }
.pill.on { border-color: var(--gold); color: var(--gold2); background: rgba(216, 166, 74, .12); }
.tbl-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); font-weight: 600; background: var(--bg2); position: sticky; top: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--panel2); }
tbody tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; min-width: 180px; }
.empty { padding: 28px; text-align: center; color: var(--dim); }
.pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* etiquetas */
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--line2); color: var(--dim); }
.tag.prem { color: var(--gold2); border-color: rgba(216, 166, 74, .5); background: rgba(216, 166, 74, .1); }
.tag.ban { color: var(--bad); border-color: #6b2e2a; background: #24120f; }
.tag.on { color: var(--ok); border-color: #2c5a3a; background: #10241a; }
.tag.adm { color: var(--blue); border-color: #2c4062; }
.tag.pend { color: var(--warn); border-color: #6a4d1c; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--dim2); margin-right: 6px; }
.dot.on { background: var(--ok); box-shadow: 0 0 6px var(--ok); }

/* gaveta (detalhe) */
.drawer-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); z-index: 21; background: var(--bg2); border-left: 1px solid var(--line);
  overflow-y: auto; box-shadow: -20px 0 60px #000a; animation: entra .18s ease-out; }
@keyframes entra { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.dr-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.dr-head h3 { margin: 0; font-size: 17px; word-break: break-all; }
.dr-head .sub { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dr-head .x { margin-left: auto; }
.dr-body { padding: 16px 18px 30px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kv div { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.kv b { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kv span { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sec { margin: 18px 0 8px; font-size: 13px; color: var(--gold2); font-weight: 700; }
.list { display: flex; flex-direction: column; gap: 6px; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.li.click { cursor: pointer; } .li.click:hover { border-color: var(--gold); }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; }
.li .d { font-size: 12.5px; color: var(--dim); }
.li img { width: 32px; height: 32px; image-rendering: pixelated; }
.alerta { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; border: 1px solid #6b2e2a; background: #24120f; color: #ffc4bb; }

/* janela de acao */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 30; }
.modal { position: fixed; z-index: 31; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  overflow-y: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 20px; box-shadow: 0 30px 80px #000c; }
.modal h3 { margin: 0 0 4px; color: var(--gold2); font-size: 16px; }
.modal p.desc { margin: 0 0 14px; color: var(--dim); font-size: 13px; }
.modal .row { display: flex; gap: 10px; } .modal .row > * { flex: 1; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.chips button { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; font-size: 12px; }
.chips button:hover { border-color: var(--gold); }
.sug { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin: -4px 0 10px; }
.sug button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg2); cursor: pointer; text-align: left; }
.sug button:last-child { border-bottom: 0; }
.sug button:hover, .sug button.on { background: rgba(216, 166, 74, .12); }
.sug img { width: 32px; height: 32px; image-rendering: pixelated; }
.prev { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.prev img { width: 32px; height: 32px; image-rendering: pixelated; }
img.sem { visibility: hidden; }

/* avisos */
.toasts { position: fixed; z-index: 40; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: 0 10px 30px #000a; font-size: 13.5px; animation: entra .18s ease-out; }
.toast.ok { border-color: #2c5a3a; } .toast.ok::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.toast.erro { border-color: #6b2e2a; } .toast.erro::before { content: "! "; color: var(--bad); font-weight: 700; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line2); border-top-color: var(--gold); border-radius: 50%; animation: gira .7s linear infinite; vertical-align: -3px; }
@keyframes gira { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--dim); }

/* celular: o menu vira uma faixa no alto */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .brand { padding: 0 6px 0 0; } .brand img { width: 60px; } .brand span { display: none; }
  #nav { flex-direction: row; } #nav button { padding: 7px 9px; white-space: nowrap; font-size: 13px; } #nav button i { display: none; }
  .side-foot { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; align-items: center; } .side-foot span { display: none; }
  .top { position: static; padding: 12px 16px; }
  .view { padding: 14px 16px 30px; }
  .grid2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card .v { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .drawer, .toast { animation: none; } .spin { animation-duration: 2s; } }
