:root {
  --bg: #080808; --panel: #121212; --panel-2: #181818; --line: #ffffff1c; --line-2: #ffffff2e;
  --paper: #f5f2eb; --muted: #aaa9a6; --faint: #75736f; --orange: #f59a61; --orange-2: #ffb481;
  --silver: #d4d1cb; --good: #5ed6b4; --bad: #ff7a72; --warn: #f2c14e;
  --display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  --font: 'Manrope', Arial, sans-serif; --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--paper); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; line-height: .95; }
h2 { font-size: clamp(38px, 5vw, 56px); }
h3 { font-size: 15px; font-weight: 700; }
.accent { color: var(--orange); }
.muted { color: var(--muted); }
.eyebrow { display: block; font: 10px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
[hidden] { display: none !important; }

/* login */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at 50% 120%, #f59a6114, transparent 60%); }
.gate-card { max-width: 420px; text-align: center; display: grid; gap: 18px; justify-items: center; }
.gate-card h1 { font-size: 64px; }
.gate-card p { color: var(--muted); }

/* botões */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  font: 700 13px var(--font); padding: 12px 18px; text-decoration: none; transition: background .15s, transform .15s; color: var(--paper); }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: default; transform: none; }
.primary { background: var(--orange); color: #1a1a1a; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px)); }
.primary:hover { background: var(--orange-2); }
.ghost { background: transparent; border: 1px solid var(--line-2); }
.ghost:hover { background: #ffffff0d; }
.danger { background: #3a1816; color: var(--bad); border: 1px solid #ff7a7240; }
.small { padding: 7px 12px; font-size: 12px; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.link:hover { color: var(--orange); }

/* topo */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; padding: 14px clamp(16px, 4vw, 48px);
  background: #080808ee; backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand b { display: block; font: 800 20px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; margin: 0 auto; overflow-x: auto; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--paper); }
.tabs a[aria-current] { color: var(--paper); border-color: var(--orange); }
.me { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.me img { border-radius: 50%; }
.me form { margin: 0; }

main { max-width: 1280px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 80px; }
.section-head { display: flex; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head > div, .section-head > span { flex-basis: 100%; }
.section-head h2 { margin-right: auto; }
.banner { margin: 0 auto; max-width: 1280px; padding: 12px clamp(16px, 4vw, 48px); background: #2a2110; color: var(--warn); font-size: 13px; border-bottom: 1px solid #f2c14e33; }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line); padding: 20px; margin-bottom: 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid .card { margin: 0; }

/* blocos de número */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); padding: 16px 18px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font: 800 40px/1.05 var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile .sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.on { background: var(--good); box-shadow: 0 0 0 4px #5ed6b422; }
.dot.off { background: var(--bad); }

/* gráfico */
.chart { position: relative; min-height: 220px; }
.chart svg { display: block; width: 100%; height: 240px; overflow: visible; }
.chart .grid-line { stroke: #ffffff12; stroke-width: 1; }
.chart .axis-label { fill: var(--faint); font: 11px var(--font); }
.chart .line { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: #f59a6114; }
.chart .cross { stroke: #ffffff40; stroke-width: 1; }
.chart .marker { fill: var(--orange); stroke: var(--panel); stroke-width: 2; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
details.table-view { margin-top: 12px; }
details.table-view summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: #1e1e1e; border: 1px solid var(--line-2); padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px #0008; }
.tooltip b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }

/* tabelas e listas */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.list a.title:hover { color: var(--orange); }
.list .meta { font-size: 12px; color: var(--faint); }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 3px 9px; border: 1px solid var(--line-2); font-size: 12px; background: var(--panel-2); }
.chip b { font-variant-numeric: tabular-nums; }
.votes { font: 800 20px var(--display); color: var(--orange); min-width: 34px; text-align: right; }
.pill { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #ffffff10; color: var(--muted); white-space: nowrap; }
.pill.good { background: #5ed6b41c; color: var(--good); }
.pill.bad { background: #ff7a721c; color: var(--bad); }

/* raid */
.raid { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.raid .state { font: 800 30px var(--display); text-transform: uppercase; }
.raid.active { border-color: #ff7a7266; background: #1d1010; }
.raid.active .state { color: var(--bad); }

/* formulários */
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
input, select, textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--paper); font: 14px var(--font); padding: 10px 12px; }
textarea { min-height: 150px; resize: vertical; }
textarea.short { min-height: 90px; }
.game-title { font: 800 26px var(--display); text-transform: uppercase; margin: 8px 0 12px; }
.card .eyebrow { margin-top: 14px; margin-bottom: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); outline: none; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
fieldset { border: 1px solid var(--line); padding: 14px; margin: 0; display: grid; gap: 10px; }
legend { padding: 0 6px; font-weight: 700; font-size: 13px; }
.hint { font-size: 12px; color: var(--faint); }
.switch { display: flex; align-items: center; gap: 10px; color: var(--paper); font-size: 14px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--orange); }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-results { border: 1px solid var(--line); border-top: 0; }
.search-results button { display: flex; width: 100%; gap: 10px; align-items: center; background: var(--panel-2); border: 0; border-bottom: 1px solid var(--line); color: var(--paper); padding: 8px 10px; cursor: pointer; text-align: left; font: inherit; }
.search-results button:hover { background: #ffffff0d; }

/* prévia do anúncio, no estilo de embed do Discord */
.embed-preview { background: #2b2d31; border-left: 4px solid var(--orange); border-radius: 4px; padding: 12px 16px; color: #dbdee1; font: 14px/1.45 'gg sans', var(--font); max-width: 520px; }
.embed-preview .ping { color: #c9cdfb; background: #5865f230; padding: 0 3px; border-radius: 3px; font-weight: 500; }
.embed-preview .e-title { font-weight: 700; color: #fff; margin-bottom: 6px; }
.embed-preview .e-body { white-space: normal; word-wrap: break-word; }
.embed-preview .e-body a { color: #00a8fc; }
.embed-preview img { max-width: 100%; border-radius: 4px; margin-top: 10px; display: block; }
.embed-preview .e-footer { margin-top: 10px; font-size: 12px; color: #b5bac1; }

/* filtros e linha do tempo */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button { background: none; border: 1px solid var(--line-2); color: var(--muted); padding: 5px 11px; font: 12px var(--font); cursor: pointer; }
.filters button[aria-pressed="true"] { color: var(--bg); background: var(--orange); border-color: var(--orange); }
.timeline .meta { font-family: var(--mono); font-size: 11px; }
.timeline .details { font-size: 12px; color: var(--muted); word-break: break-word; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--paper); color: var(--bg);
  padding: 10px 16px; font-weight: 700; font-size: 13px; transition: opacity .2s, transform .2s; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--bad); }

@media (max-width: 820px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .me span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
