/* ═══════════════════════════════════════════════════
   components.css — Buttons, cards, badges, toast
═══════════════════════════════════════════════════ */

/* ── Nav buttons ── */
.nav-btn {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
  position: relative;
}
.nav-btn:hover  { color: var(--text); background: var(--faint); }
.nav-btn.active { color: var(--phosphor); background: rgba(0,255,136,0.06); }
.nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
  border-radius: 1px;
}

/* ── Stat pills ── */
.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--faint);
  border: 1px solid var(--rim);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}
.stat-pill .val { color: var(--phosphor); font-weight: 600; }

/* ── Connection dot ── */
.conn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 6px var(--phosphor);
  animation: pulse-dot 2s ease-in-out infinite;
}
.conn-dot.offline {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: none;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── Buttons ── */
.btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--phosphor);
  border: none;
  border-radius: 6px;
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 8px;
}
.btn-primary:hover    { background: var(--phosphor2); }
.btn-primary:disabled { background: var(--rim); cursor: not-allowed; color: var(--muted); }

.btn-secondary {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--rim);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 8px;
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }

.btn-danger {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid rgba(255,71,87,0.3);
  border-radius: 6px;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 8px;
}
.btn-danger:hover { background: rgba(255,71,87,0.08); border-color: var(--red); }

/* ── Section label ── */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rim);
}

/* ── Edit section title ── */
.edit-section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Confirm zone ── */
.confirm-zone {
  background: rgba(255,71,87,0.05);
  border: 1px solid rgba(255,71,87,0.2);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--red);
  line-height: 1.5;
  display: none;
}
.confirm-zone.visible { display: block; }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 8px 20px;
  background: var(--raised);
  border: 1px solid var(--rim2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text);
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
#toast.show    { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.success { border-color: var(--phosphor); color: var(--phosphor); }
#toast.error   { border-color: var(--red);      color: var(--red); }
