/* Tibia Bot — painel. Base clara de pedra; cor só com significado:
   vermelho = inimigo, verde = amigo, ouro = level/boss, azul = ação. */
@font-face { font-family: "Barlow"; src: url(fonts/Barlow-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/Barlow-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/Barlow-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(fonts/BarlowSemiCondensed-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --stone: #e7ebe9;
  --surface: #ffffff;
  --ink: #1c2629;
  --muted: #56656a;
  --line: #c6d0cd;
  --line-soft: #dfe5e3;
  --enemy: #b02a21;
  --enemy-soft: #f7e2df;
  --ally: #2a7744;
  --ally-soft: #def0e4;
  --gold: #8f6208;
  --gold-soft: #f6ecd3;
  --mana: #2445a3;
  --mana-dark: #1b367f;
  --console: #232b27;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cond: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 15px/1.5 var(--body); font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-family: var(--cond); font-weight: 600; line-height: 1.2; margin: 0 0 .6rem; letter-spacing: .005em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
a { color: var(--mana); text-underline-offset: 2px; }
a:hover { color: var(--mana-dark); }
code { font-family: var(--mono); font-size: .86em; background: #eef2f0; border: 1px solid var(--line-soft); border-radius: 3px; padding: 0 .3em; }
small, .small { font-size: .8125rem; }
.muted { color: var(--muted); }
.t-err { color: var(--enemy); }
.t-ok, .t-ally { color: var(--ally); }
.t-enemy { color: var(--enemy); }
.nowrap { white-space: nowrap; }
.num { text-align: right; }
.inline { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--mana); outline-offset: 2px; }

/* topo */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top__in { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 28px; min-height: 58px; flex-wrap: wrap; }
.brand { font-family: var(--cond); font-weight: 600; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 17px 10px 15px; border-bottom: 2px solid transparent; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.top__side { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.robot { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: .9rem; }
.robot--err { color: var(--enemy); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--mana); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.main { max-width: 1240px; margin: 0 auto; padding: 26px 20px 40px; }
.foot { max-width: 1240px; margin: 0 auto; padding: 0 20px 28px; color: var(--muted); font-size: .8rem; }

/* status */
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #9aa6a2; flex: none; }
.dot--ok { background: var(--ally); }
.dot--err { background: var(--enemy); }
.dot--wait { background: var(--gold); }
.strip { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 20px; }
.strip__item { padding: 10px 16px; border-right: 1px solid var(--line-soft); }
.strip__item:last-child { border-right: 0; }
.flash { padding: 10px 14px; border-radius: 3px; border: 1px solid; margin: 0 0 14px; }
.flash--ok { background: var(--ally-soft); border-color: #a9d3b6; }
.flash--err { background: var(--enemy-soft); border-color: #e3aaa4; }
.flash--warn { background: var(--gold-soft); border-color: #e2c98e; }

/* painel inicial */
.dash { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.bl { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px 10px; margin-bottom: 16px; }
.bl__head { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; font-family: var(--cond); font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.bl__head a { color: var(--ink); text-decoration: none; }
.bl__head a:hover { text-decoration: underline; }
.bl__head .muted { font-family: var(--body); font-weight: 400; font-size: .9rem; }
.bl__err { color: var(--enemy); font-size: .85rem; margin: -2px 0 8px; }
.bl__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.bl__title { font-family: var(--body); font-size: .85rem; font-weight: 500; color: var(--muted); margin: 0 0 4px; }
.bl__title b { font-family: var(--cond); font-size: 1.05rem; margin-left: 2px; }
.bl__title--enemy b { color: var(--enemy); }
.bl__title--ally b { color: var(--ally); }
.bl__list { list-style: none; margin: 0; padding: 0; }
.bl__list li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
.bl__list .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl__list .gd { grid-column: 2 / -1; font-size: .78rem; color: var(--muted); margin-top: -2px; }
.bl__more, .bl__none { color: var(--muted); font-size: .85rem; }
.bl__list .bl__more { display: block; border: 0; }
.bl__foot { font-size: .78rem; margin: 8px 0 0; }
.mk { display: inline-block; width: 11px; height: 11px; border: 2px solid #8b9692; background: #eef1f0; vertical-align: -1px; margin-right: 4px; }
.mk--enemy { border-color: var(--enemy); background: var(--enemy-soft); }
.mk--ally { border-color: var(--ally); background: var(--ally-soft); }
.lv { font-weight: 600; }
.voc { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 0 3px; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: 4px; padding: 28px; text-align: center; }

/* registro ao vivo: o elemento escuro do painel, com as cores de mensagem do console do Tibia */
.console { background: var(--console); color: #dbe2de; border-radius: 4px; padding: 14px 16px 12px; position: sticky; top: 14px; }
.console__title { font-size: 1.05rem; color: #f1f4f2; margin: 0 0 8px; }
.console__lines { list-style: none; margin: 0; padding: 0; font-size: .875rem; line-height: 1.45; max-height: 74vh; overflow: auto; }
.console__lines li { padding: 2px 0; overflow-wrap: anywhere; }
.console__lines time { color: #8f9c96; margin-right: 4px; }
.console__empty { color: #a9b4af; font-size: .9rem; }
.c-yellow { color: #f1de5e; } .c-red { color: #ff8b80; } .c-green { color: #8fe39f; } .c-blue { color: #9fcbff; }
.c-gold { color: #ffc266; } .c-grey { color: #aab5b0; } .c-light { color: #d5dcd8; } .c-dim { color: #8f9c96; }

/* blocos e formulários */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; margin-bottom: 18px; }
.panel--danger { border-color: #e3b1ac; }
.panel.narrow { max-width: 520px; }
.panel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel__head p { margin: 0; }
.lead { max-width: 72ch; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.pagehead h1 { margin-bottom: 2px; }
.pagehead__meta { margin: 0; }
.pagehead__actions { display: flex; gap: 8px; align-items: center; }
.form label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 12px; }
.form label small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 7px 10px; width: 100%; margin-top: 4px; min-height: 38px; }
input:focus, select:focus { border-color: var(--mana); }
input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0 6px 0 0; vertical-align: -2px; accent-color: var(--mana); }
.check { font-weight: 500; }
.check small { display: inline; }
fieldset { border: 1px solid var(--line-soft); border-radius: 4px; padding: 12px 16px 2px; margin: 0 0 14px; }
legend { font-weight: 600; padding: 0 6px; font-family: var(--cond); font-size: 1.02rem; }
.grid2, .grid3, .grid4 { display: grid; gap: 0 16px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
form[data-proto="raw"] .only-http, form[data-proto="http"] .only-raw { display: none; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.actions.sticky { position: sticky; bottom: 0; background: var(--stone); padding: 10px 0; border-top: 1px solid var(--line); }
.input-inline { width: 180px; margin: 0; }
.addrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.addrow input { flex: 1 1 200px; margin: 0; }
.addrow select { flex: 0 0 140px; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 .92rem var(--body); color: var(--ink); background: #fff; border: 1px solid #9aa6a2; border-radius: 3px; padding: 7px 14px; min-height: 38px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn--primary { background: var(--mana); border-color: var(--mana); color: #fff; }
.btn--primary:hover { background: var(--mana-dark); border-color: var(--mana-dark); color: #fff; }
.btn--danger { color: var(--enemy); border-color: var(--enemy); }
.btn--small { min-height: 32px; padding: 4px 10px; font-size: .85rem; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 14px 0 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.filters label { font-size: .85rem; font-weight: 500; }
.filters input, .filters select { min-width: 160px; }

/* tabelas */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 18px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: #f6f8f7; }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table--compact td, .table--compact th { padding: 5px 10px; }
.worlds { margin-top: 10px; }
.worlds summary { cursor: pointer; font-weight: 500; margin-bottom: 8px; }

/* listas de hunted e amigos */
.lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; }
.list h2 { border-left: 4px solid; padding-left: 9px; }
.list--enemy h2 { border-color: var(--enemy); }
.list--ally h2 { border-color: var(--ally); }
.wl { list-style: none; margin: 0; padding: 0; }
.wl li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tag name state" "info info del"; column-gap: 8px; padding: 7px 0; border-top: 1px solid var(--line-soft); align-items: center; }
.wl__tag { grid-area: tag; font-size: .7rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; }
.wl__name { grid-area: name; font-weight: 600; overflow-wrap: anywhere; }
.wl__state { grid-area: state; font-size: .88rem; text-align: right; }
.wl__info { grid-area: info; font-size: .8rem; color: var(--muted); }
.wl__del { grid-area: del; text-align: right; font-size: .82rem; }

/* alertas */
.testbar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 12px 16px 0; margin-bottom: 14px; }
.testbar label { flex: 0 1 300px; }
.testbar .muted { margin-bottom: 14px; }
.rule { background: var(--surface); }
.rule legend .check { margin: 0; font-family: var(--cond); font-size: 1.05rem; }
.rule--off > :not(legend) { opacity: .55; }
.rule__text { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 0 14px; align-items: start; }
.rule__text .btn { margin-top: 27px; }
.rule__note { align-self: center; margin: 14px 0 0; }

/* resultado dos testes */
.jobout:empty { display: none; }
.jobout { margin: 10px 0 14px; }
.job { background: #f8faf9; border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; }
.job--wait { color: var(--muted); }
.job--warn { background: var(--gold-soft); border-color: #e2c98e; }
.job--err { background: var(--enemy-soft); border-color: #e3aaa4; }
.job__msg { margin: 4px 0; font-weight: 500; }
.job__hint { color: var(--gold); margin: 6px 0 0; }
.job details { margin-top: 8px; }
.job summary { cursor: pointer; font-weight: 500; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { padding: 2px 0 2px 22px; position: relative; }
.steps li::before { position: absolute; left: 2px; font-weight: 700; }
.steps .is-ok::before { content: "✓"; color: var(--ally); }
.steps .is-err::before { content: "✗"; color: var(--enemy); }
.steps .is-info::before { content: "–"; color: var(--muted); }
.steps .is-err { color: var(--enemy); }
.cmds { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.cmds dt { margin: 0; }
.cmds dd { margin: 0; color: var(--muted); }
.login { max-width: 380px; margin: 8vh auto 0; }
.login h1 { margin-bottom: 4px; }

@media (max-width: 980px) {
  .dash { grid-template-columns: 1fr; }
  .console { position: static; }
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .main { padding: 18px 14px 32px; }
  .top__in { gap: 10px 16px; padding: 8px 14px; }
  .nav a { padding: 8px 8px; }
  .bl__cols, .lists, .grid2, .grid3, .grid4, .rule__text { grid-template-columns: 1fr; }
  .rule__text .btn { margin: 0 0 12px; }
  .strip__item { border-right: 0; border-bottom: 1px solid var(--line-soft); width: 100%; }
  .cmds { grid-template-columns: 1fr; }
  .cmds dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
