@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

/* Visual do client antigo do Tibia 7.4 (2026-10-02): pedra cinza, janelas com barra de titulo e relevo 3D (claro em
   cima/esquerda, escuro embaixo/direita), botoes cinza chanfrados, fonte Verdana/Tahoma pequena e titulos em negrito
   com contorno preto como os nomes acima dos personagens. Tema claro = pergaminho. */
:root,
:root[data-theme="dark"] {
  --bg: #2b2b2b;
  --bg-2: #222222;
  --sidebar: #333333;
  --surface: #3c3c3c;
  --surface-2: #474747;
  --surface-3: #555555;
  --border: #1a1a1a;
  --border-strong: #141414;
  --bevel-light: #7d7d7d;
  --bevel-dark: #121212;
  --frame: #4a4a4a;
  --title-bar: #252525;
  --text: #dcdcdc;
  --text-2: #c0c0c0;
  --muted: #8f8f8f;
  --accent: #f0c850;
  --accent-strong: #ffe08a;
  --accent-ink: #1a1408;
  --torch: #ff9a3c;
  --ok: #3ccf3c;
  --warn: #f0c850;
  --bad: #ef3b3b;
  --info: #6aa8ff;
  --enemy: #ff8a3d;
  --shadow: 3px 3px 0 rgba(0, 0, 0, 0.6);
  --heat: 240, 200, 80;
  color-scheme: dark;
}

/* Tema claro = pergaminho */
:root[data-theme="light"] {
  --bg: #e6d5ae;
  --bg-2: #dcc89c;
  --sidebar: #dfcc9f;
  --surface: #f4e8cb;
  --surface-2: #ead9b2;
  --surface-3: #dcc597;
  --border: #c2a575;
  --border-strong: #8b6a3e;
  --frame: #6b5640;
  --bevel-light: #fff8e6;
  --bevel-dark: #8b6a3e;
  --title-bar: #cdb383;
  --text: #2f2114;
  --text-2: #4a3622;
  --muted: #7d6446;
  --accent: #a2621a;
  --accent-strong: #7d4810;
  --accent-ink: #fff4dc;
  --torch: #c45a12;
  --ok: #3f7d32;
  --warn: #a2621a;
  --bad: #b23a33;
  --info: #2f6aa3;
  --enemy: #c2571f;
  --shadow: 4px 4px 0 rgba(60, 40, 15, 0.25);
  --heat: 162, 98, 26;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 13px/1.45 Verdana, Tahoma, "DejaVu Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}
body.i18n-fade [data-i18n] { opacity: 0.25; transition: opacity 0.12s ease; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }

.icon { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.icon-wrap { display: inline-flex; align-items: center; }
.flag { width: 18px; height: 12px; border-radius: 0; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }

/* ---------------------------------------------------------------- estrutura */
.app { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 56px 1fr; height: 100vh; }
.topbar {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 14px;
  padding: 0 16px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .icon { width: 22px; height: 22px; color: var(--accent); }
.brand-title { color: var(--accent); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; white-space: nowrap; }
.brand-sub { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.nav-section { color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; padding: 10px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  color: var(--text-2);
  border: 1px solid transparent; border-left: 2px solid transparent;
  border-radius: 0;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); border-color: var(--border-strong); border-left-color: var(--accent); color: var(--text); }
.nav-item.active .icon { color: var(--accent); }

.main { overflow: auto; padding: 18px; min-width: 0; }
.view-title { margin: 0 0 14px; font-size: 16px; color: var(--text); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- controles */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 32px; padding: 0 12px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border-strong); border-radius: 0;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-icon { width: 34px; padding: 0; }
input[type="text"], input[type="password"], input[type="url"], select {
  min-height: 32px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 0;
  width: 100%;
}
input:focus, select:focus, .btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); }
label { display: block; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-label { color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-2); margin: 4px 0; cursor: pointer; }
.check .icon { color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { min-width: 0; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; max-width: 720px; }
.search-bar input { flex: 1; }

.lang-switch { display: flex; align-items: center; gap: 2px; padding: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; }
.lang-switch > .icon { margin: 0 6px 0 4px; color: var(--muted); }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; background: transparent; border: 0; border-radius: 0; color: var(--muted); cursor: pointer; font-size: 11px; }
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--surface-3); color: var(--accent); font-weight: 700; }
.tz { display: flex; align-items: center; gap: 6px; }
.tz select { width: auto; min-height: 30px; font-size: 11px; }
.tz-offset { color: var(--accent); font-size: 10px; font-weight: 600; }
.health { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; cursor: help; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 14px; margin-bottom: 12px; }
.card-title { margin: 0 0 10px; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.error { color: var(--bad); }
.ok { color: var(--ok); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.kv:last-of-type { border-bottom: 0; }
.kv-key { color: var(--muted); }
.kv-value { text-align: right; overflow-wrap: anywhere; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 6px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.list li:last-child { border-bottom: 0; }
.stamp-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stamp-line .icon { color: var(--accent); align-self: center; }
time { color: var(--text-2); font-variant-numeric: tabular-nums; }
.badge { display: inline-block; min-width: 46px; padding: 2px 6px; border-radius: 0; color: #111715; font-weight: 700; font-size: 11px; text-align: center; }
.pill { font-size: 10px; padding: 2px 8px; border-radius: 0; background: var(--surface-3); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.pill-on { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip { padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: 0; background: var(--surface-2); color: var(--text); }
.kinds { display: inline-flex; gap: 4px; margin-left: 6px; }
.profile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; gap: 8px; }
.profile-name { font-size: 15px; color: var(--accent); }

/* ---------------------------------------------------------------- grafo */
.graph-layout { display: grid; grid-template-columns: 260px 1fr; gap: 12px; height: calc(100vh - 56px - 36px); }
.filters { overflow-y: auto; }
.graph-wrap { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 0; min-height: 360px; overflow: hidden; }
.graph-canvas { position: absolute; inset: 0; touch-action: none; }  /* pinca vai para o grafo, nao para a pagina */
.graph-toolbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; z-index: 2; pointer-events: none; }
.graph-toolbar > * { pointer-events: auto; }
.graph-stats { background: var(--surface-2); border: 1px solid var(--border); padding: 4px 10px; border-radius: 0; font-size: 11px; color: var(--text-2); }
.graph-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.legend { display: grid; gap: 6px; }
.legend span { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.legend i { width: 22px; height: 3px; border-radius: 0; display: inline-block; }
.legend i.dotted { background: repeating-linear-gradient(90deg, var(--enemy) 0 3px, transparent 3px 7px) !important; }
.legend i.dashed { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px) !important; }
.mini-graph { position: relative; height: 320px; }
div.vis-tooltip, .vis-tip {
  background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--border-strong) !important;
  border-radius: 0 !important; font: 12px/1.4 Verdana, Tahoma, sans-serif !important; padding: 8px 10px !important;
  box-shadow: var(--shadow); white-space: normal !important; max-width: 320px;
}
.vis-tip-row { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.vis-tip-row .icon { color: var(--accent); }

/* ---------------------------------------------------------------- painel lateral */
.side-panel {
  position: fixed; top: 56px; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform 0.22s ease; z-index: 30; display: flex; flex-direction: column;
}
.side-panel.open { transform: none; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: 15px; color: var(--accent); }
.panel-body { padding: 14px; overflow-y: auto; }
.panel-body > .btn { margin-bottom: 12px; width: 100%; }
.panel-actions { display: grid; gap: 8px; margin-bottom: 12px; }
.panel-actions .btn { width: 100%; }

/* ---------------------------------------------------------------- heatmap / sessoes */
.heatmap-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 9px; }
.heatmap-hour { color: var(--muted); text-align: left; }
.heatmap-day { color: var(--muted); align-self: center; }
.heatmap-cell { aspect-ratio: 1; background: var(--surface-2); border-radius: 0; min-height: 8px; }
.sessions { display: grid; gap: 4px; max-height: 320px; overflow-y: auto; }
.session-row { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: center; font-size: 11px; }
.session-day { color: var(--muted); }
.session-track { position: relative; height: 12px; background: var(--surface-2); border-radius: 0; }
.session-bar { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 0; opacity: 0.85; }

/* ---------------------------------------------------------------- investigacao / comparador / detetive */
.inv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.suspect { border-top: 1px solid var(--border); padding: 12px 0; }
.suspect:first-of-type { border-top: 0; }
.suspect-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.suspect-name { font-weight: 700; }
.detective-text { color: var(--text); margin: 8px 0; }
.detective-text.big { font-size: 14px; line-height: 1.6; }
.evidence { display: grid; gap: 6px; }
.evidence-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; }
.evidence-item summary { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; }
.evidence-item summary::-webkit-details-marker { display: none; }
.ev-icon { color: var(--accent); }
.ev-text { flex: 1; }
.ev-weight { font-size: 11px; }
.raw { padding: 8px 10px 10px; border-top: 1px solid var(--border); font-size: 11px; display: grid; gap: 3px; }
.raw-line { color: var(--text-2); overflow-wrap: anywhere; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.verdict { display: flex; gap: 12px; align-items: flex-start; }
table.diff { width: 100%; border-collapse: collapse; }
table.diff th, table.diff td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
table.diff th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
table.diff tr.match td { background: color-mix(in srgb, var(--ok) 8%, transparent); }
.timeline-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.timeline-controls input { flex: 1; min-width: 180px; }
.timeline-graph { position: relative; height: calc(100vh - 56px - 130px); min-height: 360px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.live-feed { max-height: 360px; overflow-y: auto; }

/* ---------------------------------------------------------------- toasts / login */
.toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; }
.toast { background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 2px solid var(--accent); padding: 10px 12px; border-radius: 0; box-shadow: var(--shadow); max-width: 360px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: 0; padding: 24px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 20px; }
.login-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
details.advanced summary { color: var(--muted); cursor: pointer; font-size: 11px; margin: 8px 0; }


/* ---------------------------------------------------------------- guia "Como usar" */
.guide { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 12px; align-items: start; }
.guide-toc { position: sticky; top: 0; display: grid; gap: 2px; }
.guide-toc-item { display: flex; gap: 10px; padding: 7px 8px; color: var(--text-2); border-left: 2px solid transparent; border-radius: 0; }
.guide-toc-item:hover { background: var(--surface-2); color: var(--text); }
.guide-toc-item.active { background: var(--surface-2); border-left-color: var(--accent); color: var(--text); }
.guide-toc-n { color: var(--muted); font-size: 11px; min-width: 18px; }
.guide-page { padding: 22px 26px; max-width: 860px; }
.guide-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.guide-icon .icon { width: 30px; height: 30px; color: var(--accent); }
.guide-counter { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; }
.guide-title { margin: 2px 0 0; font-size: 18px; color: var(--accent); }
.guide-h { margin: 20px 0 8px; font-size: 13px; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; }
.guide-p { color: var(--text-2); line-height: 1.7; margin: 8px 0; }
.guide-list, .guide-steps { color: var(--text-2); line-height: 1.7; padding-left: 20px; margin: 8px 0; }
.guide-list li, .guide-steps li { margin: 4px 0; }
.guide-steps li::marker { color: var(--accent); font-weight: 700; }
.guide-tip, .guide-warn { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 12px 0; border-radius: 0; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.guide-tip { border-left: 2px solid var(--ok); }
.guide-tip .icon { color: var(--ok); margin-top: 2px; }
.guide-warn { border-left: 2px solid var(--bad); }
.guide-warn .icon { color: var(--bad); margin-top: 2px; }
.guide-ev { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.guide-ev-item { display: flex; gap: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 0; }
.guide-ev-item p { margin: 4px 0 0; font-size: 12px; }
.guide-ev-icon .icon { width: 20px; height: 20px; color: var(--accent); }
.guide-ex { padding: 12px 14px; margin: 10px 0; border: 1px solid var(--border-strong); border-left: 2px solid var(--accent); border-radius: 0; background: var(--surface-2); }
.guide-ex p { color: var(--text-2); margin: 6px 0 10px; }
.guide-ex-title { color: var(--text); }
.guide-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.btn.disabled { opacity: 0.35; pointer-events: none; }
.guide-signature { margin-top: 26px; text-align: right; font-style: italic; color: var(--muted); }
.guide-signature-by { margin-right: 6px; }
.guide-signature-name { color: var(--accent); font-size: 18px; font-weight: 700; letter-spacing: 0.06em; font-style: normal; }

/* ---------------------------------------------------------------- responsivo */
.only-mobile { display: none; }

@media (max-width: 1100px) {
  .inv-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

@media (max-width: 860px) {
  .only-mobile { display: inline-flex; }
  .hide-mobile { display: none !important; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* 2 linhas: [menu, marca, status, sino, tema, sair] / [idioma, fuso] */
  .topbar { height: auto; min-height: 52px; padding: 8px 12px; flex-wrap: wrap; gap: 8px 10px; }
  .topbar-tools { display: contents; }
  .health { order: 3; }
  #health-label { display: none; }
  #theme-toggle { order: 5; }
  #logout { order: 6; }
  .lang-switch { order: 7; }
  .tz { order: 8; flex: 1 1 0; min-width: 0; }
  .tz select { width: 100%; min-width: 0; max-width: none; }
  #tz-icon, .lang-switch > .icon-wrap:first-child { display: none; }
  .lang-switch { flex: none; }
  .brand-title { font-size: 13px; }
  .brand .icon { width: 18px; height: 18px; }
  .topbar .btn-icon { width: 32px; min-height: 32px; }
  .inv-grid .inv-col:nth-child(2) { order: -1; }  /* suspeitos e grafo antes do historico longo */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 40;
    transform: translateX(-100%); transition: transform 0.22s ease; box-shadow: var(--shadow);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 35; }
  .main { padding: 12px; }
  .graph-layout { grid-template-columns: 1fr; height: auto; }
  .filters { display: none; }
  .filters.open { display: block; }
  .graph-wrap { height: 62vh; min-height: 320px; }
  .mini-graph { height: 260px; }
  .cmp-grid { grid-template-columns: 1fr; }
  .side-panel { top: 0; width: 100%; }
  .timeline-graph { height: 60vh; }
  .session-row { grid-template-columns: 76px 1fr; }
  .search-bar { flex-direction: column; }
  .guide { grid-template-columns: 1fr; }
  .guide-toc { position: static; }
  .guide-page { padding: 16px; }
  .graph-toolbar .btn-label { display: none; }
  .graph-toolbar .btn { width: 34px; padding: 0; }
  .graph-stats { font-size: 10px; }
}

@media (max-width: 340px) {
  .topbar .brand-title { display: none; }  /* telas muito estreitas: so o icone da marca */
}

@media (max-width: 420px) {
  .lang-btn span { display: none; }
  .tz select { max-width: 150px; }
  .heatmap-grid { grid-template-columns: 26px repeat(24, minmax(0, 1fr)); gap: 1px; }
}
.name-link { color: var(--accent, inherit); text-decoration: none; border-bottom: 1px dotted currentColor; }
.name-link:hover { border-bottom-style: solid; }
.card:has(> .list-table) { overflow-x: auto; }
.list-table td { white-space: nowrap; }
.online-count { font-size: 12px; color: var(--accent); white-space: nowrap; text-decoration: none; }


/* ================================================================ pele do client Tibia 7.4 */
body {
  background-color: var(--bg);
  /* pedra granulada do fundo do client */
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, 0.25) 1px, transparent 1px);
  background-size: 6px 6px, 9px 9px;
  background-position: 0 0, 3px 4px;
}
/* texto com contorno preto, como nomes e mensagens dentro do jogo */
.outlined, .brand-title, .view-title, .profile-name, .hero-title, .panel-head h2, .guide-title {
  font-family: Verdana, Tahoma, sans-serif; font-weight: 700; letter-spacing: 0;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 2px 2px 0 rgba(0, 0, 0, 0.6);
}
.brand-title { font-size: 15px; color: var(--accent); }
.brand-sub { letter-spacing: 0.04em; }
.view-title { font-size: 16px; color: var(--accent); }
.profile-name { font-size: 15px; }
.nav-section, .field-label { font-family: Verdana, Tahoma, sans-serif; font-weight: 700; font-size: 10px; letter-spacing: 0.08em; }
.logo-px { width: 30px; height: 30px; image-rendering: pixelated; flex: none; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.6)); }

/* relevo 3D do client */
.bevel, .card, .graph-wrap, .login-card, .toast, .side-panel, .lang-switch, .graph-stats, .nav-item.active, .evidence-item {
  border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
}
.topbar {
  background: var(--sidebar);
  border-bottom: 2px solid var(--bevel-dark);
  box-shadow: inset 0 -2px 0 var(--bevel-light), 0 2px 0 #000;
}
.sidebar { border-right: 2px solid var(--bevel-dark); box-shadow: inset -2px 0 0 var(--bevel-light); }

/* janela do client: barra de titulo escura com texto claro centralizado */
.card { background: var(--surface); padding: 0 12px 12px; box-shadow: var(--shadow); }
.card-title {
  margin: 0 -12px 10px; padding: 4px 10px; text-align: center;
  background: var(--title-bar); color: var(--text-2);
  font: 700 11px/1.4 Verdana, Tahoma, sans-serif; letter-spacing: 0.04em; text-transform: none;
  border-bottom: 2px solid var(--bevel-dark); text-shadow: 1px 1px 0 #000;
}
.card > :first-child:not(.card-title) { margin-top: 12px; }

.nav-item { border: 2px solid transparent; font-size: 13px; }
.nav-item:hover { background: var(--surface); }
.nav-item.active { background: var(--surface-2); color: var(--accent); box-shadow: none; }

/* botao chanfrado do client */
.btn {
  min-height: 34px; padding: 0 14px;
  background: var(--surface-2); color: var(--text);
  border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  box-shadow: 1px 1px 0 #000;
  font: 700 12px/1 Verdana, Tahoma, sans-serif; text-shadow: 1px 1px 0 #000;
}
.btn:hover { background: var(--surface-3); color: #fff; }
.btn:active { border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark); transform: translate(1px, 1px); box-shadow: none; }
.btn-primary { background: #5d4a1c; color: var(--accent-strong); }
.btn-primary:hover { background: #75602a; color: #fff3c4; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
:root[data-theme="light"] .btn { text-shadow: none; }
:root[data-theme="light"] .btn-primary { background: var(--accent); color: var(--accent-ink); }

/* campo de texto afundado */
input[type="text"], input[type="password"], input[type="url"], select {
  min-height: 34px; background: var(--bg-2); color: var(--text);
  border: 2px solid; border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
  font: 13px Verdana, Tahoma, sans-serif;
}
input:focus, select:focus, .btn:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }

/* barra de busca: campo e botoes com a mesma altura */
.search-bar { align-items: stretch; flex-wrap: wrap; }
.search-bar input, .search-bar .btn, .search-bar select { height: 36px; min-height: 36px; }
.search-bar .btn { padding: 0 14px; }

.badge { border: 1px solid #000; color: #111; font: 700 11px/1.3 Verdana, Tahoma, sans-serif; padding: 2px 6px; }
.pill { border: 1px solid var(--bevel-dark); }
.dot { border-radius: 0; width: 9px; height: 9px; border: 1px solid #000; }
.dot.ok { box-shadow: 0 0 6px var(--ok); }
.heatmap-cell { border-radius: 0; }
.session-bar { background: linear-gradient(var(--accent-strong), var(--torch)); }
.name-link { border-bottom: 1px dotted currentColor; }
.online-count { font: 700 12px Verdana, Tahoma, sans-serif; color: var(--ok); text-shadow: 1px 1px 0 #000; }
table.diff th { font: 700 10px Verdana, Tahoma, sans-serif; letter-spacing: 0.06em; }
::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border: 2px solid; border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light); }

/* ================================================================ Investigation: pagina inicial (estilo Google) */
.inv-hero { display: none; }
#view-investigation.home .inv-hero {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: calc(100vh - 56px); margin: -18px; padding: 32px 16px;
  /* detetive a esquerda, sumindo na pedra da masmorra; a busca fica no centro */
  background:
    linear-gradient(90deg, rgba(43, 43, 43, 0.3) 0%, rgba(43, 43, 43, 0.75) 35%, var(--bg) 62%),
    url("../assets/hero.jpg") left center / auto 100% no-repeat,
    var(--bg);
  image-rendering: pixelated;
}
:root[data-theme="light"] #view-investigation.home .inv-hero {
  background:
    linear-gradient(90deg, rgba(230, 213, 174, 0.55) 0%, rgba(230, 213, 174, 0.85) 35%, var(--bg) 62%),
    url("../assets/hero.jpg") left center / auto 100% no-repeat,
    var(--bg);
}
#view-investigation.home > #inv-form, #view-investigation.home > #inv-result { display: none; }
.hero-inner { width: min(680px, 100%); display: grid; gap: 18px; justify-items: center; }
.hero-logo { width: 96px; height: 96px; image-rendering: pixelated; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.7));
  animation: hero-bob 3s steps(4) infinite; }
.hero-title {
  margin: 0; font-family: "Press Start 2P", monospace; font-size: clamp(20px, 5vw, 40px); line-height: 1.25;
  color: #f7dfae; text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 4px 4px 0 #3a2410;
}
:root[data-theme="light"] .hero-title { color: var(--accent-strong); text-shadow: 3px 3px 0 #f4e8cb; }
.hero-sub { margin: 0; font-family: "Press Start 2P", monospace; font-size: clamp(9px, 2vw, 14px); color: #d9d9d9;
  text-shadow: 2px 2px 0 #000; letter-spacing: 0.04em; }
:root[data-theme="light"] .hero-sub { color: var(--text-2); text-shadow: none; }
.hero-form { display: flex; width: 100%; margin-top: 10px; box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6); }
.hero-form input[type="text"] {
  flex: 1; min-height: 58px; padding: 0 18px; font-size: 20px;
  height: 58px; background: #f4e8cb; color: #2f2114; border: 3px solid #000; border-right: 0;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.18); font: 18px Verdana, Tahoma, sans-serif;
}
.hero-form input::placeholder { color: #8a7352; }
.hero-form .btn { height: 58px; min-height: 58px; padding: 0 22px; font-size: 14px; }
.hero-hint { color: #cdbb98; font-size: 14px; text-shadow: 1px 1px 0 #000; }
:root[data-theme="light"] .hero-hint { color: var(--muted); text-shadow: none; }
.hero-hint a { color: var(--accent-strong); }
.torch-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 38%, rgba(255, 154, 60, 0.16), transparent 55%);
  animation: torch 2.4s steps(6) infinite; }
@keyframes torch { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .hero-logo, .torch-glow { animation: none; } }
@media (max-width: 860px) {
  #view-investigation.home .inv-hero { margin: -12px; min-height: calc(100vh - 100px);
    background: linear-gradient(rgba(19, 21, 28, 0.78), rgba(19, 21, 28, 0.92)), url("../assets/hero.jpg") center / cover; }
  .hero-form { flex-direction: column; box-shadow: none; gap: 8px; }
  .hero-form input[type="text"] { border-right: 4px solid #000; min-height: 52px; font-size: 18px; }
  .hero-form .btn { min-height: 50px; }
  .hero-logo { width: 72px; height: 72px; }
}
