/* Profit Indicator — painel. Direcao: instrumento de precisao, nao cassino.
 * Regra do sistema: verde e vermelho so para direcao de operacao (COMPRA/VENDA).
 * Nunca em botao, link, grafico decorativo ou estado de sucesso/erro. */
:root {
  --bg: #0B0E14;
  --surface: #161A23;
  --surface-2: #1D2230;
  --line: #262C3A;
  --text: #E6E9EF;
  --muted: #8A93A6;
  --brand: #22D3EE;
  --brand-ink: #062A31;
  --call: #16C47F;
  --put: #FF4D5E;
  --warn: #F5B94A;
  --radius: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
a { color: var(--brand); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* --- login --- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--brand); position: relative; }
.brand-mark::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--brand); }
.auth h1 { font-size: 20px; margin: 20px 0 4px; }
.auth p.lead { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=email], input[type=password], input[type=number], select {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 10px 16px; font-weight: 600; }
.btn-primary { background: var(--brand); color: var(--brand-ink); width: 100%; margin-top: 20px; }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.link-btn { background: none; border: 0; color: var(--brand); padding: 0; font-size: 14px; }
.msg { margin-top: 14px; font-size: 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); color: var(--text); border-left: 3px solid var(--warn); }
.notice { border-left: 3px solid var(--warn); }
.msg.ok { border-left-color: var(--brand); }

/* --- app --- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(11,14,20,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.tabs { display: flex; gap: 4px; margin-left: 12px; overflow-x: auto; }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.tab[aria-selected=true] { color: var(--text); background: var(--surface); }
.top .spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.live { background: var(--brand); box-shadow: 0 0 0 4px rgba(34,211,238,.15); }

/* sinais */
.signals { display: grid; gap: 8px; }
.signal { display: grid; grid-template-columns: 90px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.dir { font-weight: 700; font-size: 13px; letter-spacing: .5px; padding: 4px 10px; border-radius: 6px; text-align: center; }
.dir.call { background: rgba(22,196,127,.14); color: var(--call); }
.dir.put { background: rgba(255,77,94,.14); color: var(--put); }
.signal .meta { color: var(--muted); font-size: 13px; }
.result { font-size: 13px; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }

/* assertividade */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); }
td.r, th.r { text-align: right; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: rgba(34,211,238,.12); color: var(--brand); }
.bar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--muted); }
.bar > i.ok { background: var(--brand); }

/* configurar */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font-size: 14px; user-select: none; }
.chip input { accent-color: var(--brand); margin: 0; }
.chip small { color: var(--muted); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch input { width: 40px; height: 22px; accent-color: var(--brand); }
.save-bar { position: sticky; bottom: 0; z-index: 4; display: flex; gap: 12px; align-items: center; justify-content: flex-end; padding: 12px 0; background: var(--bg); border-top: 1px solid var(--line); }
.save-bar .btn-primary { width: auto; margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.risk { color: var(--muted); font-size: 12px; text-align: center; margin-top: 32px; }

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
  .signal { grid-template-columns: 76px 1fr; }
  .signal .result, .signal .num.when { grid-column: 2; }
  .who { display: none; }
  .top-in { flex-wrap: wrap; row-gap: 8px; }
  .tabs { order: 3; width: 100%; margin-left: 0; }
  .tab { flex: 1; padding: 8px 6px; }
  .hide-sm { display: none; }
}
