/* Design system compartilhado entre /app (painel do cliente) e /docs
   (documentação). Minimalista de propósito: poucas cores, pouca decoração. */

:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e2129;
  --border: #2a2e38;
  --text: #e6e8ec;
  --muted: #8b909c;
  --accent: #25d366;
  --accent-dim: #1a9c4a;
  --accent-ink: #06210f;
  --danger: #e5484d;
  --warn: #e5a83d;
  --mono: 'SF Mono', Consolas, Monaco, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); }

header.site {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
header.site .brand {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
header.site .brand span { color: var(--accent); }
header.site nav { display: flex; gap: 18px; align-items: center; font-size: 13px; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a.active { color: var(--text); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.card h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 14px;
}

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 4px;
}
label:first-of-type { margin-top: 0; }
input, select, textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: var(--mono);
}
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-dim); }

.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

button {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
}
button:hover { background: var(--accent-dim); }
button.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.secondary:hover { border-color: var(--muted); background: var(--panel-2); }
button.danger { background: var(--danger); color: #fff; }
button.danger:hover { background: #c73438; }
button.ghost { background: transparent; color: var(--muted); padding: 6px 10px; font-weight: 400; }
button.ghost:hover { color: var(--text); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--mono);
  text-transform: uppercase;
}
.badge.qr { background: #2a2e38; color: #9fb3ff; }
.badge.official { background: #2a2e38; color: #ffd39f; }
.badge.connected { background: rgba(37,211,102,0.15); color: var(--accent); }
.badge.disconnected { background: rgba(229,72,77,0.15); color: var(--danger); }
.badge.pending { background: rgba(229,168,61,0.15); color: var(--warn); }
.badge.proxy { background: rgba(159,179,255,0.12); color: #9fb3ff; text-transform: none; }

.muted { color: var(--muted); font-size: 12px; }
.small-note { font-size: 11px; color: var(--muted); margin-top: 6px; }

code, pre {
  font-family: var(--mono);
  background: #0a0b0e;
  border: 1px solid var(--border);
  border-radius: 6px;
}
code { padding: 1px 6px; font-size: 12px; }
pre { padding: 14px; overflow-x: auto; font-size: 12.5px; line-height: 1.6; }
pre code { border: none; background: none; padding: 0; }

/* toast de feedback — substitui alert()/console de debug */
#toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  max-width: 360px;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--muted);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: toast-in 0.15s ease-out;
}
.toast.ok { border-left-color: var(--accent); }
.toast.err { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
