/* Beta Pool — identidade azul / roxo / preto / dourado (derivada do site original) */
:root {
  --bg: #040a17; --bg-2: #071326; --panel: #0b1f3a; --panel-2: #071326; --line: #1b486b; --line-2: #266a8d;
  --text: #e9f2ff; --muted: #a8bbd4; --dim: #6c88a8;
  --cyan: #2fe1ff; --blue: #35c7ff; --violet: #9b7bff; --purple: #d49cff; --gold: #ffbe4d; --gold-2: #f9dca3;
  --ok: #4fffc7; --warn: #ffbe4d; --err: #ff6b8b;
  --radius: 16px; --gutter: 24px;
  --grad: linear-gradient(90deg, #3ce4ff, #78a8ff, #d49cff);
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 15%, #0a3d70 0%, #071a34 28%, #040a17 73%); }
a { color: var(--cyan); }
a:hover { color: #8ff0ff; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Cabeçalho e navegação */
.topbar { max-width: 1170px; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--gutter) 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .17em; font-size: 18px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); }
.brand span { color: var(--cyan); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a, .nav button.linkish { color: #bdeaff; text-decoration: none; font-size: 14px; padding: 8px 12px; border-radius: 999px; border: 1px solid transparent; background: none; cursor: pointer; font: inherit; font-size: 14px; }
.nav a:hover, .nav button.linkish:hover { background: #12324d; }
.nav a[aria-current="page"] { border-color: var(--line-2); background: #05182c; color: #fff; }
.nav .cta { background: linear-gradient(135deg, #0876a3, #6b4bd6); color: #fff; border-color: #6b4bd6; }
.nav .cta:hover { filter: brightness(1.1); background: linear-gradient(135deg, #0876a3, #6b4bd6); }
.menu-btn { display: none; background: transparent; border: 1px solid var(--line-2); color: #bdeaff; border-radius: 10px; padding: 8px 12px; font-size: 14px; cursor: pointer; }
.envbar { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--gold-2); background: #30220f; border-bottom: 1px solid #795b2b; padding: 6px 12px; }
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; top: 64px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; background: #061428f5; border: 1px solid var(--line); border-radius: 14px; padding: 10px; z-index: 20; }
  .nav.open { display: flex; }
  .topbar { position: relative; }
}

main { flex: 1; width: 100%; }
.wrap { max-width: 1170px; margin: 0 auto; padding: 8px var(--gutter) 60px; }
.narrow { max-width: 480px; margin: 0 auto; padding: 24px 16px 60px; }
footer.site { border-top: 1px solid #10304d; color: var(--dim); font-size: 12px; text-align: center; padding: 22px 16px; line-height: 1.7; }

/* Herói com o Betta */
.stage { position: relative; aspect-ratio: 1118/548; border: 1px solid #1386cb; border-radius: 24px; overflow: hidden; box-shadow: 0 0 60px #078bd024, 0 0 110px #0058ab22; background: #051429; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage::after { content: ""; pointer-events: none; position: absolute; inset: 0; border: 1px solid #5edbff50; border-radius: 24px; box-shadow: inset 0 0 36px #008bff25; }
.hud { position: absolute; right: 3%; top: 6%; padding: 13px 18px; text-align: left; background: #021124b8; border: 1px solid #1e87ba99; border-radius: 8px; color: #7edaff; font: 11px/1.65 ui-monospace, monospace; letter-spacing: .06em; backdrop-filter: blur(8px); }
.hud strong { color: #b7f1ff; }
.fishnote { position: absolute; left: 3%; bottom: 5%; text-align: left; font-weight: 900; font-size: clamp(15px, 3vw, 31px); letter-spacing: .12em; text-shadow: 0 0 15px #000; }
.fishnote span { color: #1be4ff; }
.fishnote small { display: block; font-size: 9px; letter-spacing: .28em; color: #80cde9; }
.hero-text { text-align: center; }
.eyebrow { color: #4ee5ff; font-weight: 800; letter-spacing: .4em; font-size: 12px; margin-top: 22px; text-transform: uppercase; }
h1 { font-size: clamp(32px, 5.2vw, 64px); letter-spacing: -.05em; margin: 12px 0 8px; line-height: 1.1; }
h1 .grad, .grad { background: var(--grad); color: transparent; -webkit-background-clip: text; background-clip: text; }
h2 { font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 12px; letter-spacing: -.02em; }
h3 { margin: 0 0 10px; font-size: 17px; }
.lead { font-size: 17px; line-height: 1.8; color: var(--muted); margin: 14px auto 20px; max-width: 680px; }
.motion-btn { background: transparent; border: 1px solid var(--line-2); border-radius: 30px; color: #bdeaff; padding: 8px 14px; cursor: pointer; margin-top: 10px; font-size: 13px; }

/* Painéis, grades e cartões */
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g-main { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3, .g-main { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .g2, .g4 { grid-template-columns: 1fr; } }
.panel, .tile { background: linear-gradient(155deg, #0c2340, #071326); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.panel.gold { border-color: #795b2b; background: linear-gradient(155deg, #2a1f0e, #0d1424); }
.tile label { display: block; color: #8ca9c7; font-size: 12px; }
.tile strong { display: block; font-size: clamp(20px, 2.6vw, 28px); margin-top: 10px; overflow-wrap: anywhere; }
.tile .sub { font-size: 12px; color: #52dcb6; margin-top: 6px; }
.tile .sub.na, .na { color: var(--dim); }
.section { margin-top: 34px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line-2); background: #05182c; color: #90dfff; white-space: nowrap; }
.badge.test { color: var(--gold-2); border-color: #795b2b; background: #30220f; }
.badge.ok { color: var(--ok); border-color: #1d6b55; background: #06231c; }
.badge.off { color: #ff9fb3; border-color: #6b2235; background: #230812; }
.badge.warn { color: var(--gold-2); border-color: #795b2b; background: #30220f; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.dot.off { background: #ff6b8b; box-shadow: 0 0 10px #ff6b8b; }
.dot.idle { background: var(--dim); box-shadow: none; }

/* Formulários */
form.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: #bcd3ea; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--dim); }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; background: #061225; color: #fff; border: 1px solid #32617f; border-radius: 10px; padding: 12px; font: inherit; font-size: 15px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px #2fe1ff26; }
input[aria-invalid=true] { border-color: var(--err); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.check input { margin-top: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; border: 1px solid transparent; text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, #0a8fc4, #6b4bd6); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); color: #fff; }
.btn.gold { background: linear-gradient(135deg, #c98a1c, #ffbe4d); color: #1b1203; }
.btn.ghost { background: transparent; color: #bdeaff; border-color: var(--line-2); }
.btn.ghost:hover { background: #12324d; }
.btn.danger { background: transparent; color: #ff9fb3; border-color: #6b2235; }
.btn.danger:hover { background: #230812; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled], .btn[aria-busy=true] { opacity: .6; cursor: progress; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }

/* Alertas e estados */
.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.55; border: 1px solid; }
.alert.err { background: #230812; border-color: #6b2235; color: #ffc2cf; }
.alert.ok { background: #06231c; border-color: #1d6b55; color: #b5ffe6; }
.alert.info { background: #071d34; border-color: #1b5277; color: #bde8fa; }
.alert.warn { background: #30220f; border-color: #795b2b; color: var(--gold-2); }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.loading { color: var(--dim); font-size: 14px; }
.loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--line-2); border-top-color: var(--cyan); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before { animation: none; } }

/* Tabelas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #10304d; white-space: nowrap; }
th { color: #8ca9c7; font-weight: 600; font-size: 12px; background: #061428; }
tr:last-child td { border-bottom: 0; }
td.wrap-any { white-space: normal; overflow-wrap: anywhere; }

/* Credenciais (copiar) */
.cred { display: grid; gap: 10px; }
.cred-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; background: #061225; border: 1px solid #32617f; border-radius: 10px; padding: 10px 12px; }
.cred-row .k { color: #8ca9c7; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.cred-row .v { font-family: ui-monospace, monospace; font-size: 14px; overflow-wrap: anywhere; color: #b7f1ff; }
@media (max-width: 560px) { .cred-row { grid-template-columns: 1fr auto; } .cred-row .k { grid-column: 1 / -1; } }

/* Abas simples */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { background: #061225; border: 1px solid var(--line); color: #bdeaff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.tabs button[aria-selected=true] { border-color: var(--gold); color: var(--gold-2); background: #30220f; }

.chart { width: 100%; height: 200px; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: #8ca9c7; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
ol.steps-list { padding-left: 20px; line-height: 1.8; color: var(--muted); }
ol.steps-list b { color: var(--text); }
hr.sep { border: 0; border-top: 1px solid #10304d; margin: 18px 0; }

dialog.panel { color: var(--text); max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
.secret-once { border: 1px solid #795b2b; background: #1d150a; border-radius: 14px; padding: 16px; display: grid; gap: 12px; }
.worker-card { display: grid; gap: 12px; }
.worker-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.worker-head h3 { margin: 0; font-family: ui-monospace, monospace; font-size: 16px; overflow-wrap: anywhere; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; font-size: 13px; }
.stat-row div label { display: block; color: #8ca9c7; font-size: 11px; }
.stat-row div strong { font-size: 15px; }
@media (max-width: 560px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

.chart-wrap { position: relative; }
.chart-wrap svg text { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.chart-wrap rect:focus { outline: none; }
.chart-wrap rect:focus-visible { outline: 2px solid var(--gold); }
.chart-tip { position: absolute; top: 0; transform: translateX(-50%); background: #061428f0; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 10px; font-size: 12px; display: grid; gap: 2px; pointer-events: none; white-space: nowrap; }
.chart-tip strong { font-size: 14px; color: #fff; }
.chart-tip span { color: var(--muted); }
.chart-table { margin-top: 10px; font-size: 13px; color: var(--muted); }
.chart-table summary { cursor: pointer; }
.chart-table .table-wrap { margin-top: 8px; max-height: 260px; overflow: auto; }
.alerts { display: grid; gap: 8px; }
.mine { color: var(--gold); font-weight: 700; }
