@font-face { font-family: "SG"; src: url(fonts/f-space-grotesk-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "SG"; src: url(fonts/f-space-grotesk-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PJ"; src: url(fonts/f-plus-jakarta-sans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PJ"; src: url(fonts/f-plus-jakarta-sans-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "OB"; src: url(fonts/f-orbitron-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #070a12; --panel: rgba(14, 20, 36, .66); --line: rgba(120, 160, 255, .13); --line2: rgba(120, 160, 255, .22);
  --text: #e8eefc; --muted: #8d9ab6; --cyan: #22d3ee; --violet: #a855f7; --pink: #ec4899; --green: #34d399; --amber: #fbbf24; --red: #f87171;
  --grad: linear-gradient(92deg, var(--cyan), #818cf8 45%, var(--violet) 75%, var(--pink));
  --r: 16px; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 500 15px/1.5 "PJ", system-ui, sans-serif; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background:
  radial-gradient(900px 600px at 90% -10%, rgba(168, 85, 247, .2), transparent 60%),
  radial-gradient(800px 600px at -10% 40%, rgba(34, 211, 238, .12), transparent 60%), var(--bg); }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
button, input { font: inherit; color: inherit; }
h3 { font: 700 15px "SG"; margin: 0 0 12px; letter-spacing: .01em; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }

.brand { display: flex; align-items: center; gap: 9px; font: 700 17px "OB"; letter-spacing: .02em; }
.brand b { color: var(--cyan); }
.brand em { font: 700 11px "SG"; font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-left: 4px; padding: 3px 7px; border: 1px solid var(--line2); border-radius: 7px; }
.brand.big { justify-content: center; font-size: 26px; gap: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px -30px rgba(0, 0, 0, .9); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-h h3 { margin: 0; }

/* entrar */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.login-card { width: min(380px, 100%); padding: 30px 26px 22px; position: relative; overflow: hidden; animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad); background-size: 200% 100%; animation: shine 4s linear infinite; }
.login-card > p.muted { margin: 4px 0 22px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.step { display: grid; gap: 12px; animation: fade .4s both; }
.field { display: grid; gap: 6px; }
.field span { font: 700 12px "SG"; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input { width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(5, 8, 16, .6); outline: none; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.field input.code { font: 700 26px/1 "SG"; letter-spacing: .5em; text-align: center; padding: 13px 0 13px .5em; }
.hint { margin: 0; color: #c3cde3; font-size: 14px; text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .05); border-radius: 11px; padding: 9px 14px; cursor: pointer; font: 700 14px "SG"; transition: transform .15s, background .2s, border-color .2s, opacity .2s; }
.btn:hover { background: rgba(255, 255, 255, .09); }
.btn:active { transform: scale(.97); }
.btn.primary { width: 100%; margin-top: 18px; padding: 12px; border: 0; color: #061018; background: linear-gradient(92deg, var(--cyan), #818cf8); box-shadow: 0 10px 30px -10px rgba(34, 211, 238, .6); }
.btn.primary[disabled] { opacity: .6; cursor: wait; }
.msg { min-height: 20px; margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--red); }

/* topo */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, calc((100vw - 1240px) / 2)); background: rgba(7, 10, 18, .72);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--grad); opacity: .35; }
.tabs { position: relative; display: flex; gap: 2px; margin: 0 auto; padding: 4px; border-radius: 13px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 7px 13px; border-radius: 9px; color: var(--muted); font: 500 14px "SG"; cursor: pointer; white-space: nowrap; transition: color .25s; }
.tabs button.on, .tabs button:hover { color: var(--text); }
.tabs button i { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font: 700 11px "SG"; font-style: normal; }
.pill { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 9px; background: linear-gradient(135deg, rgba(34, 211, 238, .18), rgba(168, 85, 247, .18));
  border: 1px solid rgba(34, 211, 238, .3); transition: transform .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1); }
.top-act { display: flex; gap: 6px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .04); cursor: pointer; transition: background .2s, transform .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .09); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spin svg { animation: spin .8s linear infinite; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 16px 60px; }
.tab-panel { display: none; }
.tab-panel.on { display: block; animation: fade .45s cubic-bezier(.2, .8, .2, 1) both; }

/* números grandes */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; overflow: hidden; padding: 16px 16px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.kpi::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--c, var(--cyan)); opacity: .7; box-shadow: 0 0 14px var(--c, var(--cyan)); }
.kpi b { display: block; font: 700 30px/1.1 "SG"; letter-spacing: -.02em; }
.kpi span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.kpi small { color: var(--muted); font-size: 12px; }

.grid2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.grid2 .card + .card { margin-top: 0; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.grid3 .card + .card { margin-top: 0; }

/* gráfico de barras */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 170px; padding-top: 10px; }
.chart .bar { flex: 1; min-width: 4px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--cyan), rgba(129, 140, 248, .5)); position: relative; transform-origin: bottom;
  animation: grow .8s cubic-bezier(.2, .8, .2, 1) both; }
.chart .bar:hover { background: linear-gradient(180deg, #67e8f9, var(--violet)); }
.chart .bar[data-n="0"] { background: rgba(255, 255, 255, .06); }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.empty { padding: 30px 10px; text-align: center; color: var(--muted); font-size: 14px; }

/* listas com barras (app) */
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.rank li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; overflow: hidden; }
.rank li::before { content: ""; position: absolute; inset: 0; width: var(--w, 0); background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(168, 85, 247, .08)); border-radius: 8px; z-index: -1;
  transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.rank li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank li b { font: 700 13px "SG"; color: var(--cyan); }

/* tabelas */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 700 11.5px "SG"; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 8px; border-bottom: 1px solid rgba(120, 160, 255, .06); vertical-align: middle; white-space: nowrap; }
.tbl tr { animation: fade .4s both; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.tbl td.num { font: 700 14px "SG"; }
.tbl tr.hid td { opacity: .45; }
.name-in { width: 100%; min-width: 140px; max-width: 240px; padding: 6px 9px; border-radius: 8px; border: 1px solid transparent; background: transparent; transition: border-color .2s, background .2s; }
.name-in:hover { border-color: var(--line); }
.name-in:focus { outline: none; border-color: var(--cyan); background: rgba(5, 8, 16, .6); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 700 11px "SG"; letter-spacing: .04em; border: 1px solid var(--line2); color: var(--muted); }
.tag.kofi { color: #67e8f9; border-color: rgba(34, 211, 238, .35); }
.tag.paypal { color: #93c5fd; border-color: rgba(96, 165, 250, .35); }
.tag.pre { color: var(--amber); border-color: rgba(251, 191, 36, .35); }
.tag.lock { color: var(--pink); border-color: rgba(236, 72, 153, .35); }
.acts { display: flex; gap: 4px; justify-content: flex-end; }
.mini { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--muted); transition: background .2s, color .2s; }
.mini:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.mini.danger:hover { color: var(--red); background: rgba(248, 113, 113, .1); }
.mini svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* opiniões */
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); font: 500 13.5px "SG"; }
.seg button.on { background: rgba(255, 255, 255, .09); color: var(--text); }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.rv { display: flex; flex-direction: column; gap: 10px; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.rv-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stars { color: var(--amber); letter-spacing: 2px; font-size: 15px; }
.stars i { color: rgba(255, 255, 255, .15); font-style: normal; }
.rv p { margin: 0; color: #d3dbee; }
.rv .meta { font-size: 12px; color: var(--muted); }
.rv .acts { justify-content: flex-start; flex-wrap: wrap; margin-top: auto; }
.rv .btn { padding: 6px 11px; font-size: 13px; }
.btn.ok { color: var(--green); border-color: rgba(52, 211, 153, .35); }
.btn.del { color: var(--red); border-color: rgba(248, 113, 113, .3); }
.rv textarea, .rv input { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line2); background: rgba(5, 8, 16, .6); resize: vertical; font: inherit; color: inherit; }
.rv select { padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line2); background: #0b1120; color: inherit; }
.status { font: 700 11px "SG"; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; }
.status.ok { color: var(--green); background: rgba(52, 211, 153, .1); }
.status.pending { color: var(--amber); background: rgba(251, 191, 36, .1); }

/* registo */
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.log li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding: 8px 6px; border-radius: 9px; font-size: 13.5px; animation: fade .4s both; }
.log li:hover { background: rgba(255, 255, 255, .025); }
.log li time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.log li .ico { text-align: center; }
.log:not(.full) li:nth-child(n+9) { display: none; }

/* aviso em baixo */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 12px; background: rgba(14, 20, 36, .95);
  border: 1px solid var(--line2); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); font-size: 14px; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .3s; z-index: 50; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.toast.err { border-color: rgba(248, 113, 113, .4); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes shine { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .top-act { margin-left: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi b { font-size: 24px; }
  .reviews { grid-template-columns: 1fr; }
  .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand em { display: none; }
  .wrap { padding-top: 16px; }
  .card { padding: 14px; }
  .table-wrap { overflow: visible; margin: 0; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody { display: block; }
  .tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl td { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; border: 0; white-space: normal; min-width: 0; }
  .tbl td[data-l]::before { content: attr(data-l); font: 700 10.5px "SG"; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .tbl td[data-l="#"] { display: none; }
  .tbl td:has(.name-in) { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .tbl td:has(.name-in)::before { width: 100%; }
  .name-in { max-width: none; flex: 1; border-color: var(--line); font-size: 16px; }
  .tbl td:has(.acts) { grid-column: 1 / -1; }
  .acts { justify-content: flex-start; }
  .tbl td.empty { grid-column: 1 / -1; }
  .tbl td > .tag, .tbl td > b { align-self: flex-start; }
}
